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] Don't expose xenstore daemon-only permission bits throug

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Don't expose xenstore daemon-only permission bits through python bindings.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 09 Aug 2005 06:42:11 -0400
Delivery-date: Tue, 09 Aug 2005 10:42:43 +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 cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 6915b98bb38458f5541639f224661fedce4b6a86
# Parent  0229efe8ffe435c9559366b246e3c0127c181757
Don't expose xenstore daemon-only permission bits through python bindings.
These bits are daemon-only, never come though to userspace.  We already
changed them once and broke compilation: better they had never been
referenced.
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 0229efe8ffe4 -r 6915b98bb384 tools/python/xen/lowlevel/xs/xs.c
--- a/tools/python/xen/lowlevel/xs/xs.c Mon Aug  8 18:43:57 2005
+++ b/tools/python/xen/lowlevel/xs/xs.c Tue Aug  9 08:44:29 2005
@@ -253,12 +253,10 @@
     }
     val = PyList_New(perms_n);
     for (i = 0; i < perms_n; i++, perms++) {
-        PyObject *p = Py_BuildValue("{s:i,s:i,s:i,s:i,s:i}",
+        PyObject *p = Py_BuildValue("{s:i,s:i,s:i}",
                                     "dom",   perms->id,
                                     "read",  (perms->perms & XS_PERM_READ),
-                                    "write", (perms->perms & XS_PERM_WRITE),
-                                    "exist", (perms->perms & 
XS_PERM_ENOENT_OK),
-                                    "owner", (perms->perms & XS_PERM_OWNER));
+                                    "write",  (perms->perms & XS_PERM_WRITE));
         PyList_SetItem(val, i, p);
     }
  exit:
@@ -281,8 +279,7 @@
     static char *arg_spec = "sO";
     char *path = NULL;
     PyObject *perms = NULL;
-    static char *perm_names[] = { "dom", "read", "write", "create", "owner",
-                                 NULL };
+    static char *perm_names[] = { "dom", "read", "write", NULL };
     static char *perm_spec = "i|iiii";
 
     struct xs_handle *xh = xshandle(self);
@@ -315,15 +312,9 @@
         int dom = 0;
         /* Read/write perms. Set these. */
         int p_read = 0, p_write = 0;
-        /* Create/owner perms. Ignore them.
-         * This is so the output from get_permissions() can be used
-         * as input to set_permissions().
-         */
-        int p_create = 0, p_owner = 0;
         PyObject *p = PyList_GetItem(perms, i);
         if (!PyArg_ParseTupleAndKeywords(tuple0, p, perm_spec, perm_names,
-                                        &dom, &p_read, &p_write, &p_create,
-                                        &p_owner))
+                                        &dom, &p_read, &p_write))
             goto exit;
         xsperms[i].id = dom;
         if (p_read)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Don't expose xenstore daemon-only permission bits through python bindings., Xen patchbot -unstable <=