From f741f656737f4ec46cd318e986b6bf412ed309d2 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 19 Nov 2001 02:49:53 +0000 Subject: Store some path names in global variables initialized to configure default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58) --- source3/rpcclient/rpcclient.c | 9 ++++----- source3/rpcclient/samsync.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 66e84fc1a9..773548a7db 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -620,8 +620,7 @@ static void usage(void) BOOL interactive = True; int opt; int olddebug; - pstring cmdstr = "", - servicesf = CONFIGFILE; + pstring cmdstr = ""; struct ntuser_creds creds; struct cli_state cli; fstring password, @@ -661,7 +660,7 @@ static void usage(void) break; case 's': - pstrcpy(servicesf, optarg); + pstrcpy(dyn_CONFIGFILE, optarg); break; case 'U': { @@ -710,8 +709,8 @@ static void usage(void) /* Load smb.conf file */ /* FIXME! How to get this DEBUGLEVEL to last over lp_load()? */ olddebug = DEBUGLEVEL; - if (!lp_load(servicesf,True,False,False)) { - fprintf(stderr, "Can't load %s\n", servicesf); + if (!lp_load(dyn_CONFIGFILE,True,False,False)) { + fprintf(stderr, "Can't load %s\n", dyn_CONFIGFILE); } DEBUGLEVEL = olddebug; diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index 7bdc49e793..9cd5c481b5 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -222,7 +222,7 @@ static struct cli_state *init_connection(struct cli_state *cli, int main(int argc, char **argv) { BOOL do_sam_sync = False, do_sam_repl = False; - pstring servicesf = CONFIGFILE; + pstring servicesf = dyn_CONFIGFILE; struct cli_state cli; NTSTATUS result; int opt; @@ -295,7 +295,7 @@ static struct cli_state *init_connection(struct cli_state *cli, /* Initialise samba */ - slprintf(debugf, sizeof(debugf) - 1, "%s/log.%s", LOGFILEBASE, + slprintf(debugf, sizeof(debugf) - 1, "%s/log.%s", dyn_LOGFILEBASE, "samsync"); setup_logging("samsync", interactive); -- cgit