diff options
author | Andreas Schneider <asn@samba.org> | 2021-01-11 09:52:36 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-04-29 03:58:37 +0000 |
commit | 3467214cf967641f4e4001a9dfea870f933fc2a3 (patch) | |
tree | 218d8b03a2a3f1afb1a610b4ecff4c712371ae51 /source3/winbindd/winbindd.c | |
parent | c7b1d2d11cfc348e654375fc1e880bf4e1773b88 (diff) | |
download | samba-3467214cf967641f4e4001a9dfea870f933fc2a3.tar.gz |
s3: Remove --log-stdout from daemons
The common cmdline parser provides --debug-stdout.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd.c')
-rw-r--r-- | source3/winbindd/winbindd.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 3b0fecf08a0..02da60cb9fa 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1589,20 +1589,11 @@ int main(int argc, const char **argv) enum { OPT_DAEMON = 1000, OPT_FORK, - OPT_NO_PROCESS_GROUP, - OPT_LOG_STDOUT + OPT_NO_PROCESS_GROUP }; struct poptOption long_options[] = { POPT_AUTOHELP { - .longName = "stdout", - .shortName = 'S', - .argInfo = POPT_ARG_NONE, - .arg = NULL, - .val = OPT_LOG_STDOUT, - .descrip = "Log to stdout", - }, - { .longName = "foreground", .shortName = 'F', .argInfo = POPT_ARG_NONE, @@ -1702,8 +1693,6 @@ int main(int argc, const char **argv) break; case 'i': interactive = True; - log_stdout = True; - Fork = False; break; case OPT_FORK: Fork = false; @@ -1711,9 +1700,6 @@ int main(int argc, const char **argv) case OPT_NO_PROCESS_GROUP: no_process_group = true; break; - case OPT_LOG_STDOUT: - log_stdout = true; - break; case 'n': opt_nocache = true; break; @@ -1745,6 +1731,12 @@ int main(int argc, const char **argv) exit(1); } + log_stdout = (debug_get_log_type() == DEBUG_STDOUT); + if (interactive) { + Fork = true; + log_stdout = true; + } + if (log_stdout && Fork) { d_fprintf(stderr, "\nERROR: " "Can't log to stdout (-S) unless daemon is in foreground +(-F) or interactive (-i)\n\n"); |