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] Import the xen-unstable changeset

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Import the xen-unstable changeset
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:09:57 +0000
Delivery-date: Thu, 02 Nov 2006 21:44:06 -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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 63d1b02dad347e8feb845d8a8b482e251a478164
# Parent  de99c7f7aba47154810bf282259cc87e5c3bc58f
Import the xen-unstable changeset
11863:7633398447846679342b197a79bc375b996d9026, with conflict resolution by
Ewan Mellor.

[XM] Allow empty resource strings (e.g., when creating an empty CDROM
device). Also clean up error/acces-denied path.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/python/xen/util/security.py |    9 ++++++++-
 tools/python/xen/xm/create.py     |    4 +++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff -r de99c7f7aba4 -r 63d1b02dad34 tools/python/xen/util/security.py
--- a/tools/python/xen/util/security.py Mon Oct 23 09:57:24 2006 +0100
+++ b/tools/python/xen/util/security.py Mon Oct 23 12:23:57 2006 +0100
@@ -601,8 +601,15 @@ def unify_resname(resource):
     """Makes all resource locations absolute. In case of physical
     resources, '/dev/' is added to local file names"""
 
+    if not resource:
+        return resource
+
     # sanity check on resource name
-    (type, resfile) = resource.split(":")
+    try:
+        (type, resfile) = resource.split(":")
+    except:
+        err("Resource spec '%s' contains no ':' delimiter" % resource)
+
     if type == "phy":
         if not resfile.startswith("/"):
             resfile = "/dev/" + resfile
diff -r de99c7f7aba4 -r 63d1b02dad34 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Oct 23 09:57:24 2006 +0100
+++ b/tools/python/xen/xm/create.py     Mon Oct 23 12:23:57 2006 +0100
@@ -1161,6 +1161,8 @@ def config_security_check(config, verbos
         except security.ACMError:
             print "   %s: DENIED" % (resource)
             (res_label, res_policy) = security.get_res_label(resource)
+            if not res_label:
+                res_label = ""
             print "   --> res: %s (%s)" % (str(res_label),
                                            str(res_policy))
             print "   --> dom: %s (%s)" % (str(domain_label),
@@ -1202,7 +1204,7 @@ def main(argv):
         PrettyPrint.prettyprint(config)
     else:
         if not create_security_check(config):
-            raise OptionError('Security Configuration prevents domain from 
starting')
+            raise security.ACMError('Security Configuration prevents domain 
from starting')
         else:
             dom = make_domain(opts, config)
             if opts.vals.console_autoconnect:

_______________________________________________
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] Import the xen-unstable changeset, Xen patchbot-unstable <=