mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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 9a55c49626
)
This commit is contained in:
parent
30416c0b8a
commit
3469592833
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user