summaryrefslogtreecommitdiff
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
commitfdc03603c1535fc03bcc53ee3f45c85692a00c82 (patch)
tree1279c3024ba031fb39cabe6c3c4a15e1bd11dfa7
parent015aa4244b3feb8c2b8e0e5f037b9af344927ed8 (diff)
downloadsamba-fdc03603c1535fc03bcc53ee3f45c85692a00c82.tar.gz
samba-fdc03603c1535fc03bcc53ee3f45c85692a00c82.tar.bz2
samba-fdc03603c1535fc03bcc53ee3f45c85692a00c82.zip
Move the test for non-SPNEGO session setups when using SPNEGO, becouse its a
perfectly vailid behaviour for guest logins. (This used to be commit 4db8d70ad74cdbd74c0578e66377fd0233195aaa)
-rw-r--r--source3/smbd/sesssetup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 85ffadea08..ce0e0d585e 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/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);