From b3244072e44fc7b56a75102459a65e09a7869fae Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 22 Feb 2007 16:49:12 +0000 Subject: [PATCH] Refuse to run shutdown/reboot on Dom0 --- ChangeLog | 6 ++++++ src/xs_internal.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8372481936..cba4748a26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Feb 22 11:45:24 EST 2007 Daniel P. Berrange + + * src/xs_internal.c: Refuse to do shutdown / reboot on + Dom0 guest. Signed-off-by: Kazuki Mizushima + + Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin * qemud/conf.c: fix another xml property leak. diff --git a/src/xs_internal.c b/src/xs_internal.c index bf7e36e343..be3b6b84dd 100644 --- a/src/xs_internal.c +++ b/src/xs_internal.c @@ -630,7 +630,7 @@ xenStoreDomainShutdown(virDomainPtr domain) __FUNCTION__); return(-1); } - if (domain->id == -1) + if (domain->id == -1 || domain->id == 0) return(-1); /* * this is very hackish, the domU kernel probes for a special @@ -658,7 +658,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED) __FUNCTION__); return(-1); } - if (domain->id == -1) + if (domain->id == -1 || domain->id == 0) return(-1); /* * this is very hackish, the domU kernel probes for a special