WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] This patch adds a check in xend that prevents a user fro

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This patch adds a check in xend that prevents a user from trying to
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 13:16:11 +0000
Delivery-date: Thu, 22 Sep 2005 13:14:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@ewan
# Node ID 7646b18d4b3254c43cfa90e3c369efbda963bcad
# Parent  0f71667deb520ebf748fcc0721e2e79a38abdac8
This patch adds a check in xend that prevents a user from trying to
destroy Dom0.  Currently, xm does not return an error for this case.
Xend tries to destroy dom0 and leaves the system in an unstable
state.  Subsequent attempts to create a domain result in the following
error message:

  Error: Error creating domain: (106, 'Transport endpoint is already \
  connected')

This will fix bugzilla bug #243

Signed-off-by: Dan Smith <danms@xxxxxxxxxx>

diff -r 0f71667deb52 -r 7646b18d4b32 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Sep 22 10:21:37 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Sep 22 10:35:35 2005
@@ -42,6 +42,7 @@
 __all__ = [ "XendDomain" ]
 
 SHUTDOWN_TIMEOUT = 30
+PRIV_DOMAIN      =  0
 
 def is_dead(dom):
     return dom['crashed'] or dom['shutdown'] or (
@@ -163,7 +164,7 @@
         self.domain_restarts()
 
     def dom0_setup(self):
-        dom0 = self.domain_lookup(0)
+        dom0 = self.domain_lookup(PRIV_DOMAIN)
         if not dom0:
             dom0 = self.dom0_unknown()
         dom0.dom0_init_store()    
@@ -331,7 +332,7 @@
         return self.domains.get(id)
 
     def dom0_unknown(self):
-        dom0 = 0
+        dom0 = PRIV_DOMAIN
         uuid = None
         info = self.xen_domain(dom0)
         dompath = GetDomainPath(dom0)
@@ -499,6 +500,10 @@
 
         @param domid: domain id
         """
+
+        if domid == PRIV_DOMAIN:
+            raise XendError("Cannot destroy priviliged domain %i" % domid)
+        
         self.domain_restart_schedule(domid, reason, force=True)
         dominfo = self.domain_lookup(domid)
         if dominfo:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This patch adds a check in xend that prevents a user from trying to, Xen patchbot -unstable <=