diff options
-rw-r--r-- | lib/param/loadparm.c | 10 | ||||
-rw-r--r-- | script/mks3param.pl | 1 | ||||
-rw-r--r-- | source3/param/loadparm_ctx.c | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 5f2feca51f..9abd11fc30 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -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); +} diff --git a/script/mks3param.pl b/script/mks3param.pl index 3126af502c..376f7ae85f 100644 --- a/script/mks3param.pl +++ b/script/mks3param.pl @@ -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($$) diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c index 61fe97462d..f95965fcae 100644 --- a/source3/param/loadparm_ctx.c +++ b/source3/param/loadparm_ctx.c @@ -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, |