From: Christof Schmitt Date: Mon, 13 Aug 2018 22:07:20 +0000 (-0700) Subject: s3/lib:popt_common: Move setup_logging to common callback X-Git-Tag: samba-4.8.8~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c708d9e3567eeab4a9907480a36989a5556cc69;p=thirdparty%2Fsamba.git s3/lib:popt_common: Move setup_logging to common callback The flag is set in the common callback, so be consistent BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme (cherry picked from commit dff1028e8ba4c70e726283c12531853681034014) --- diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index cc93a756c3b..454884fbb5c 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -93,6 +93,10 @@ static void popt_common_callback(poptContext con, } } + if (override_logfile) { + setup_logging(lp_logfile(talloc_tos()), DEBUG_FILE ); + } + /* Further 'every Samba program must do this' hooks here. */ return; } @@ -288,10 +292,6 @@ static void popt_common_credentials_callback(poptContext con, if (reason == POPT_CALLBACK_REASON_POST) { bool ok; - if (override_logfile) { - setup_logging(lp_logfile(talloc_tos()), DEBUG_FILE ); - } - ok = lp_load_client(get_dyn_CONFIGFILE()); if (!ok) { const char *pname = poptGetInvocationName(con);