summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-06 01:37:14 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-06 01:37:14 +0000
commitb8b228d9615352f552a534c30076032d4e2dd3ef (patch)
tree20ae3fb0179e26b159f006b8570db780b9cc78aa /source3
parentb283dba09d1ad7bcf14066071cf2df8de95a9b12 (diff)
downloadsamba-b8b228d9615352f552a534c30076032d4e2dd3ef.tar.gz
samba-b8b228d9615352f552a534c30076032d4e2dd3ef.tar.bz2
samba-b8b228d9615352f552a534c30076032d4e2dd3ef.zip
Get this code back to where it belongs...
Apparently (and I will doublecheck) its legal to do an annoymous session setup when we negoitiated SPNEGO, but we can't do an authenticated one becouse we didn't give a challange. Andrew Bartlett (This used to be commit 08a5c5bf940fac7a779be01db01ae7d97df80f79)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index c6cb40fcda..a159111319 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -681,6 +681,13 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n", domain, user, remote_machine));
if (*user) {
+ if (global_spnego_negotiated) {
+
+ /* This has to be here, becouse this is a perfectly valid behaviour for guest logons :-( */
+
+ DEBUG(0,("reply_sesssetup_and_X: Rejecting attempt at 'normal' session setup after negotiating spnego.\n"));
+ return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
+ }
pstrcpy(sub_user, user);
} else {
pstrcpy(sub_user, lp_guestaccount());
@@ -704,13 +711,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
}
if (!*user) {
- if (global_spnego_negotiated) {
-
- /* This has to be here, becouse this is a perfectly valid behaviour for guest logons :-( */
-
- DEBUG(0,("reply_sesssetup_and_X: Rejecting attempt at 'normal' session setup after negotiating spnego.\n"));
- return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
- }
nt_status = check_guest_password(&server_info);