From fdc03603c1535fc03bcc53ee3f45c85692a00c82 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 3 Nov 2001 00:19:56 +0000 Subject: 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) --- source3/smbd/sesssetup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/smbd') 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); -- cgit