summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-03-02 14:40:19 +0100
committerRalph Boehme <slow@samba.org>2018-03-16 03:03:31 +0100
commit1957bf11f127fc08c6622999cadc7dd580ac7d3b (patch)
tree8ee359fc64d9e0365170c62d5c97ddec657deee8 /source3/auth
parent0ee9a550944034718ea188b277cca4b6fc5fbc5c (diff)
downloadsamba-1957bf11f127fc08c6622999cadc7dd580ac7d3b.tar.gz
s3:auth: make use of make_{server,session}_info_anonymous()
It's important to have them separated from make_{server,session}_info_guest(), because there's a fundamental difference between anonymous (the client requested no authentication) and guest (the server lies about the authentication failure). When it's really an anonymous connection, we should reflect that in the resulting session info. This should fix a problem where Windows 10 tries to join a Samba hosted NT4 domain and has SMB2/3 enabled. We no longer return SMB_SETUP_GUEST or SMB2_SESSION_FLAG_IS_GUEST for true anonymous connections. The commit message from a few commit before shows the resulting auth_session_info change. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13328 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Mar 16 03:03:31 CET 2018 on sn-devel-144
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_builtin.c2
-rw-r--r--source3/auth/auth_ntlmssp.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index 0fa95d9f16d..a2d95a77330 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -81,7 +81,7 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
break;
}
- return make_server_info_guest(NULL, server_info);
+ return make_server_info_anonymous(NULL, server_info);
}
/* Guest modules initialisation */
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index fd629fd9a03..2e345e17571 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -65,10 +65,7 @@ NTSTATUS auth3_generate_session_info(struct auth4_context *auth_context,
cmp = dom_sid_compare(sid, &global_sid_Anonymous);
if (cmp == 0) {
- /*
- * TODO: use auth_anonymous_session_info() here?
- */
- return make_session_info_guest(mem_ctx, session_info);
+ return make_session_info_anonymous(mem_ctx, session_info);
}
return NT_STATUS_INTERNAL_ERROR;