summaryrefslogtreecommitdiff
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-12-21 11:43:04 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-12-21 15:10:38 +1100
commit6f7423c7f1cc3a4596a955a90f315ffbf1025c3b (patch)
tree51a80bb8e78545e1e05f8b0b1804e26144ece8cb /source4/auth/gensec
parent1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8 (diff)
downloadsamba-6f7423c7f1cc3a4596a955a90f315ffbf1025c3b.tar.gz
samba-6f7423c7f1cc3a4596a955a90f315ffbf1025c3b.tar.bz2
samba-6f7423c7f1cc3a4596a955a90f315ffbf1025c3b.zip
s4-auth Remove duplicate copies of session_info creation code
We now just do or do not call into LDB based on some flags. This means there may be some more link time dependencies, but we seem to deal with those better now. Andrew Bartlett
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/gensec.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 0cb0d3d476..3c25f3b913 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -1315,18 +1315,22 @@ NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
struct auth_session_info **session_info)
{
NTSTATUS nt_status;
+ uint32_t flags = AUTH_SESSION_INFO_DEFAULT_GROUPS;
+ if (server_info->authenticated) {
+ flags |= AUTH_SESSION_INFO_AUTHENTICATED;
+ }
if (gensec_security->auth_context) {
- uint32_t flags = AUTH_SESSION_INFO_DEFAULT_GROUPS;
- if (server_info->authenticated) {
- flags |= AUTH_SESSION_INFO_AUTHENTICATED;
- }
nt_status = gensec_security->auth_context->generate_session_info(mem_ctx, gensec_security->auth_context,
server_info,
flags,
session_info);
} else {
- nt_status = auth_generate_simple_session_info(mem_ctx,
- server_info, session_info);
+ flags |= AUTH_SESSION_INFO_SIMPLE_PRIVILEGES;
+ nt_status = auth_generate_session_info(mem_ctx,
+ NULL,
+ NULL,
+ server_info, flags,
+ session_info);
}
return nt_status;
}