]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth/credentials: Allow resetting bind DN on Credentials object
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 28 Apr 2022 23:51:18 +0000 (11:51 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 5 May 2023 02:54:30 +0000 (02:54 +0000)
Passing None into set_bind_dn() now resets it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
auth/credentials/pycredentials.c

index 013d2958ea2465f399eac071e7d17bf76fb58f94..41a9d597435e90608498dc90b16adb3a2ce2f1f3 100644 (file)
@@ -389,7 +389,7 @@ static PyObject *py_creds_set_bind_dn(PyObject *self, PyObject *args)
                PyErr_Format(PyExc_TypeError, "Credentials expected");
                return NULL;
        }
-       if (!PyArg_ParseTuple(args, "s", &newval))
+       if (!PyArg_ParseTuple(args, "z", &newval))
                return NULL;
 
        return PyBool_FromLong(cli_credentials_set_bind_dn(creds, newval));