s4-auth Remove unused auth_context_create_from_ldb()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 27 Dec 2011 23:38:52 +0000 (10:38 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 28 Dec 2011 11:39:20 +0000 (22:39 +1100)
source4/auth/auth.h
source4/auth/ntlm/auth.c

index ac2327df9dee7e5cc90f8c5e821852a9ae5e701c..ff7a13c967b3157e62af0012d2293f9e5c56f08d 100644 (file)
@@ -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,
index 802bc1b40fbdad1d6b3acd5c2a7484c0b98cd3e3..3a4ddaec5e8c2c6ccb0187fe695c770dec95b0aa 100644 (file)
@@ -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;