mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4/pyauth: check ldb argument in py_user_session()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
ec1e56989b
commit
a7e0741372
@ -190,6 +190,10 @@ static PyObject *py_user_session(PyObject *module, PyObject *args, PyObject *kwa
|
||||
}
|
||||
|
||||
ldb_ctx = pyldb_Ldb_AsLdbContext(py_ldb);
|
||||
if (ldb_ctx == NULL) {
|
||||
talloc_free(mem_ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (py_dn == Py_None) {
|
||||
user_dn = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user