From 236977bf4642c035bb22cfcd1cee481c5f6c6da1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 13 Nov 2012 12:48:53 -0800 Subject: 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 --- source3/smbd/pysmbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/smbd/pysmbd.c') 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); -- cgit