git.samba.org
/
abartlet
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b495c4
)
auth:credentials: Check for NT hash being NULL
author
Jo Sutton
<josutton@catalyst.net.nz>
Mon, 6 May 2024 23:43:48 +0000
(11:43 +1200)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 16 May 2024 02:09:24 +0000
(14:09 +1200)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
auth/credentials/pycredentials.c
patch
|
blob
|
history
diff --git
a/auth/credentials/pycredentials.c
b/auth/credentials/pycredentials.c
index 0bcb894f92068c00a73e844140ce4752bfa0d149..8008bd0418d5b424cf6625dcb9fd7b1e87277999 100644
(file)
--- a/
auth/credentials/pycredentials.c
+++ b/
auth/credentials/pycredentials.c
@@
-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);