From 90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0 Mon Sep 17 00:00:00 2001 From: nadezhda ivanova Date: Thu, 23 Apr 2009 17:18:23 +0300 Subject: Fix of a bug in the security.descriptor.as_sddl() method security.descriptor.as_sddl() method did not work correctly when invoked without supplying the domain sid. Returned the same value as when the sid was provided. Test added for this case in libcli/security/tests/bindings.py Signed-off-by: Jelmer Vernooij --- source4/librpc/ndr/py_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/ndr') diff --git a/source4/librpc/ndr/py_security.c b/source4/librpc/ndr/py_security.c index 43c1d50d66..1b54aab02a 100644 --- a/source4/librpc/ndr/py_security.c +++ b/source4/librpc/ndr/py_security.c @@ -198,7 +198,7 @@ static PyObject *py_descriptor_as_sddl(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|O", &py_sid)) return NULL; - if (py_sid == Py_None) + if (py_sid != Py_None) sid = py_talloc_get_ptr(py_sid); else sid = NULL; -- cgit