summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-07 10:45:14 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-07 14:57:07 +1000
commit227d490477230cfdd6b912b6f6a63314fa64ca88 (patch)
treeb2b17a2a18fbd80c9a6c94450eb7ac449223eb9a
parent721096b1ad58e97a20896fa74fa8e06013bb8a15 (diff)
downloadsamba-227d490477230cfdd6b912b6f6a63314fa64ca88.tar.gz
samba-227d490477230cfdd6b912b6f6a63314fa64ca88.tar.bz2
samba-227d490477230cfdd6b912b6f6a63314fa64ca88.zip
s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper
-rw-r--r--source3/smbd/pysmbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index 9a44d259ab..612304c4e5 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -254,14 +254,20 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self, PyObject *args)
char *fname;
int uid, gid;
SMB_ACL_T acl;
+ TALLOC_CTX *frame;
if (!PyArg_ParseTuple(args, "sii", &fname, &uid, &gid))
return NULL;
acl = make_simple_acl(uid, gid);
+ frame = talloc_stackframe();
+
status = set_sys_acl_no_snum(fname, SMB_ACL_TYPE_ACCESS, acl);
sys_acl_free_acl(acl);
+
+ TALLOC_FREE(frame);
+
PyErr_NTSTATUS_IS_ERR_RAISE(status);
Py_RETURN_NONE;