summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-29 12:46:00 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-29 12:46:00 +0200
commit8515376ac9b8549a4b93d87455df626cca0199b7 (patch)
treed586f908ea3eaa1d9eb402e840fba5b30f431b78
parent301ac7591ada58671cf6a02646a7481bf1bfa469 (diff)
parent6511278082a7e1e9602385cd24cdb5e363cb702f (diff)
downloadrsyslog-8515376ac9b8549a4b93d87455df626cca0199b7.tar.gz
rsyslog-8515376ac9b8549a4b93d87455df626cca0199b7.tar.xz
rsyslog-8515376ac9b8549a4b93d87455df626cca0199b7.zip
Merge branch 'v4-stable' into beta
Conflicts: ChangeLog
-rw-r--r--ChangeLog6
-rw-r--r--tools/syslogd.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 53a7b28c..b9352957 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,12 @@ Version 4.3.0 [DEVEL] (rgerhards), 2009-04-17
execution. The most probable case for such a case would be invalid
sql inside the template, and this is now much easier to diagnose.
---------------------------------------------------------------------------
+Version 4.2.1 [v4-stable] (rgerhards), 2009-0?-??
+- bugfix: stderr/stdout were not closed to be able to emit error messages,
+ but this caused ssh sessions to hang. Now we close them after the
+ initial initialization. See forum thread:
+ http://kb.monitorware.com/controlling-terminal-issues-t9875.html
+---------------------------------------------------------------------------
Version 4.2.0 [v4-stable] (rgerhards), 2009-06-23
- bugfix: light and full delay watermarks had invalid values, badly
affecting performance for delayable inputs
diff --git a/tools/syslogd.c b/tools/syslogd.c
index f686a769..ff6369c3 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -3238,7 +3238,6 @@ static rsRetVal mainThread()
glbl.SetHUPisRestart(0); /* we can not do restart-type HUPs with dropped privs */
}
-
/* END OF INTIALIZATION
* ... but keep in mind that we might do a restart and thus init() might
* be called again. If that happens, we must shut down the worker thread,
@@ -3247,6 +3246,19 @@ static rsRetVal mainThread()
*/
DBGPRINTF("initialization completed, transitioning to regular run mode\n");
+ /* close stderr and stdout if they are kept open during a fork. Note that this
+ * may introduce subtle security issues: if we are in a jail, one may break out of
+ * it via these descriptors. But if I close them earlier, error messages will (once
+ * again) not be emitted to the user that starts the daemon. As root jail support
+ * is still in its infancy (and not really done), we currently accept this issue.
+ * rgerhards, 2009-06-29
+ */
+ if(!(Debug || NoFork)) {
+ close(1);
+ close(2);
+ bErrMsgToStderr = 0;
+ }
+
mainloop();
finalize_it: