mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
auth:credentials: Check for NT hash being NULL
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
2b495c44a2
commit
7b02221c4f
@ -544,6 +544,9 @@ static PyObject *py_creds_get_nt_hash(PyObject *self, PyObject *unused)
|
||||
return NULL;
|
||||
}
|
||||
ntpw = cli_credentials_get_nt_hash(creds, creds);
|
||||
if (ntpw == NULL) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
ret = PyBytes_FromStringAndSize(discard_const_p(char, ntpw->hash), 16);
|
||||
TALLOC_FREE(ntpw);
|
||||
|
Loading…
Reference in New Issue
Block a user