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] [xen-unstable] [XEND] Fix bootable flag bypass in XendCo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix bootable flag bypass in XendConfig
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2007 07:05:08 -0800
Delivery-date: Wed, 31 Jan 2007 07:07:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1170158187 0
# Node ID 5165b7ecbff53eede602ba2c247ffe857f2c5bb9
# Parent  bca858b72bf8038b14dbbd7bb1431897c95b2fc2
[XEND] Fix bootable flag bypass in XendConfig

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py          |    8 ++++----
 tools/python/xen/xend/server/XMLRPCServer.py |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -r bca858b72bf8 -r 5165b7ecbff5 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Jan 30 11:37:18 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Tue Jan 30 11:56:27 2007 +0000
@@ -881,10 +881,10 @@ class XendConfig(dict):
                             if sxp.name(config) in ('vbd', 'tap'):
                                 # The bootable flag is never written to the
                                 # store as part of the device config.
-                                uuid = sxp.child_value(sxpr, 'uuid')
-                                sxpr.append(
-                                    'bootable', 
-                                    self['devices'][dev_uuid]['bootable'])
+                                dev_uuid = sxp.child_value(config, 'uuid')
+                                dev_type, dev_cfg = self['devices'][dev_uuid]
+                                config.append(['bootable',
+                                               int(dev_cfg['bootable'])])
                             sxpr.append(['device', config])
 
                         found = True
diff -r bca858b72bf8 -r 5165b7ecbff5 
tools/python/xen/xend/server/XMLRPCServer.py
--- a/tools/python/xen/xend/server/XMLRPCServer.py      Tue Jan 30 11:37:18 
2007 +0000
+++ b/tools/python/xen/xend/server/XMLRPCServer.py      Tue Jan 30 11:56:27 
2007 +0000
@@ -34,7 +34,7 @@ def fixup_sxpr(sexpr):
 def fixup_sxpr(sexpr):
     ret = []
     for k in sexpr:
-        if type(k) in (types.ListType, types.TupleType):
+        if type(k) in (list, tuple):
             if len(k) != 2 or k[0] != 'vcpu_avail':
                 ret.append(fixup_sxpr(k))
         else:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Fix bootable flag bypass in XendConfig, Xen patchbot-unstable <=