diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-29 12:47:43 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-29 12:47:43 +0200 |
commit | 151c22e579d6de345d9ac7971ba1ba2f41b88976 (patch) | |
tree | cb77b8db83c306852b4e40618bad148e1c8b2517 /tools | |
parent | 4822715a6e1ecc48d50a5450f93f02f785b8745a (diff) | |
parent | 8515376ac9b8549a4b93d87455df626cca0199b7 (diff) | |
download | rsyslog-151c22e579d6de345d9ac7971ba1ba2f41b88976.tar.gz rsyslog-151c22e579d6de345d9ac7971ba1ba2f41b88976.tar.xz rsyslog-151c22e579d6de345d9ac7971ba1ba2f41b88976.zip |
Merge branch 'beta' into master
Conflicts:
tools/syslogd.c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 10d07c95..3204d94e 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -2805,7 +2805,6 @@ static rsRetVal mainThread() glbl.SetHUPisRestart(0); /* we can not do restart-type HUPs with dropped privs */ } - /* finally let the inputs run... */ runInputModules(); @@ -2815,6 +2814,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: |