diff options
author | Roel van Meer <rolek@bokxing.nl> | 2010-05-21 14:17:17 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-05-21 14:17:17 -0700 |
commit | 366333c08fe1d26276a90391dcec0526a65cb2a2 (patch) | |
tree | f372bbb10fe616083a9a35cef2cbc7321fc16815 /source3 | |
parent | efb29227fa46e2c9420b3158ef7422aea4f5846e (diff) | |
download | samba-366333c08fe1d26276a90391dcec0526a65cb2a2.tar.gz samba-366333c08fe1d26276a90391dcec0526a65cb2a2.tar.xz samba-366333c08fe1d26276a90391dcec0526a65cb2a2.zip |
Fix bug #7448 - smbd crash when sambaLMPassword and sambaNTPassword entries missing from ldap.
Protect SMBsesskeygen_ntv1() from a NULL pointer.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/check_samsec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c index bd8cb4bb64..db2bde7bbc 100644 --- a/source3/auth/check_samsec.c +++ b/source3/auth/check_samsec.c @@ -78,6 +78,9 @@ static NTSTATUS sam_password_ok(TALLOC_CTX *mem_ctx, } if (client_lm_hash || client_nt_hash) { + if (!nt_pw) { + return NT_STATUS_WRONG_PASSWORD; + } *user_sess_key = data_blob_talloc(mem_ctx, NULL, 16); if (!user_sess_key->data) { return NT_STATUS_NO_MEMORY; |