param: Connect lp_security to the lib/param code to allow tests
authorAndrew Bartlett <abartlet@samba.org>
Thu, 10 Nov 2011 06:11:18 +0000 (17:11 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 16 Nov 2011 23:34:09 +0000 (00:34 +0100)
Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>

lib/param/loadparm.c
script/mks3param.pl
source3/param/loadparm_ctx.c

index 5f2feca51fd957d9a07c7fa300ba8e297118fa51..9abd11fc307bfc097557952ef0664abcaf44a2e5 100644 (file)
@@ -3733,3 +3733,13 @@ int lpcfg_server_role(struct loadparm_context *lp_ctx)
                                   (lp_ctx->globals->domain_master == true) ||
                                   (lp_ctx->globals->domain_master == Auto));
 }
+
+int lpcfg_security(struct loadparm_context *lp_ctx)
+{
+       if (lp_ctx->s3_fns) {
+               return lp_ctx->s3_fns->security();
+       }
+
+       return lp_find_security(lp_ctx->globals->server_role,
+                               lp_ctx->globals->security);
+}
index 3126af502c3ca4295e8ca4b006561b845fd8f7af..376f7ae85f8e722fef68344df432af5c2cd63929 100644 (file)
@@ -96,6 +96,7 @@ sub print_header($$)
        $file->("\tbool (*set_cmdline)(const char *pszParmName, const char *pszParmValue);\n");
        $file->("\tvoid (*dump)(FILE *f, bool show_defaults, int maxtoprint);\n");
        $file->("\tint (*server_role)(void);\n");
+       $file->("\tint (*security)(void);\n");
 }
 
 sub print_footer($$) 
index 61fe97462d33b6e10cb1637ba5c8d8a95dc6299a..f95965fcaefccec5ab6cb21711c24aa179a11e52 100644 (file)
@@ -74,6 +74,7 @@ static const struct loadparm_s3_context s3_fns =
        .dump = lp_dump,
 
        .server_role = lp_server_role,
+       .security = lp_security,
 
        .winbind_separator = lp_winbind_separator,
        .template_homedir = lp_template_homedir,