summaryrefslogtreecommitdiffstats
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-04-19 21:50:13 +0200
committerAndrew Bartlett <abartlet@samba.org>2009-04-19 21:50:13 +0200
commit8ee7b4ce29b678ceb34680f556ab1a28a8bea9c5 (patch)
tree1dc3842e5f1caec1632e4174b8cd01ff44496c2e /source3/auth
parent0c771bfc70fecf25fbb4aa090bfdd14811b1f3bb (diff)
downloadsamba-8ee7b4ce29b678ceb34680f556ab1a28a8bea9c5.tar.gz
samba-8ee7b4ce29b678ceb34680f556ab1a28a8bea9c5.tar.xz
samba-8ee7b4ce29b678ceb34680f556ab1a28a8bea9c5.zip
s3:auth Fix segfault: Always initialise returned session keys
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_sam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index d6edd010260..a2634feb6c0 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -44,6 +44,9 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
const char *username = pdb_get_username(sampass);
bool got_lm = false, got_nt = false;
+ *user_sess_key = data_blob(NULL, 0);
+ *lm_sess_key = data_blob(NULL, 0);
+
acct_ctrl = pdb_get_acct_ctrl(sampass);
if (acct_ctrl & ACB_PWNOTREQ) {
if (lp_null_passwords()) {
@@ -77,7 +80,6 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
return NT_STATUS_NO_MEMORY;
}
SMBsesskeygen_ntv1(nt_pw, user_sess_key->data);
- *lm_sess_key = data_blob(NULL, 0);
return hash_password_check(mem_ctx, lp_lanman_auth(),
got_lm ? &client_lm_hash : NULL,
got_nt ? &client_nt_hash : NULL,