* [PATCH]xl: Check dom0 on command level when destroy domains
@ 2010-05-18 6:54 Yang Hongyang
0 siblings, 0 replies; only message in thread
From: Yang Hongyang @ 2010-05-18 6:54 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
Check dom0 on command level when destroy domains.
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
diff -r 0a0bdb02600b tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Tue May 18 22:48:00 2010 +0800
+++ b/tools/libxl/xl_cmdimpl.c Tue May 18 22:51:16 2010 +0800
@@ -1568,6 +1568,10 @@
{
int rc;
find_domain(p);
+ if (domid == 0) {
+ fprintf(stderr, "Cannot destroy privileged domain 0.\n\n");
+ exit(-1);
+ }
rc = libxl_domain_destroy(&ctx, domid, 0);
if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n.",rc); exit(-1); }
}
--
Regards
Yang Hongyang
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-18 6:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-18 6:54 [PATCH]xl: Check dom0 on command level when destroy domains Yang Hongyang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).