diff options
author | Roel van Meer <rolek@bokxing.nl> | 2010-05-21 14:17:17 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-06-18 08:33:27 +0200 |
commit | fc48f6e03afb6bf8f78694f5bfe8a3ab09289cef (patch) | |
tree | 267d8ad69348842f1248093f20fa9181e087c0df /source3 | |
parent | c7f814f13f0657441256a9a9bd5a046603cc7a06 (diff) | |
download | samba-fc48f6e03afb6bf8f78694f5bfe8a3ab09289cef.tar.gz |
Fix bug #7448 - smbd crash when sambaLMPassword and sambaNTPassword entries missing from ldap.
Protect SMBsesskeygen_ntv1() from a NULL pointer.
(cherry picked from commit 4c5a1b6b17b5575ea943eaf0472453222579365a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_sam.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index bd99b3ac75f..3ac4cdb8c8a 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -78,6 +78,9 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context, } 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; |