1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/cmdline
Ralph Boehme 877183ac0b lib/cmdline: restore pre-4.15 logging behaviour for daemons
For servers ensure logging is configured to go to a logfile unless in
interactive mode by calling setup_logging() before lp_load_global() is
called.

In 4.14 servers had the chance to call setup_logging(getprogname(),
DEBUG_FILE) before they called lp_load_*() explicitly in the server.

Now in 4.15 lp_load_*() is called internally when parsing the command
line arguments triggered by the server running the poptGetNextOpt()
loop, so it's too late when the server calls
setup_logging(getprogname(), DEBUG_FILE) as lots of debugging from
lp_load_()* was already written to DEBUG_DEFAULT_STDERR.

Note that there's a chicken and egg problem *within* this patchset:
this change here breaks stdout logging for servers until the servers
are converted to use the new POPT_COMMON_DAEMON. The only way to
address that would be squashing all changes into one patchset, but for
the sake of reviewability (is that an actual english word? :)) I chose
to split the changes.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2021-09-06 13:26:35 +00:00
..
tests lib:cmdline: Add sanity check for options 2021-04-28 03:43:34 +00:00
cmdline_private.h lib/cmdline: add POPT_COMMON_DAEMON daemon popt options 2021-09-06 13:26:35 +00:00
cmdline_s3.c lib/cmdline: restore pre-4.15 logging behaviour for daemons 2021-09-06 13:26:35 +00:00
cmdline_s4.c lib:cmdline: Parse cmdline options with popt 2021-04-28 03:43:34 +00:00
cmdline.c lib/cmdline: add POPT_COMMON_DAEMON daemon popt options 2021-09-06 13:26:35 +00:00
cmdline.h lib/cmdline: add POPT_COMMON_DAEMON daemon popt options 2021-09-06 13:26:35 +00:00
wscript lib:cmdline: Add samba_cmdline_burn() 2021-04-28 03:43:34 +00:00