1
0
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:
Douglas Bagnall 2018-04-24 12:37:02 +12:00 committed by Andrew Bartlett
parent ec1e56989b
commit a7e0741372

View File

@ -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;