diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-12-28 10:38:52 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-12-28 22:39:20 +1100 |
commit | 5815a1b7778cd93ca4aad568535e63d06b29fece (patch) | |
tree | 95417d901d6c38a862a3b50a22b34523c56bf67e | |
parent | f7a866a17cd66d95e36248d7b88d9316d7e86e99 (diff) | |
download | samba-5815a1b7778cd93ca4aad568535e63d06b29fece.tar.gz samba-5815a1b7778cd93ca4aad568535e63d06b29fece.tar.bz2 samba-5815a1b7778cd93ca4aad568535e63d06b29fece.zip |
s4-auth Remove unused auth_context_create_from_ldb()
-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; |