summaryrefslogtreecommitdiff
path: root/source3/smbd/pysmbd.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-11-13 12:48:53 -0800
committerAndrew Bartlett <abartlet@samba.org>2012-11-13 22:48:19 +0100
commit236977bf4642c035bb22cfcd1cee481c5f6c6da1 (patch)
treefcec6c3d337a98120db720753b07bcf7163a2011 /source3/smbd/pysmbd.c
parenta4434297f19a3520d0f2ac242d4e99576d927ecc (diff)
downloadsamba-236977bf4642c035bb22cfcd1cee481c5f6c6da1.tar.gz
samba-236977bf4642c035bb22cfcd1cee481c5f6c6da1.tar.bz2
samba-236977bf4642c035bb22cfcd1cee481c5f6c6da1.zip
Change get_nt_acl_no_snum() to return an NTSTATUS, not a struct security_descriptor *.
Internally change the implementation to use SMB_VFS_GET_NT_ACL() instead of SMB_VFS_FGET_NT_ACL() with a faked-up file struct. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/pysmbd.c')
-rw-r--r--source3/smbd/pysmbd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index 436e881b10..42694cb47c 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -495,11 +495,13 @@ static PyObject *py_smbd_get_nt_acl(PyObject *self, PyObject *args)
PyObject *py_sd;
struct security_descriptor *sd;
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
+ NTSTATUS status;
if (!PyArg_ParseTuple(args, "si", &fname, &security_info_wanted))
return NULL;
- sd = get_nt_acl_no_snum(tmp_ctx, fname, security_info_wanted);
+ status = get_nt_acl_no_snum(tmp_ctx, fname, security_info_wanted, &sd);
+ PyErr_NTSTATUS_IS_ERR_RAISE(status);
py_sd = py_return_ndr_struct("samba.dcerpc.security", "descriptor", sd, sd);