diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-21 23:59:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-21 23:59:04 +0000 |
commit | bfa013908f2b0e3c8c9bed4c6f5c6ec9ee0931cc (patch) | |
tree | 46bf027c5c1343636de3ef30eef2882bfa776886 /source3/smbd | |
parent | 35c65576f71bb95f1bda5909c3a3cf32665a0dd4 (diff) | |
download | samba-bfa013908f2b0e3c8c9bed4c6f5c6ec9ee0931cc.tar.gz samba-bfa013908f2b0e3c8c9bed4c6f5c6ec9ee0931cc.tar.bz2 samba-bfa013908f2b0e3c8c9bed4c6f5c6ec9ee0931cc.zip |
Fixed 'revalidate' parameter so it's only considered in security=share
mode.
Jeremy.
(This used to be commit 7727f09ea9055053ed1d3e2af1069ddae245efb4)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/password.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index a8d9ece557..0f2efcc1da 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -1469,38 +1469,38 @@ BOOL authorise_login(int snum,char *user,char *password, int pwlen, /* now check the list of session users */ - if (!ok) - { - char *auser; - char *user_list = strdup(session_users); - if (!user_list) return(False); + if (!ok) + { + char *auser; + char *user_list = strdup(session_users); + if (!user_list) return(False); - for (auser=strtok(user_list,LIST_SEP); - !ok && auser; - auser = strtok(NULL,LIST_SEP)) - { - fstring user2; - fstrcpy(user2,auser); - if (!user_ok(user2,snum)) continue; + for (auser=strtok(user_list,LIST_SEP); + !ok && auser; + auser = strtok(NULL,LIST_SEP)) + { + fstring user2; + fstrcpy(user2,auser); + if (!user_ok(user2,snum)) continue; - if (password_ok(user2,password, pwlen, NULL)) { - ok = True; - fstrcpy(user,user2); - DEBUG(3,("ACCEPTED: session list username and given password ok\n")); - } - } - free(user_list); - } - - /* check for a previously validated username/password pair */ - if (!ok && !lp_revalidate(snum) && - (vuser != 0) && !vuser->guest && - user_ok(vuser->name,snum)) { - fstrcpy(user,vuser->name); - *guest = False; - DEBUG(3,("ACCEPTED: validated uid ok as non-guest\n")); - ok = True; + if (password_ok(user2,password, pwlen, NULL)) { + ok = True; + fstrcpy(user,user2); + DEBUG(3,("ACCEPTED: session list username and given password ok\n")); + } } + free(user_list); + } + + /* check for a previously validated username/password pair */ + if (!ok && (!lp_revalidate(snum) || lp_security() > SEC_SHARE) && + (vuser != 0) && !vuser->guest && + user_ok(vuser->name,snum)) { + fstrcpy(user,vuser->name); + *guest = False; + DEBUG(3,("ACCEPTED: validated uid ok as non-guest\n")); + ok = True; + } /* check for a rhosts entry */ if (!ok && user_ok(user,snum) && check_hosts_equiv(user)) { |