summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-12 16:29:36 +0000
committerJeremy Allison <jra@samba.org>1997-09-12 16:29:36 +0000
commit34695928331e74a44389815cab941a3e673c84ee (patch)
tree529c2429a9d0dd10082d68466a5733d235a46a2c /source3
parent30416c0b8a0f54f6cc1179c2e00860eaf5f58401 (diff)
downloadsamba-34695928331e74a44389815cab941a3e673c84ee.tar.gz
samba-34695928331e74a44389815cab941a3e673c84ee.tar.bz2
samba-34695928331e74a44389815cab941a3e673c84ee.zip
Added fix that means if connecting user sends guest account
with no password they are seen as guest. Previous patch broke this. Jeremy (jallison@whistle.com) (This used to be commit 9a55c49626f65627b26417795891260bb2afcc27)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 773063131a..228d8ad669 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -268,7 +268,7 @@ int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize)
}
else
{
- char *fsname = "NTFS";
+ char *fsname = "SAMBA";
char *p;
set_message(outbuf,3,3,True);
@@ -459,6 +459,13 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
add_session_user(user);
+ /* Check if the given username was the guest user with no password.
+ We need to do this check after add_session_user() as that
+ call can potentially change the username (via map_user).
+ */
+
+ if(!guest && strequal(user,lp_guestaccount(-1)) && (*smb_apasswd == 0))
+ guest = True;
if (!guest && !(lp_security() == SEC_SERVER && server_validate(inbuf)) &&
!check_hosts_equiv(user))