[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 9/11] "create" and "owner" bits are private to the daemon, and never exposed to the client. The python bindings must not refer to them at all.



# HG changeset patch
# User Rusty Russell <rusty@xxxxxxxxxxxxxxx>
# Node ID 7afa9d82082a6dde722995b22b59a0819fb70f87
# Parent  24d23956f7da1dfe80773ced552041cf953c090a
"create" and "owner" bits are private to the daemon, and never exposed to the 
client.  The python bindings must not refer to them at all.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

diff -r 24d23956f7da -r 7afa9d82082a tools/python/xen/lowlevel/xs/xs.c
--- a/tools/python/xen/lowlevel/xs/xs.c Thu Aug  4 11:42:40 2005
+++ b/tools/python/xen/lowlevel/xs/xs.c Thu Aug  4 11:44:12 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),
-                                    "create", (perms->perms & XS_PERM_CREATE),
-                                    "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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.