summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-16 22:03:15 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-16 22:03:15 +0000
commit0262b2a6b49d3a2418e3f335f06cbb227382bc86 (patch)
tree58ebf23aef7856deb3ea905025b9f3c3e5a0971b /source3
parent13407e69b5666955d92b6ade1b98c1147a6ca911 (diff)
downloadsamba-0262b2a6b49d3a2418e3f335f06cbb227382bc86.tar.gz
samba-0262b2a6b49d3a2418e3f335f06cbb227382bc86.tar.bz2
samba-0262b2a6b49d3a2418e3f335f06cbb227382bc86.zip
copy of password struct needed to be made prior to calling copy_passwd_struct
found by Bertl <bs@vpnet.at>. (This used to be commit 93298bca1c573532c5250c84bac39cf9214ba3b5)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/password.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 1f1ca12713..022d432787 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -472,6 +472,7 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
struct passwd *pwd, uchar user_sess_key[16])
{
const struct passwd *pass;
+ struct passwd pw;
struct smb_passwd *smb_pass;
if (!lm_pwd || !nt_pwd)
@@ -487,12 +488,13 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
else
{
pass = Get_Pwnam(user,True);
- }
-
- if (pass == NULL)
- {
- DEBUG(3,("Couldn't find user %s\n",user));
- return False;
+ if (pass == NULL)
+ {
+ DEBUG(3,("Couldn't find user %s\n",user));
+ return False;
+ }
+ memcpy(&pw, pass, sizeof(struct passwd));
+ pass = &pw;
}
smb_pass = getsmbpwnam(user);