diff options
-rw-r--r-- | source4/auth/auth.h | 1 | ||||
-rw-r--r-- | source4/auth/ntlm/auth.c | 26 |
2 files changed, 0 insertions, 27 deletions
diff --git a/source4/auth/auth.h b/source4/auth/auth.h index ac2327df9d..ff7a13c967 100644 --- a/source4/auth/auth.h +++ b/source4/auth/auth.h @@ -204,7 +204,6 @@ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, struct imessaging_context *msg, struct loadparm_context *lp_ctx, struct auth4_context **auth_ctx); -NTSTATUS auth_context_create_from_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struct auth4_context **auth_ctx); NTSTATUS auth_check_password(struct auth4_context *auth_ctx, TALLOC_CTX *mem_ctx, diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index 802bc1b40f..3a4ddaec5e 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -552,32 +552,6 @@ _PUBLIC_ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, return status; } -/* Create an auth context from an open LDB. - - This allows us not to re-open the LDB when we need to do a some authentication logic (such as tokenGroups) - - */ -NTSTATUS auth_context_create_from_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struct auth4_context **auth_ctx) -{ - NTSTATUS status; - const char **auth_methods; - struct loadparm_context *lp_ctx = talloc_get_type_abort(ldb_get_opaque(ldb, "loadparm"), struct loadparm_context); - struct tevent_context *ev = ldb_get_event_context(ldb); - - TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); - if (!tmp_ctx) { - return NT_STATUS_NO_MEMORY; - } - - auth_methods = auth_methods_from_lp(tmp_ctx, lp_ctx); - if (!auth_methods) { - return NT_STATUS_INVALID_PARAMETER; - } - status = auth_context_create_methods(mem_ctx, auth_methods, ev, NULL, lp_ctx, ldb, auth_ctx); - talloc_free(tmp_ctx); - return status; -} - /* the list of currently registered AUTH backends */ static struct auth_backend { const struct auth_operations *ops; |