summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-30 11:53:04 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-01-30 08:05:14 +0100
commit3ddb983c10aab6ad8eb2a766accfccb2b3671a3a (patch)
tree2a497c1a4047d8993a0db0914313412fcbe5a20c /source4/auth/ntlm
parentfc035afb6ecdb54e6183be511e886ac07727cc0b (diff)
downloadsamba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.tar.gz
samba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.tar.bz2
samba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.zip
gensec: inline gensec_generate_session_info() into only caller
This avoids casting to and from the struct auth_user_info_dc *user_info_dc to to this, the if (user_info_dc->info->authenticated) is moved into auth_generate_session_info_wrapper(), which is the function that gensec_security->auth_context->generate_session_info points to. Andrew Bartlett
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r--source4/auth/ntlm/auth.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index a654fab096..6dd82e4ae8 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -469,10 +469,16 @@ static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
uint32_t session_info_flags,
struct auth_session_info **session_info)
{
+ NTSTATUS status;
struct auth_user_info_dc *user_info_dc = talloc_get_type_abort(server_returned_info, struct auth_user_info_dc);
- NTSTATUS status = auth_generate_session_info(mem_ctx, auth_context->lp_ctx,
- auth_context->sam_ctx, user_info_dc,
- session_info_flags, session_info);
+
+ if (user_info_dc->info->authenticated) {
+ session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
+ }
+
+ status = auth_generate_session_info(mem_ctx, auth_context->lp_ctx,
+ auth_context->sam_ctx, user_info_dc,
+ session_info_flags, session_info);
if (!NT_STATUS_IS_OK(status)) {
return status;
}