Skip to content

Commit

Permalink
param: Connect lp_security to the lib/param code to allow tests
Browse files Browse the repository at this point in the history
Pair-Programmed-With: Amitay Isaacs <[email protected]>
  • Loading branch information
abartlet committed Nov 16, 2011
1 parent 29cd8ae commit 3ac3de7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions script/mks3param.pl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ ($$)
$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($$)
Expand Down
1 change: 1 addition & 0 deletions source3/param/loadparm_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3ac3de7

Please sign in to comment.