projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00c08b5
)
xl: Check for dom0 when instructed to destroy a domain.
author
Keir Fraser
<keir.fraser@citrix.com>
Wed, 19 May 2010 11:53:44 +0000
(12:53 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Wed, 19 May 2010 11:53:44 +0000
(12:53 +0100)
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
tools/libxl/xl_cmdimpl.c
patch
|
blob
|
history
diff --git
a/tools/libxl/xl_cmdimpl.c
b/tools/libxl/xl_cmdimpl.c
index e6ce1d416deb4abf765aeb319e11137c387f366a..4f03e8eb6418a8a472314b9b7f4af6efc404a9fb 100644
(file)
--- a/
tools/libxl/xl_cmdimpl.c
+++ b/
tools/libxl/xl_cmdimpl.c
@@
-1613,6
+1613,10
@@
void destroy_domain(char *p)
{
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); }
}