summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-11-03 00:19:56 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-11-03 00:19:56 +0000
commit4db8d70ad74cdbd74c0578e66377fd0233195aaa (patch)
tree13863b06a3ecf9c445051b0301bf70fa0bb413fb
parent83c2d7977445b511989b449959141aeed4bcf0b7 (diff)
downloadsamba-4db8d70ad74cdbd74c0578e66377fd0233195aaa.tar.gz
samba-4db8d70ad74cdbd74c0578e66377fd0233195aaa.tar.xz
samba-4db8d70ad74cdbd74c0578e66377fd0233195aaa.zip
Move the test for non-SPNEGO session setups when using SPNEGO, becouse its a
perfectly vailid behaviour for guest logins.
-rw-r--r--source/smbd/sesssetup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c
index 85ffadea085..ce0e0d585ea 100644
--- a/source/smbd/sesssetup.c
+++ b/source/smbd/sesssetup.c
@@ -496,11 +496,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
return reply_sesssetup_and_X_spnego(conn, inbuf, outbuf, length, bufsize);
}
- if (global_spnego_negotiated) {
- DEBUG(0,("reply_sesssetup_and_X: Rejecting attempt at 'normal' session setup after negotiating spnego.\n"));
- return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
- }
-
smb_bufsize = SVAL(inbuf,smb_vwv2);
if (Protocol < PROTOCOL_NT1) {
@@ -635,6 +630,11 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
if (!*user) {
pstrcpy(user,lp_guestaccount(-1));
guest = True;
+ } else {
+ if (global_spnego_negotiated) {
+ DEBUG(0,("reply_sesssetup_and_X: Rejecting attempt at 'normal' session setup after negotiating spnego.\n"));
+ return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
+ }
}
pstrcpy(current_user_info.smb_name,user);