From fb8ce409fe609f8e195062f07206e264b5eeb396 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Wed, 2 Sep 2009 14:34:00 +0200
Subject: preparing for 4.4.1 release
---
ChangeLog | 2 +-
configure.ac | 2 +-
doc/manual.html | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 13de9eac..b84ad4d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
---------------------------------------------------------------------------
-Version 4.4.1 [v4-stable] (rgerhards), 2009-08-??
+Version 4.4.1 [v4-stable] (rgerhards), 2009-09-02
- features requiring Java are automatically disabled if Java is not
present (thanks to Michael Biebl for his help!)
- bugfix: invalid double-quoted PRI, among others in outgoing messages
diff --git a/configure.ac b/configure.ac
index fec55863..059d68c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[4.4.0],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[4.4.1],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([ChangeLog])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/doc/manual.html b/doc/manual.html
index e2a4f048..e61132c1 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -19,7 +19,7 @@ rsyslog support available directly from the source!
Please visit the rsyslog sponsor's page
to honor the project sponsors or become one yourself! We are very grateful for any help towards the
project goals.
-This documentation is for version 4.4.0 (v4-stable) of rsyslog.
+
This documentation is for version 4.4.1 (v4-stable) of rsyslog.
Visit the rsyslog status page to obtain current
version information and project status.
If you like rsyslog, you might
--
cgit v1.2.3
From eeaeafb87b79844eb49907653a355c0e53fee53b Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Wed, 2 Sep 2009 14:39:42 +0200
Subject: updated project status
---
doc/status.html | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/status.html b/doc/status.html
index 02cc0d70..64fe288d 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -2,7 +2,7 @@
rsyslog status page
rsyslog status page
-This page reflects the status as of 2009-08-21.
+This page reflects the status as of 2009-09-02.
Current Releases
v5 development: 5.1.4 [2009-08-20] -
@@ -19,9 +19,9 @@
change log -
download
-v4 stable: 4.4.0 [2009-08-21] -
-change log -
-download
+
v4 stable: 4.4.1 [2009-09-02] -
+change log -
+download
v3 stable: 3.22.1 [2009-07-02] -
change log -
--
cgit v1.2.3
From 1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Thu, 3 Sep 2009 15:48:57 +0200
Subject: bugfix: reverse lookup reduction logic in imudp do DNS queries too
often
A comparison was done between the current and the former source address.
However, this was done on the full sockaddr_storage structure and not
on the host address only. This has now been changed for IPv4 and IPv6.
The end result of this bug could be a higher UDP message loss rate than
necessary (note that UDP message loss can not totally be avoided due
to the UDP spec)
---
ChangeLog | 9 +++++++++
plugins/imudp/imudp.c | 2 +-
runtime/net.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
runtime/net.h | 4 +++-
4 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b84ad4d8..27dc26b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
---------------------------------------------------------------------------
+Version 4.4.2 [v4-stable] (rgerhards), 2009-09-??
+- bugfix: reverse lookup reduction logic in imudp do DNS queries too often
+ A comparison was done between the current and the former source address.
+ However, this was done on the full sockaddr_storage structure and not
+ on the host address only. This has now been changed for IPv4 and IPv6.
+ The end result of this bug could be a higher UDP message loss rate than
+ necessary (note that UDP message loss can not totally be avoided due
+ to the UDP spec)
+---------------------------------------------------------------------------
Version 4.4.1 [v4-stable] (rgerhards), 2009-09-02
- features requiring Java are automatically disabled if Java is not
present (thanks to Michael Biebl for his help!)
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 57aec9b6..658ceb23 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -180,7 +180,7 @@ processSocket(int fd, struct sockaddr_storage *frominetPrev, int *pbIsPermitted,
/* if we reach this point, we had a good receive and can process the packet received */
/* check if we have a different sender than before, if so, we need to query some new values */
- if(memcmp(&frominet, frominetPrev, socklen) != 0) {
+ if(net.CmpHost(&frominet, frominetPrev, socklen) != 0) {
CHKiRet(net.cvthname(&frominet, fromHost, fromHostFQDN, fromHostIP));
memcpy(frominetPrev, &frominet, socklen); /* update cache indicator */
/* Here we check if a host is permitted to send us
diff --git a/runtime/net.c b/runtime/net.c
index db2d7e37..5cafe522 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -1496,6 +1496,49 @@ int *create_udp_socket(uchar *hostname, uchar *pszPort, int bIsServer)
}
+/* check if two provided socket addresses point to the same host. Note that the
+ * length of the sockets must be provided as third parameter. This is necessary to
+ * compare non IPv4/v6 hosts, in which case we do a simple memory compare of the
+ * address structure (in that case, the same host may not reliably be detected).
+ * Note that we need to do the comparison not on the full structure, because it contains things
+ * like the port, which we do not need to look at when thinking about hostnames. So we look
+ * at the relevant fields, what means a somewhat more complicated processing.
+ * Also note that we use a non-standard calling interface, as this is much more natural and
+ * it looks extremely unlikely that we get an exception of any kind here. What we
+ * return is mimiced after memcmp(), and as such useful for building binary trees
+ * (the order relation may be a bit arbritrary, but at least it is consistent).
+ * rgerhards, 2009-09-03
+ */
+static int CmpHost(struct sockaddr_storage *s1, struct sockaddr_storage* s2, size_t socklen)
+{
+ int ret;
+
+ if(((struct sockaddr*) s1)->sa_family != ((struct sockaddr*) s2)->sa_family) {
+ ret = memcmp(s1, s2, socklen);
+ goto finalize_it;
+ }
+
+ if(((struct sockaddr*) s1)->sa_family == AF_INET) {
+ if(((struct sockaddr_in *) s1)->sin_addr.s_addr == ((struct sockaddr_in*)s2)->sin_addr.s_addr) {
+ ret = 0;
+ } else if(((struct sockaddr_in *) s1)->sin_addr.s_addr < ((struct sockaddr_in*)s2)->sin_addr.s_addr) {
+ ret = -1;
+ } else {
+ ret = 1;
+ }
+ } else if(((struct sockaddr*) s1)->sa_family == AF_INET6) {
+ /* IPv6 addresses are always 16 octets long */
+ ret = memcmp(((struct sockaddr_in6 *)s1)->sin6_addr.s6_addr, ((struct sockaddr_in6*)s2)->sin6_addr.s6_addr, 16);
+ } else {
+ ret = memcmp(s1, s2, socklen);
+ }
+
+dbgprintf("CmpHost returns %d\n", ret);
+finalize_it:
+ return ret;
+}
+
+
/* queryInterface function
* rgerhards, 2008-03-05
*/
@@ -1524,6 +1567,7 @@ CODESTARTobjQueryInterface(net)
pIf->AddPermittedPeer = AddPermittedPeer;
pIf->DestructPermittedPeers = DestructPermittedPeers;
pIf->PermittedPeerWildcardMatch = PermittedPeerWildcardMatch;
+ pIf->CmpHost = CmpHost;
finalize_it:
ENDobjQueryInterface(net)
diff --git a/runtime/net.h b/runtime/net.h
index 092c3116..ec364b1c 100644
--- a/runtime/net.h
+++ b/runtime/net.h
@@ -146,11 +146,13 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */
rsRetVal (*AddPermittedPeer)(permittedPeers_t **ppRootPeer, uchar *pszID);
rsRetVal (*DestructPermittedPeers)(permittedPeers_t **ppRootPeer);
rsRetVal (*PermittedPeerWildcardMatch)(permittedPeers_t *pPeer, uchar *pszNameToMatch, int *pbIsMatching);
+ /* v5 interface additions */
+ int (*CmpHost)(struct sockaddr_storage *, struct sockaddr_storage*, size_t);
/* data members - these should go away over time... TODO */
int *pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */
int *pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */
ENDinterface(net)
-#define netCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */
+#define netCURR_IF_VERSION 5 /* increment whenever you change the interface structure! */
/* prototypes */
PROTOTYPEObj(net);
--
cgit v1.2.3
From 071c9b511a711725537eff386f82a3af3ca930a8 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Sep 2009 14:53:44 +0200
Subject: added $LogRSyslogStatusMessages configuration directive
...permitting to turn off rsyslog start/stop/HUP messages. See Debian
ticket http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463793
---
ChangeLog | 5 +++++
configure.ac | 2 +-
doc/manual.html | 2 +-
doc/rsyslog_conf_global.html | 4 ++++
tools/syslogd.c | 32 ++++++++++++++++++++------------
5 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c5a3a827..d5670ec0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------
+Version 4.7.0 [v4-devel] (rgerhards), 2009-09-??
+- added $LogRSyslogStatusMessages configuration directive
+ permitting to turn off rsyslog start/stop/HUP messages. See Debian
+ ticket http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463793
+---------------------------------------------------------------------------
Version 4.5.3 [v4-beta] (rgerhards), 2009-08-??
- bugfix: message sanitation had some issues:
- control character DEL was not properly escaped
diff --git a/configure.ac b/configure.ac
index 19d738eb..8cba22ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[4.5.2],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[4.7.0],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([ChangeLog])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/doc/manual.html b/doc/manual.html
index e1f7480e..52a8380e 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -19,7 +19,7 @@ rsyslog support available directly from the source!
Please visit the rsyslog sponsor's page
to honor the project sponsors or become one yourself! We are very grateful for any help towards the
project goals.
-This documentation is for version 4.5.2 (v4-beta branch) of rsyslog.
+
This documentation is for version 4.7.0 (v4-devel branch) of rsyslog.
Visit the rsyslog status page
to obtain current version information and project status.
If you like rsyslog, you might
diff --git a/doc/rsyslog_conf_global.html b/doc/rsyslog_conf_global.html
index 2bbb136e..f2642ca4 100644
--- a/doc/rsyslog_conf_global.html
+++ b/doc/rsyslog_conf_global.html
@@ -146,6 +146,10 @@ Usually that should not be a big issue, as the restart-type HUP can easily be re
something along the lines of "/etc/init.d/rsyslog restart".
$IncludeConfigMainMsgQueueCheckpointInterval <number>
+$LogRSyslogStatusMessages [on/off] - If set to on (the default),
+rsyslog emits message on startup and shutdown as well as when it is HUPed.
+This information might be needed by some log analyzers. If set to off, no such
+status messages are logged, what may be useful for other scenarios.
$MainMsgQueueDequeueSlowdown <number> [number
is timeout in microseconds (1000000us is 1sec!),
default 0 (no delay). Simple rate-limiting!]
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 88588621..500b5b1f 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -249,6 +249,8 @@ int bDropTrailingLF = 1; /* drop trailing LF's on reception? */
int iCompatibilityMode = 0; /* version we should be compatible with; 0 means sysklogd. It is
the default, so if no -c option is given, we make ourselvs
as compatible to sysklogd as possible. */
+#define DFLT_bLogStatusMsgs 1
+static int bLogStatusMsgs = DFLT_bLogStatusMsgs; /* log rsyslog start/stop/HUP messages? */
static int bDebugPrintTemplateList = 1;/* output template list in debug mode? */
static int bDebugPrintCfSysLineHandlerList = 1;/* output cfsyslinehandler list in debug mode? */
static int bDebugPrintModuleList = 1;/* output module list in debug mode? */
@@ -332,6 +334,7 @@ getFIOPName(unsigned iFIOP)
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
{
cCCEscapeChar = '#';
+ bLogStatusMsgs = DFLT_bLogStatusMsgs;
bActExecWhenPrevSusp = 0;
iActExecOnceInterval = 0;
bDebugPrintTemplateList = 1;
@@ -1659,7 +1662,7 @@ die(int sig)
thrdTerminateAll();
/* and THEN send the termination log message (see long comment above) */
- if (sig) {
+ if(sig && bLogStatusMsgs) {
(void) snprintf(buf, sizeof(buf) / sizeof(char),
" [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \
"\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"]" " exiting on signal %d.",
@@ -2353,11 +2356,13 @@ init()
/* we now generate the startup message. It now includes everything to
* identify this instance. -- rgerhards, 2005-08-17
*/
- snprintf(bufStartUpMsg, sizeof(bufStartUpMsg)/sizeof(char),
- " [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \
- "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] (re)start",
- (int) myPid);
- logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)bufStartUpMsg, 0);
+ if(bLogStatusMsgs) {
+ snprintf(bufStartUpMsg, sizeof(bufStartUpMsg)/sizeof(char),
+ " [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \
+ "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] (re)start",
+ (int) myPid);
+ logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)bufStartUpMsg, 0);
+ }
memset(&sigAct, 0, sizeof (sigAct));
sigemptyset(&sigAct.sa_mask);
@@ -2506,12 +2511,14 @@ doHUP(void)
{
char buf[512];
- snprintf(buf, sizeof(buf) / sizeof(char),
- " [origin software=\"rsyslogd\" " "swVersion=\"" VERSION
- "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] rsyslogd was HUPed, type '%s'.",
- (int) myPid, glbl.GetHUPisRestart() ? "restart" : "lightweight");
- errno = 0;
- logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)buf, 0);
+ if(bLogStatusMsgs) {
+ snprintf(buf, sizeof(buf) / sizeof(char),
+ " [origin software=\"rsyslogd\" " "swVersion=\"" VERSION
+ "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] rsyslogd was HUPed, type '%s'.",
+ (int) myPid, glbl.GetHUPisRestart() ? "restart" : "lightweight");
+ errno = 0;
+ logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)buf, 0);
+ }
if(glbl.GetHUPisRestart()) {
DBGPRINTF("Received SIGHUP, configured to be restart, reloading rsyslogd.\n");
@@ -2632,6 +2639,7 @@ static rsRetVal loadBuildInModules(void)
* is that rsyslog will terminate if we can not register our built-in config commands.
* This, I think, is the right thing to do. -- rgerhards, 2007-07-31
*/
+ CHKiRet(regCfSysLineHdlr((uchar *)"logrsyslogstatusmessages", 0, eCmdHdlrBinary, NULL, &bLogStatusMsgs, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"actionresumeretrycount", 0, eCmdHdlrInt, NULL, &glbliActionResumeRetryCount, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"defaultruleset", 0, eCmdHdlrGetWord, setDefaultRuleset, NULL, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"ruleset", 0, eCmdHdlrGetWord, setCurrRuleset, NULL, NULL));
--
cgit v1.2.3
From d7cfdcf28c1239908619aadac6ef4fa43f1b93fd Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Fri, 4 Sep 2009 15:11:27 +0200
Subject: clarified use of $ActionsSendStreamDriver[AuthMode/PermittedPeers]
in doc set (require TLS drivers)
---
ChangeLog | 2 ++
doc/rsyslog_conf.html | 8 +++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6f3cbccf..b1c63cfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
---------------------------------------------------------------------------
Version 3.22.2 [v3-stable] (rgerhards), 2009-07-??
- bugfix: sending syslog messages with zip compression did not work
+- clarified use of $ActionsSendStreamDriver[AuthMode/PermittedPeers]
+ in doc set (require TLS drivers)
---------------------------------------------------------------------------
Version 3.22.1 [v3-stable] (rgerhards), 2009-07-02
- bugfix: invalid error message issued if $inlcudeConfig was on an empty
diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html
index 1a24e793..2dc8aa24 100644
--- a/doc/rsyslog_conf.html
+++ b/doc/rsyslog_conf.html
@@ -146,10 +146,12 @@ default 60000 (1 minute)]
$ActionResumeInterval
$ActionResumeRetryCount <number> [default 0, -1 means eternal]
$ActionSendResendLastMsgOnReconn <[on/off]> specifies if the last message is to be resend when a connecition broken and has been reconnedcted. May increase reliability, but comes at the risk of message duplication.
-$ActionSendStreamDriver <driver basename> just like $DefaultNetstreamDriver, but for the specific action
+$ActionSendStreamDriver <driver basename> just like $DefaultNetstreamDriver, but for the specific action.
$ActionSendStreamDriverMode <mode>, default 0, mode to use with the stream driver
-(driver-specific)$ActionSendStreamDriverAuthMode <mode>, authentication mode to use with the stream driver
-(driver-specific)$ActionSendStreamDriverPermittedPeer <ID>, accepted fingerprint (SHA1) or name of remote peer
+(driver-specific)$ActionSendStreamDriverAuthMode <mode>, authentication mode to use with the stream driver. Note that this directive requires TLS
+netstream drivers. For all others, it will be ignored.
+(driver-specific)$ActionSendStreamDriverPermittedPeer <ID>, accepted fingerprint (SHA1) or name of remote peer. Note that this directive requires TLS
+netstream drivers. For all others, it will be ignored.
(driver-specific) - directive may go away!
$AllowedSender
$ControlCharacterEscapePrefix
--
cgit v1.2.3