The Samba-Bugzilla – Attachment 10902 Details for
Bug 9955
Please implement command line option to log to syslog only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
nmbd/nmbd.c
nmbd_nmbd.patch (text/plain), 2.00 KB, created by
Marcos Mello
on 2015-03-22 20:59:13 UTC
(
hide
)
Description:
nmbd/nmbd.c
Filename:
MIME Type:
Creator:
Marcos Mello
Created:
2015-03-22 20:59:13 UTC
Size:
2.00 KB
patch
obsolete
>--- nmbd/nmbd.c.orig 2009-05-23 17:38:05.000000000 +0000 >+++ nmbd/nmbd.c 2009-05-24 02:34:13.000000000 +0000 >@@ -740,7 +740,10 @@ > static bool opt_interactive; > static bool Fork = true; > static bool no_process_group; >- static bool log_stdout; >+ static bool log_stdout = false; >+#ifdef WITH_SYSLOG >+ static bool syslog_only = false; >+#endif > poptContext pc; > char *p_lmhosts = NULL; > int opt; >@@ -749,6 +752,9 @@ > OPT_INTERACTIVE, > OPT_FORK, > OPT_NO_PROCESS_GROUP, >+#ifdef WITH_SYSLOG >+ OPT_SYSLOG_ONLY, >+#endif > OPT_LOG_STDOUT > }; > struct poptOption long_options[] = { >@@ -758,6 +764,9 @@ > {"foreground", 'F', POPT_ARG_NONE, NULL, OPT_FORK, "Run daemon in foreground (for daemontools & etc)" }, > {"no-process-group", 0, POPT_ARG_NONE, NULL, OPT_NO_PROCESS_GROUP, "Don't create a new process group" }, > {"log-stdout", 'S', POPT_ARG_NONE, NULL, OPT_LOG_STDOUT, "Log to stdout" }, >+#ifdef WITH_SYSLOG >+ {"syslog-only", 'L', POPT_ARG_NONE, NULL, OPT_SYSLOG_ONLY, "Log to syslog" }, >+#endif > {"hosts", 'H', POPT_ARG_STRING, &p_lmhosts, 'H', "Load a netbios hosts file"}, > {"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" }, > POPT_COMMON_SAMBA >@@ -787,6 +796,11 @@ > case OPT_LOG_STDOUT: > log_stdout = true; > break; >+#ifdef WITH_SYSLOG >+ case OPT_SYSLOG_ONLY: >+ syslog_only = true; >+ break; >+#endif > default: > d_fprintf(stderr, "\nInvalid option %s: %s\n\n", > poptBadOption(pc, 0), poptStrerror(opt)); >@@ -838,11 +852,24 @@ > log_stdout = True; > } > >+#ifdef WITH_SYSLOG >+ if( syslog_only ) { >+ debug_set_syslog_only(); >+ } >+#endif >+ > if ( log_stdout && Fork ) { > DEBUG(0,("ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n")); > exit(1); > } > >+#ifdef WITH_SYSLOG >+ if ( log_stdout && syslog_only ) { >+ DEBUG(0,("ERROR: Can't log to stdout (-S) and syslog only (-L) at the same time\n")); >+ exit(1); >+ } >+#endif >+ > setup_logging( argv[0], log_stdout ); > > reopen_logs();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9955
:
10901
| 10902 |
10903
|
10904