summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-06-16 22:46:27 +0200
committerStefan Metzmacher <metze@samba.org>2017-06-27 16:57:48 +0200
commitee4ea4b99cd7977cd388fe375e23468f927fa41d (patch)
treef105f338deeb7baa07a01fb2d1acc4164681c84a /source4/auth
parent60bee9d118a3d05e1415223aafd612904b9e869a (diff)
downloadsamba-ee4ea4b99cd7977cd388fe375e23468f927fa41d.tar.gz
s4:auth/ntlm: move auth_check_password_wrapper() further down
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/ntlm/auth.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index cbe49a12adc..580834f50a0 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -186,43 +186,6 @@ _PUBLIC_ NTSTATUS auth_check_password(struct auth4_context *auth_ctx,
return status;
}
-static NTSTATUS auth_check_password_wrapper(struct auth4_context *auth_ctx,
- TALLOC_CTX *mem_ctx,
- const struct auth_usersupplied_info *user_info,
- uint8_t *pauthoritative,
- void **server_returned_info,
- DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key)
-{
- struct auth_user_info_dc *user_info_dc;
- NTSTATUS status;
-
- status = auth_check_password(auth_ctx, mem_ctx, user_info,
- &user_info_dc, pauthoritative);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- *server_returned_info = user_info_dc;
-
- if (user_session_key) {
- DEBUG(10, ("Got NT session key of length %u\n",
- (unsigned)user_info_dc->user_session_key.length));
- *user_session_key = user_info_dc->user_session_key;
- talloc_steal(mem_ctx, user_session_key->data);
- user_info_dc->user_session_key = data_blob_null;
- }
-
- if (lm_session_key) {
- DEBUG(10, ("Got LM session key of length %u\n",
- (unsigned)user_info_dc->lm_session_key.length));
- *lm_session_key = user_info_dc->lm_session_key;
- talloc_steal(mem_ctx, lm_session_key->data);
- user_info_dc->lm_session_key = data_blob_null;
- }
-
- return NT_STATUS_OK;
-}
-
struct auth_check_password_state {
struct auth4_context *auth_ctx;
const struct auth_usersupplied_info *user_info;
@@ -497,6 +460,43 @@ _PUBLIC_ NTSTATUS auth_check_password_recv(struct tevent_req *req,
return NT_STATUS_OK;
}
+static NTSTATUS auth_check_password_wrapper(struct auth4_context *auth_ctx,
+ TALLOC_CTX *mem_ctx,
+ const struct auth_usersupplied_info *user_info,
+ uint8_t *pauthoritative,
+ void **server_returned_info,
+ DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key)
+{
+ struct auth_user_info_dc *user_info_dc;
+ NTSTATUS status;
+
+ status = auth_check_password(auth_ctx, mem_ctx, user_info,
+ &user_info_dc, pauthoritative);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ *server_returned_info = user_info_dc;
+
+ if (user_session_key) {
+ DEBUG(10, ("Got NT session key of length %u\n",
+ (unsigned)user_info_dc->user_session_key.length));
+ *user_session_key = user_info_dc->user_session_key;
+ talloc_steal(mem_ctx, user_session_key->data);
+ user_info_dc->user_session_key = data_blob_null;
+ }
+
+ if (lm_session_key) {
+ DEBUG(10, ("Got LM session key of length %u\n",
+ (unsigned)user_info_dc->lm_session_key.length));
+ *lm_session_key = user_info_dc->lm_session_key;
+ talloc_steal(mem_ctx, lm_session_key->data);
+ user_info_dc->lm_session_key = data_blob_null;
+ }
+
+ 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, and because
* we need to break a depenency loop between the DCE/RPC layer and the