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-devel

[Xen-devel] [PATCH 9/11] "create" and "owner" bits are private to the da

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [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.
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Thu, 04 Aug 2005 22:31:54 +1000
Delivery-date: Thu, 04 Aug 2005 12:33:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [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., Rusty Russell <=