From 9e7885f00f65299efc923a654e7f0929ddcba22e Mon Sep 17 00:00:00 2001 From: Augustin Fabre Date: Sun, 29 May 2022 14:17:45 +0200 Subject: [PATCH 1/2] Stop sending log messages to client when in debug mode inetd(8) sends the contents of stdout AND stderr to the client. This means that configuring syslog(3) with LOG_PERROR (print messages to stderr) is a bad idea. --- src/log.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/log.c b/src/log.c index 5da10af..32acc2c 100644 --- a/src/log.c +++ b/src/log.c @@ -27,9 +27,7 @@ void log_init(int enable, int debug) _enable = enable; - openlog(PROGNAME, - LOG_PID | (debug ? LOG_PERROR : 0), - LOG_DAEMON); + openlog(PROGNAME, LOG_PID, LOG_DAEMON); setlogmask(_LOG_UPTO(debug ? LOG_DEBUG : LOG_INFO)); } From 74b3b0adfab927edef95e694a47cf8789f45e370 Mon Sep 17 00:00:00 2001 From: Augustin Fabre Date: Sun, 29 May 2022 14:22:03 +0200 Subject: [PATCH 2/2] Fix description of `-d' in manual page Setting option `-d' has no effect on /server-status. --- gophernicus.8 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gophernicus.8 b/gophernicus.8 index f60c545..80f010e 100644 --- a/gophernicus.8 +++ b/gophernicus.8 @@ -196,9 +196,7 @@ Disable execution of gophermaps and scripts. Disable HTTP response to HTTP GET and POST requests. .It Fl d Print debug output in -.Xr syslog 3 -and -.Pa /server-status . +.Xr syslog 3 . When .Fl ns (disable