Skip to contentSkip to conversation

"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.

PATCH New Rusty Russell 1 participant 1 message Aug 4, 2005 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
# 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.

tools/python/xen/lowlevel/xs/xs.c +4 -13
diff -r 24d23956f7da -r 7afa9d82082a tools/python/xen/lowlevel/xs/xs.c
@@ -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)