summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-21 17:11:00 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-21 17:11:00 +0000
commit4081147c31919a973ce1859394d0f5a49a0c2f39 (patch)
treefdfd220068f4997652cf469b4cc270e599708148 /source3/smbd
parent4629acd6f509acd0b3761d49f42173bd2ba676b2 (diff)
downloadsamba-4081147c31919a973ce1859394d0f5a49a0c2f39.tar.gz
samba-4081147c31919a973ce1859394d0f5a49a0c2f39.tar.bz2
samba-4081147c31919a973ce1859394d0f5a49a0c2f39.zip
adding user session key into network netlogon response.
(This used to be commit c73f6b0d02fa7700319ba696f54296006167e5d1)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c24
1 files changed, 12 insertions, 12 deletions
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);