[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xl: Check for dom0 when instructed to destroy a domain.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1274270024 -3600 # Node ID a3cf0d9a1b188d65c84186536a7c004790235af6 # Parent f981d865c8270acef9eba0909df1b30048dbaf53 xl: Check for dom0 when instructed to destroy a domain. Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 4 ++++ 1 files changed, 4 insertions(+) diff -r f981d865c827 -r a3cf0d9a1b18 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Wed May 19 12:51:16 2010 +0100 +++ b/tools/libxl/xl_cmdimpl.c Wed May 19 12:53:44 2010 +0100 @@ -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); } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |