Refuse to run shutdown/reboot on Dom0

This commit is contained in:
Daniel P. Berrange 2007-02-22 16:49:12 +00:00
parent 68f1003652
commit b3244072e4
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Thu Feb 22 11:45:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/xs_internal.c: Refuse to do shutdown / reboot on
Dom0 guest. Signed-off-by: Kazuki Mizushima
<mizushima.kazuk@jp.fujitsu.com>
Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix another xml property leak.

View File

@ -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