diff options
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"); |