- Upstream or pending upstream patches from Jan 25587-fix-off-by-one-parsing-error.patch 25616-x86-MCi_CTL-default.patch 25617-vtd-qinval-addr.patch 25688-x86-nr_irqs_gsi.patch - bnc#773393 - VUL-0: CVE-2012-3433: xen: HVM guest destroy p2m teardown host DoS vulnerability CVE-2012-3433-xsa11.patch - bnc#773401 - VUL-1: CVE-2012-3432: xen: HVM guest user mode MMIO emulation DoS 25682-x86-inconsistent-io-state.patch - bnc#762484 - VUL-1: CVE-2012-2625: xen: pv bootloader doesn't check the size of the bzip2 or lzma compressed kernel, leading to denial of service 25589-pygrub-size-limits.patch - Make it build with latest TeXLive 2012 with new package layout OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=196
71 lines
2.6 KiB
Diff
71 lines
2.6 KiB
Diff
Print a warning and exit xl if xend is running. It is not
|
|
recommened to use libxenlight in conjunction with legacy xend
|
|
toolstack.
|
|
|
|
xl could be useful even when xend is running, e.g. to debug
|
|
xend itself, so add a '-f' option to override the exit.
|
|
|
|
Index: xen-4.1.3-testing/tools/libxl/xl.c
|
|
===================================================================
|
|
--- xen-4.1.3-testing.orig/tools/libxl/xl.c
|
|
+++ xen-4.1.3-testing/tools/libxl/xl.c
|
|
@@ -88,12 +88,16 @@ int main(int argc, char **argv)
|
|
char *config_file;
|
|
void *config_data = 0;
|
|
int config_len = 0;
|
|
+ int force = 0;
|
|
|
|
- while ((opt = getopt(argc, argv, "+v")) >= 0) {
|
|
+ while ((opt = getopt(argc, argv, "+vf")) >= 0) {
|
|
switch (opt) {
|
|
case 'v':
|
|
if (minmsglevel > 0) minmsglevel--;
|
|
break;
|
|
+ case 'f':
|
|
+ force = 1;
|
|
+ break;
|
|
default:
|
|
fprintf(stderr, "unknown global option\n");
|
|
exit(2);
|
|
@@ -107,6 +111,18 @@ int main(int argc, char **argv)
|
|
exit(1);
|
|
}
|
|
opterr = 0;
|
|
+ /*
|
|
+ * On SUSE, if xend is running (and user isn't asking for help),
|
|
+ * print a warning and exit unless forced.
|
|
+ */
|
|
+ if ((system("/usr/sbin/xend status") == 0) && strcmp(cmd, "help")) {
|
|
+ if (force == 0) {
|
|
+ fprintf(stderr, "WARNING: xend is running! It is not recommended "
|
|
+ "using libxenlight in\nconjunction with the legacy xend "
|
|
+ "toolstack. Use -f (force) to override\n");
|
|
+ exit(1);
|
|
+ }
|
|
+ }
|
|
|
|
logger = xtl_createlogger_stdiostream(stderr, minmsglevel, 0);
|
|
if (!logger) exit(1);
|
|
Index: xen-4.1.3-testing/tools/libxl/xl_cmdimpl.c
|
|
===================================================================
|
|
--- xen-4.1.3-testing.orig/tools/libxl/xl_cmdimpl.c
|
|
+++ xen-4.1.3-testing/tools/libxl/xl_cmdimpl.c
|
|
@@ -1741,7 +1741,7 @@ void help(const char *command)
|
|
struct cmd_spec *cmd;
|
|
|
|
if (!command || !strcmp(command, "help")) {
|
|
- printf("Usage xl [-v] <subcommand> [args]\n\n");
|
|
+ printf("Usage xl [-v] [-f] <subcommand> [args]\n\n");
|
|
printf("xl full list of subcommands:\n\n");
|
|
for (i = 0; i < cmdtable_len; i++)
|
|
printf(" %-20s%s\n",
|
|
@@ -1749,7 +1749,7 @@ void help(const char *command)
|
|
} else {
|
|
cmd = cmdtable_lookup(command);
|
|
if (cmd) {
|
|
- printf("Usage: xl [-v] %s %s\n\n%s.\n\n",
|
|
+ printf("Usage: xl [-v] [-f] %s %s\n\n%s.\n\n",
|
|
cmd->cmd_name,
|
|
cmd->cmd_usage,
|
|
cmd->cmd_desc);
|