summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/python/py_ntsec.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/python/py_ntsec.c b/source3/python/py_ntsec.c
index f9881f5a55..8981f0c3ac 100644
--- a/source3/python/py_ntsec.c
+++ b/source3/python/py_ntsec.c
@@ -45,8 +45,6 @@ BOOL py_from_SID(PyObject **obj, DOM_SID *sid)
BOOL py_to_SID(DOM_SID *sid, PyObject *obj)
{
- BOOL result;
-
if (!PyString_Check(obj))
return False;
@@ -264,11 +262,23 @@ BOOL py_to_SECDESC(SEC_DESC **sd, PyObject *dict, TALLOC_CTX *mem_ctx)
}
}
+#if 0 /* For new secdesc code */
*sd = make_sec_desc(mem_ctx, revision,
got_owner_sid ? &owner_sid : NULL,
got_group_sid ? &group_sid : NULL,
got_sacl ? &sacl : NULL,
got_dacl ? &dacl : NULL);
-
+#else
+ {
+ size_t sd_size;
+
+ *sd = make_sec_desc(mem_ctx, revision,
+ got_owner_sid ? &owner_sid : NULL,
+ got_group_sid ? &group_sid : NULL,
+ got_sacl ? &sacl : NULL,
+ got_dacl ? &dacl : NULL, &sd_size);
+ }
+#endif
+
return True;
}