summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-12-21 10:19:53 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-12-21 15:10:38 +1100
commit1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8 (patch)
tree3a481279183723fdbc3a33977d7bf43196d1b80b /source4/auth/ntlm
parent94a59b781ccc5a552a9141484740255977db4637 (diff)
downloadsamba-1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8.tar.gz
samba-1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8.tar.bz2
samba-1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8.zip
s4-auth rework session_info handling not to require an auth context
This reverts a previous move to have this based around the auth subsystem, which just spread auth deps all over unrelated code. Andrew Bartlett
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r--source4/auth/ntlm/auth.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index f7de0201b6..0c6c8ef52c 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -408,6 +408,19 @@ _PUBLIC_ NTSTATUS auth_check_password_recv(struct tevent_req *req,
return NT_STATUS_OK;
}
+/* Wrapper because we don't want to expose all callers to needing to
+ * know that session_info is generated from the main ldb */
+static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
+ struct auth_context *auth_context,
+ struct auth_serversupplied_info *server_info,
+ uint32_t session_info_flags,
+ struct auth_session_info **session_info)
+{
+ return auth_generate_session_info(mem_ctx, auth_context->lp_ctx,
+ auth_context->sam_ctx, server_info,
+ session_info_flags, session_info);
+}
+
/***************************************************************************
Make a auth_info struct for the auth subsystem
- Allow the caller to specify the methods to use, including optionally the SAM to use
@@ -476,7 +489,7 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
ctx->set_challenge = auth_context_set_challenge;
ctx->challenge_may_be_modified = auth_challenge_may_be_modified;
ctx->get_server_info_principal = auth_get_server_info_principal;
- ctx->generate_session_info = auth_generate_session_info;
+ ctx->generate_session_info = auth_generate_session_info_wrapper;
*auth_ctx = ctx;