From: Andrew Bartlett Date: Tue, 7 Aug 2012 00:45:14 +0000 (+1000) Subject: s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper X-Git-Tag: ldb-1.1.10~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=227d490477230cfdd6b912b6f6a63314fa64ca88;p=thirdparty%2Fsamba.git s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper --- diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 9a44d259ab0..612304c4e56 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;