diff options
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r-- | source4/auth/gensec/gensec.c | 16 |
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; } |