s4-auth Move default auth methods back into auth.c
authorAndrew Bartlett <abartlet@samba.org>
Mon, 6 Jun 2011 23:07:52 +0000 (09:07 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 6 Jun 2011 23:11:01 +0000 (09:11 +1000)
This changes auth_methods_from_lp to no longer use the parametric
options, and to cope with ROLE_DOMAIN_BDC and ROLE_DOMAIN_PDC.  This
will assist in calling the source4 auth subsystem with a source3
derived lp_ctx.

Andrew Bartlett

source4/auth/ntlm/auth.c
source4/param/loadparm.c

index 72338ac3c9c3faba4ab4028b0f4b322dca144f0e..2308b1594d4df8ddd9912762a210b1fb79398571 100644 (file)
@@ -488,15 +488,17 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
 const char **auth_methods_from_lp(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
 {
        const char **auth_methods = NULL;
+
        switch (lpcfg_server_role(lp_ctx)) {
        case ROLE_STANDALONE:
-               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
+               auth_methods = str_list_make(mem_ctx, "anonymous sam_ignoredomain", NULL);
                break;
        case ROLE_DOMAIN_MEMBER:
-               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
+               auth_methods = str_list_make(mem_ctx, "anonymous sam winbind", NULL);
                break;
-       case ROLE_DOMAIN_CONTROLLER:
-               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
+       case ROLE_DOMAIN_BDC:
+       case ROLE_DOMAIN_PDC:
+               auth_methods = str_list_make(mem_ctx, "anonymous sam_ignoredomain winbind", NULL);
                break;
        }
        return auth_methods;
index fba09fa2c484097c5bc0a8f6b8964f8472eda90f..ae29f69fea50fabdd354e66ba3d43603a815e279 100644 (file)
@@ -2464,9 +2464,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lpcfg_do_global_parameter(lp_ctx, "ntptr providor", "simple_ldb");
        /* the winbind method for domain controllers is for both RODC
           auth forwarding and for trusted domains */
-       lpcfg_do_global_parameter(lp_ctx, "auth methods:domain controller", "anonymous sam_ignoredomain winbind");
-       lpcfg_do_global_parameter(lp_ctx, "auth methods:member server", "anonymous sam winbind");
-       lpcfg_do_global_parameter(lp_ctx, "auth methods:standalone", "anonymous sam_ignoredomain");
        lpcfg_do_global_parameter(lp_ctx, "private dir", dyn_PRIVATE_DIR);
        lpcfg_do_global_parameter(lp_ctx, "spoolss database", "spoolss.ldb");
        lpcfg_do_global_parameter(lp_ctx, "wins config database", "wins_config.ldb");