From 227d490477230cfdd6b912b6f6a63314fa64ca88 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Aug 2012 10:45:14 +1000 Subject: s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper --- source3/smbd/pysmbd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/smbd') 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; -- cgit