From 34695928331e74a44389815cab941a3e673c84ee Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Sep 1997 16:29:36 +0000 Subject: 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) --- source3/smbd/reply.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/smbd') 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)) -- cgit