ia64/xen-unstable

changeset 6069:6915b98bb384

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@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 09 08:44:29 2005 +0000 (2005-08-09)
parents 0229efe8ffe4
children 663f0fb1e444
files tools/python/xen/lowlevel/xs/xs.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xs/xs.c	Mon Aug 08 18:43:57 2005 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xs/xs.c	Tue Aug 09 08:44:29 2005 +0000
     1.3 @@ -253,12 +253,10 @@ static PyObject *xspy_get_permissions(Py
     1.4      }
     1.5      val = PyList_New(perms_n);
     1.6      for (i = 0; i < perms_n; i++, perms++) {
     1.7 -        PyObject *p = Py_BuildValue("{s:i,s:i,s:i,s:i,s:i}",
     1.8 +        PyObject *p = Py_BuildValue("{s:i,s:i,s:i}",
     1.9                                      "dom",   perms->id,
    1.10                                      "read",  (perms->perms & XS_PERM_READ),
    1.11 -                                    "write", (perms->perms & XS_PERM_WRITE),
    1.12 -                                    "exist", (perms->perms & XS_PERM_ENOENT_OK),
    1.13 -                                    "owner", (perms->perms & XS_PERM_OWNER));
    1.14 +                                    "write",  (perms->perms & XS_PERM_WRITE));
    1.15          PyList_SetItem(val, i, p);
    1.16      }
    1.17   exit:
    1.18 @@ -281,8 +279,7 @@ static PyObject *xspy_set_permissions(Py
    1.19      static char *arg_spec = "sO";
    1.20      char *path = NULL;
    1.21      PyObject *perms = NULL;
    1.22 -    static char *perm_names[] = { "dom", "read", "write", "create", "owner",
    1.23 -				  NULL };
    1.24 +    static char *perm_names[] = { "dom", "read", "write", NULL };
    1.25      static char *perm_spec = "i|iiii";
    1.26  
    1.27      struct xs_handle *xh = xshandle(self);
    1.28 @@ -315,15 +312,9 @@ static PyObject *xspy_set_permissions(Py
    1.29          int dom = 0;
    1.30          /* Read/write perms. Set these. */
    1.31          int p_read = 0, p_write = 0;
    1.32 -        /* Create/owner perms. Ignore them.
    1.33 -         * This is so the output from get_permissions() can be used
    1.34 -         * as input to set_permissions().
    1.35 -         */
    1.36 -        int p_create = 0, p_owner = 0;
    1.37          PyObject *p = PyList_GetItem(perms, i);
    1.38          if (!PyArg_ParseTupleAndKeywords(tuple0, p, perm_spec, perm_names,
    1.39 -					 &dom, &p_read, &p_write, &p_create,
    1.40 -					 &p_owner))
    1.41 +					 &dom, &p_read, &p_write))
    1.42              goto exit;
    1.43          xsperms[i].id = dom;
    1.44          if (p_read)