From a834a73e341059be154426390304a42e4a011f72 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 25 Sep 2002 15:19:00 +0000 Subject: sync'ing up for 3.0alpha20 release (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139) --- source3/auth/auth_sam.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'source3/auth/auth_sam.c') diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 155370546a..bc98f46dc2 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -106,7 +106,10 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB ntv2_response, client_key_data = data_blob(ntv2_response.data+16, ntv2_response.length-16); memcpy(client_response, ntv2_response.data, sizeof(client_response)); - ntv2_owf_gen(part_passwd, user, domain, kr); + if (!ntv2_owf_gen(part_passwd, user, domain, kr)) { + return False; + } + SMBOWFencrypt_ntv2(kr, sec_blob, client_key_data, value_from_encryption); if (user_sess_key != NULL) { @@ -233,17 +236,17 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context, return NT_STATUS_OK; } else { if (lp_ntlm_auth()) { - /* Apparently NT accepts NT responses in the LM feild - - I think this is related to Win9X pass-though authenticaion + /* Apparently NT accepts NT responses in the LM field + - I think this is related to Win9X pass-though authentication */ - DEBUG(4,("sam_password_ok: Checking NT MD4 password in LM feild\n")); + DEBUG(4,("sam_password_ok: Checking NT MD4 password in LM field\n")); if (smb_pwd_check_ntlmv1(user_info->lm_resp, nt_pw, auth_context->challenge, user_sess_key)) { return NT_STATUS_OK; } else { - DEBUG(3,("sam_password_ok: NT MD4 password in LM feild failed for user %s\n",pdb_get_username(sampass))); + DEBUG(3,("sam_password_ok: NT MD4 password in LM field failed for user %s\n",pdb_get_username(sampass))); return NT_STATUS_WRONG_PASSWORD; } } @@ -403,9 +406,9 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context, return nt_status; } - if (!make_server_info_sam(server_info, sampass)) { - DEBUG(0,("failed to malloc memory for server_info\n")); - return NT_STATUS_NO_MEMORY; + if (!NT_STATUS_IS_OK(nt_status = make_server_info_sam(server_info, sampass))) { + DEBUG(0,("check_sam_security: make_server_info_sam() failed with '%s'\n", nt_errstr(nt_status))); + return nt_status; } lm_hash = pdb_get_lanman_passwd((*server_info)->sam_account); -- cgit