From 37d53832a4623653f706e77985a79d84bd7c6694 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 28 Sep 2007 01:17:46 +0000 Subject: r25398: Parse loadparm context to all lp_*() functions. (This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238) --- source4/utils/testparm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/utils/testparm.c') diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c index d8b6069791..71ff937a51 100644 --- a/source4/utils/testparm.c +++ b/source4/utils/testparm.c @@ -44,28 +44,28 @@ configuration settings. ************************************************/ -static int do_global_checks(void) +static int do_global_checks(struct loadparm_context *lp_ctx) { int ret = 0; - if (!directory_exist(lp_lockdir())) { + if (!directory_exist(lp_lockdir(lp_ctx))) { fprintf(stderr, "ERROR: lock directory %s does not exist\n", - lp_lockdir()); + lp_lockdir(lp_ctx)); ret = 1; } - if (!directory_exist(lp_piddir())) { + if (!directory_exist(lp_piddir(lp_ctx))) { fprintf(stderr, "ERROR: pid directory %s does not exist\n", - lp_piddir()); + lp_piddir(lp_ctx)); ret = 1; } - if (strlen(lp_winbind_separator()) != 1) { + if (strlen(lp_winbind_separator(lp_ctx)) != 1) { fprintf(stderr,"ERROR: the 'winbind separator' parameter must be a single character.\n"); ret = 1; } - if (*lp_winbind_separator() == '+') { + if (*lp_winbind_separator(lp_ctx) == '+') { fprintf(stderr,"'winbind separator = +' might cause problems with group membership.\n"); } @@ -139,16 +139,16 @@ static int do_global_checks(void) /* We need this to force the output */ lp_set_cmdline(global_loadparm, "log level", "2"); - fprintf(stderr,"Load smb config files from %s\n",lp_configfile()); + fprintf(stderr, "Loaded smb config files from %s\n", lp_configfile(global_loadparm)); - if (!lp_load()) { + if (!lp_load(lp_configfile(global_loadparm))) { fprintf(stderr,"Error loading services.\n"); return(1); } fprintf(stderr,"Loaded services file OK.\n"); - ret = do_global_checks(); + ret = do_global_checks(global_loadparm); for (s=0;s