summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog4
-rw-r--r--plugins/imuxsock/imuxsock.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e064b2e..26dfda48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------
+Version 4.6.3 [v4-stable] (rgerhards), 2010-03-??
+- bugfix: local unix system log socket was deleted even when it was
+ not configured
+---------------------------------------------------------------------------
Version 4.6.2 [v4-stable] (rgerhards), 2010-03-??
- new feature: "." action type added to support writing files to relative
pathes (this is primarily meant as a debug aid)
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 */