summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-05 14:14:23 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-05 14:14:23 +0200
commita8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3 (patch)
tree020ab62e213bb3c88f1a977cd1bb0b2af9e9bc18
parentf285420d1731555eb9eb6717fc9c875651ab7c91 (diff)
parenta3953fbee90045b96bd5ef44b64883a6bff57fee (diff)
downloadrsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.gz
rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.xz
rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.zip
Merge branch 'v4-stable' into v4-beta
Conflicts: ChangeLog
-rw-r--r--ChangeLog7
-rw-r--r--runtime/msg.c14
-rw-r--r--tools/rsyslog.conf.516
3 files changed, 23 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 60735183..7e958ce3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
---------------------------------------------------------------------------
+Version 4.7.5 [v4-beta] (al), 2011-??-??
+- bugfix: potential misadressing in property replacer
+---------------------------------------------------------------------------
Version 4.7.4 [v4-beta] (rgerhards), 2011-07-11
- added support for the ":omusrmsg:" syntax in configuring user messages
- added support for the ":omfile:" syntax in configuring user messages
@@ -75,6 +78,9 @@ Version 4.7.0 [v4-devel] (rgerhards), 2010-04-14
(bugs require certain non-standard settings to appear)
Thanks to varmojfekoj for the patch [imported from 4.5.8]
---------------------------------------------------------------------------
+Version 4.6.8 [v4-stable] (rgerhards), 2011-??-??
+- bugfix: potential misadressing in property replacer
+---------------------------------------------------------------------------
Version 4.6.7 [v4-stable] (rgerhards), 2011-07-11
- added support for the ":omusrmsg:" syntax in configuring user messages
- added support for the ":omfile:" syntax in configuring user messages
@@ -781,6 +787,7 @@ Version 3.22.4 [v3-stable] (rgerhards), 2010-??-??
offset
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=271
- improved some code based on clang static analyzer results
+- bugfix: potential misadressing in property replacer
---------------------------------------------------------------------------
Version 3.22.3 [v3-stable] (rgerhards), 2010-11-24
- bugfix(important): problem in TLS handling could cause rsyslog to loop
diff --git a/runtime/msg.c b/runtime/msg.c
index c450d6bd..6a01827c 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2827,7 +2827,13 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
}
/* check for "." and ".." (note the parenthesis in the if condition!) */
- if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) {
+ if(*pRes == '\0') {
+ if(*pbMustBeFreed == 1)
+ free(pRes);
+ pRes = UCHAR_CONSTANT("_");
+ bufLen = 1;
+ *pbMustBeFreed = 0;
+ } else if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) {
uchar *pTmp = pRes;
if(*(pRes + 1) == '\0')
@@ -2837,12 +2843,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
if(*pbMustBeFreed == 1)
free(pTmp);
*pbMustBeFreed = 0;
- } else if(*pRes == '\0') {
- if(*pbMustBeFreed == 1)
- free(pRes);
- pRes = UCHAR_CONSTANT("_");
- bufLen = 1;
- *pbMustBeFreed = 0;
}
}
diff --git a/tools/rsyslog.conf.5 b/tools/rsyslog.conf.5
index e17da974..6ce3c0e0 100644
--- a/tools/rsyslog.conf.5
+++ b/tools/rsyslog.conf.5
@@ -272,14 +272,16 @@ Please note that rsyslogd offers a variety of options in regarding to remote
forwarding. For full details, please see the html documentation.
.SS List of users
-Usually critical messages are also directed to ``root'' on that machine. You can specify a list
-of users that shall get the message by simply writing the login. You may specify more than one
-user by separating them with commas (','). If they're logged in they get the message. Don't
-think a mail would be sent, that might be too late.
+Usually critical messages are also directed to ``root'' on that machine. You
+can specify a list
+of users that shall get the message by simply writing ":omusrmsg:" followed
+by the login name. You may specify more than one
+user by separating them with commas (','). If they're logged in they
+get the message (for example: ":omusrmsg:root,user1,user2").
.SS Everyone logged on
Emergency messages often go to all users currently online to notify them that something strange
-is happening with the system. To specify this wall(1)-feature use an asterisk ('*').
+is happening with the system. To specify this wall(1)-feature use an ":omusrmsg:*".
.SS Database table
This allows logging of the message to a database table.
@@ -558,10 +560,10 @@ that space.
Keep in mind that $outchannel just defines a channel with "name". It does not activate it.
To do so, you must use a selector line (see below). That selector line includes the channel
-name plus an $ sign in front of it. A sample might be:
+name plus ":omfile:$" in front of it. A sample might be:
.sp
.RS
-*.* $mychannel
+*.* :omfile:$mychannel
.RE
.SH PROPERTY REPLACER