]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper
authorAndrew Bartlett <abartlet@samba.org>
Tue, 7 Aug 2012 00:45:14 +0000 (10:45 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 7 Aug 2012 04:57:07 +0000 (14:57 +1000)
source3/smbd/pysmbd.c

index 9a44d259ab02cb3141363c46cf4ea8c81656fbfc..612304c4e56d75a2e5b448d630dacf2b9243bcc6 100644 (file)
@@ -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;