From 4081147c31919a973ce1859394d0f5a49a0c2f39 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sun, 21 Nov 1999 17:11:00 +0000 Subject: adding user session key into network netlogon response. (This used to be commit c73f6b0d02fa7700319ba696f54296006167e5d1) --- source3/smbd/password.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 2f0ab6e137..690e2e5f5c 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -467,16 +467,24 @@ SMB hash return True if the password is correct, False otherwise ****************************************************************************/ -BOOL pass_check_smb(char *user, char *domain, uchar *chal, +BOOL pass_check_smb(struct smb_passwd *smb_pass, char *domain, uchar *chal, uchar *lm_pwd, size_t lm_pwd_len, uchar *nt_pwd, size_t nt_pwd_len, struct passwd *pwd, uchar user_sess_key[16]) { const struct passwd *pass; struct passwd pw; - struct smb_passwd *smb_pass; + char *user = NULL; - if (!lm_pwd || !nt_pwd) + if (smb_pass == NULL) + { + DEBUG(3,("Couldn't find user %s in smb_passwd file.\n", user)); + return False; + } + + user = smb_pass->unix_name; + + if (lm_pwd == NULL || nt_pwd == NULL) { return False; } @@ -498,14 +506,6 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal, pass = &pw; } - smb_pass = getsmbpwnam(user); - - if (smb_pass == NULL) - { - DEBUG(3,("Couldn't find user %s in smb_passwd file.\n", user)); - return False; - } - /* Quit if the account was disabled. */ if (smb_pass->acct_ctrl & ACB_DISABLED) { DEBUG(3,("account for user %s was disabled.\n", user)); @@ -563,7 +563,7 @@ BOOL password_ok(char *user, char *password, int pwlen, struct passwd *pwd, return False; } - return pass_check_smb(user, global_myworkgroup, + return pass_check_smb(getsmbpwnam(user), global_myworkgroup, challenge, (uchar *)password, pwlen, (uchar *)password, pwlen, pwd, user_sess_key); -- cgit