summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-26 16:38:34 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-26 16:38:34 +0100
commitb67b5b8f73074931285dad4cb2e6d760923a19f8 (patch)
treef6144cdc8f06255ec5ac02cc6f64198f007a33f5 /plugins
parent91a5e176d609d77d4451d7d7b1bf00dfdac5fe50 (diff)
downloadrsyslog-b67b5b8f73074931285dad4cb2e6d760923a19f8.tar.gz
rsyslog-b67b5b8f73074931285dad4cb2e6d760923a19f8.tar.xz
rsyslog-b67b5b8f73074931285dad4cb2e6d760923a19f8.zip
bugfix: local unix system log socket was deleted even when it was not configured
Also made sure that /dev/log will not be processed by imuxsock when running under Solaris -- otherwise, the module may had accidently deleted the log socket and cause problems.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imuxsock/imuxsock.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index 5567a405..1ab67826 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -300,7 +300,16 @@ CODESTARTwillRun
register int i;
/* first apply some config settings */
- startIndexUxLocalSockets = bOmitLocalLogging ? 1 : 0;
+# ifdef OS_SOLARIS
+ /* under solaris, we must NEVER process the local log socket, because
+ * it is implemented there differently. If we used it, we would actually
+ * delete it and render the system partly unusable. So don't do that.
+ * rgerhards, 2010-03-26
+ */
+ startIndexUxLocalSockets = 1;
+# else
+ startIndexUxLocalSockets = bOmitLocalLogging ? 1 : 0;
+# endif
if(pLogSockName != NULL)
funixn[0] = pLogSockName;
@@ -329,7 +338,7 @@ CODESTARTafterRun
close(funix[i]);
/* Clean-up files. */
- for (i = 0; i < nfunix; i++)
+ for(i = startIndexUxLocalSockets; i < nfunix; i++)
if (funixn[i] && funix[i] != -1)
unlink((char*) funixn[i]);
/* free no longer needed string */