summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-06 04:08:24 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-06 04:08:24 +0000
commit7a58c800ed8e86a26b2db44a417ebaadb0dd48b7 (patch)
treeb3f1a194b8bb921357a985470d1eaedaeaaf449e /source3
parent22512215508c709bd7c68fe40511d3cd68f06c45 (diff)
downloadsamba-7a58c800ed8e86a26b2db44a417ebaadb0dd48b7.tar.gz
samba-7a58c800ed8e86a26b2db44a417ebaadb0dd48b7.tar.bz2
samba-7a58c800ed8e86a26b2db44a417ebaadb0dd48b7.zip
fixed bug where we looked at the first byte of a password to determine
if the password is blank. That ain't valid with encrypted passwords! Jeremy, this changes the semantics of session setup. We no longer automatically set guest=True when the client happens to choose their username == the guest username. Instead we rely on the map_to_guest code. I'm pretty sure this is now the right thing, but please look at it carefully before putting it in 2.2 This is the bug that was causing the build farm to sometimes fail. Basically we failed every 256 attempts - ie. when the first byte of the encrypted password happened to be 0 (This used to be commit 4b35a3494c53fe38532fc12cf1c57e1a3715ad0f)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 21a4eca714..da0417203d 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -873,10 +873,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
/* If no username is sent use the guest account */
if (!*user) {
- pstrcpy(user,lp_guestaccount(-1));
- /* If no user and no password then set guest flag. */
- if( *smb_apasswd == 0)
- guest = True;
+ pstrcpy(user,lp_guestaccount(-1));
+ guest = True;
}
pstrcpy(current_user_info.smb_name,user);
@@ -924,13 +922,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
add_session_user(user);
- /*
- * Check if the given username was the guest user with no password.
- */
-
- if(!guest && strequal(user,lp_guestaccount(-1)) && (*smb_apasswd == 0))
- guest = True;
-
/*
* Check with orig_user for security=server and
* security=domain.
@@ -942,7 +933,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
smb_apasslen, smb_ntpasswd, smb_ntpasslen) &&
!check_hosts_equiv(user))
{
-
/*
* If we get here then the user wasn't guest and the remote
* authentication methods failed. Check the authentication