diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-18 20:21:32 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-18 20:21:32 +0000 |
commit | 612111c7a1a048d19e24b5e2e4d426247d320d1e (patch) | |
tree | 1a24304f1f3b3a171fbe6deab8711d63f3a6b965 /source3/smbd/reply.c | |
parent | 8b904f4ecc7b6bd6558d40fda4184112bbb10366 (diff) | |
download | samba-612111c7a1a048d19e24b5e2e4d426247d320d1e.tar.gz samba-612111c7a1a048d19e24b5e2e4d426247d320d1e.tar.xz samba-612111c7a1a048d19e24b5e2e4d426247d320d1e.zip |
charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map
twice.
charset.h: Changes to support charset changes.
client.c: Changes to support charset changes.
loadparm.c: follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch>
nmbd.c: Changes to support charset changes.
nmblookup.c:Changes to support charset changes.
proto.h: Changes to support charset changes.
reply.c: Don't call security=server with no user/no password guest. Fix from
Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu>
server.c: follow symlinks code from David Clerc <David.Clerc@cui.unige.ch>
smbpasswd.c:Changes to support charset changes.
status.c: Changes to support charset changes.
testparm.c: Changes to support charset changes.
testprns.c: Changes to support charset changes.
uid.c: Fixed log message with no \n.
Jeremy (jallison@whistle.com)
(This used to be commit 2a28a6e5e461aca7fe6c19cd01d287010056cffb)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 315c7fbb51..5869588664 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -409,8 +409,14 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) } + /* If no username is sent use the guest account */ if (!*user) - strcpy(user,lp_guestaccount(-1)); + { + strcpy(user,lp_guestaccount(-1)); + /* If no user and no password then set guest flag. */ + if( *smb_apasswd == 0) + guest = True; + } strlower(user); @@ -421,24 +427,22 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) add_session_user(user); - if (!(lp_security() == SEC_SERVER && server_validate(inbuf)) && + if (!guest && !(lp_security() == SEC_SERVER && server_validate(inbuf)) && !check_hosts_equiv(user)) { - if (strequal(user,lp_guestaccount(-1)) && (*smb_apasswd == 0)) - guest = True; - /* now check if it's a valid username/password */ /* If an NT password was supplied try and validate with that - first. This is superior as the passwords are mixed case 128 length unicode */ - if(smb_ntpasslen && !guest) + first. This is superior as the passwords are mixed case + 128 length unicode */ + if(smb_ntpasslen) { if(!password_ok(user,smb_ntpasswd,smb_ntpasslen,NULL)) DEBUG(0,("NT Password did not match ! Defaulting to Lanman\n")); else valid_nt_password = True; } - if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL)) + if (!valid_nt_password && !password_ok(user,smb_apasswd,smb_apasslen,NULL)) { if (!computer_id && lp_security() >= SEC_USER) { #if (GUEST_SESSSETUP == 0) |