diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-28 01:17:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:25 -0500 |
commit | 37d53832a4623653f706e77985a79d84bd7c6694 (patch) | |
tree | 265e308027d6641bbdb29a4feddbe86ef8b25fd1 /source4/utils/testparm.c | |
parent | e09226cb35d627affddc08c4a88527184b8ffcf9 (diff) | |
download | samba-37d53832a4623653f706e77985a79d84bd7c6694.tar.gz samba-37d53832a4623653f706e77985a79d84bd7c6694.tar.bz2 samba-37d53832a4623653f706e77985a79d84bd7c6694.zip |
r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
Diffstat (limited to 'source4/utils/testparm.c')
-rw-r--r-- | source4/utils/testparm.c | 20 |
1 files changed, 10 insertions, 10 deletions
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<lp_numservices(global_loadparm);s++) { struct loadparm_service *service = lp_servicebynum(global_loadparm, s); |