From db8c41e2d5ba00d0c67dd6a3faa9816eaa377b32 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 13 Sep 2005 15:57:35 +0000 Subject: added FROMHOST property to template system - thanks Cristian Testa --- AUTHORS | 3 ++- NEWS | 5 +++++ freebsd/Makefile | 3 +++ linux/Makefile | 2 +- syslogd.c | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 3ebca99a..89d2ccfe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,6 +2,7 @@ Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH Contributors -Andres Riancho (alias APR in code files) +Andres Riancho (andres-dot-riancho-at-gmail-dot-com) + (alias APR in code files) - supplied regexp functionality for the property replacer - a great feature. thanks! diff --git a/NEWS b/NEWS index 4b15c91c..086e90c9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,11 @@ Version 1.10.0 (RGer), 2005-09-?? - added support for a "discard" action. If a selector line with discard (~ character) is found, no selector lines *after* that line will be processed. +- thanks to Andres Riancho, regular expression support has been + added to the template engine +- added the FROMHOST property in the template processor, which could + previously not be obtained. Thanks to Cristian Testa for pointing + this out and even providing a fix. --------------------------------------------------------------------------- Version 1.0.0 (RGer), 2005-09-12 - changed install doc to cover daily cron scripts - a trouble source diff --git a/freebsd/Makefile b/freebsd/Makefile index 118ac159..e73a6460 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -25,6 +25,9 @@ FEATURE_LARGEFILE=1 # on when support for MySQL is desired). FEATURE_DB=0 +# Enable regular expressions +FEATURE_REGEXP=1 + ############################################################# # END OF USER SETTINGS # # -------------------- # diff --git a/linux/Makefile b/linux/Makefile index d93fe933..5fd60168 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -28,7 +28,7 @@ FEATURE_LARGEFILE=1 FEATURE_DB=0 # Enable regular expressions -FEATURE_REGEXP=0 +FEATURE_REGEXP=1 ############################################################# # END OF USER SETTINGS # diff --git a/syslogd.c b/syslogd.c index f9163372..9ba767f3 100644 --- a/syslogd.c +++ b/syslogd.c @@ -2031,6 +2031,8 @@ char *MsgGetProp(struct msg *pMsg, struct templateEntry *pTpe, unsigned short *p pRes = getRawMsg(pMsg); } else if(!strcmp(pName, "UxTradMsg")) { pRes = getUxTradMsg(pMsg); + } else if(!strcmp(pName, "FROMHOST")) { + pRes = getRcvFrom(pMsg); } else if(!strcmp(pName, "source") || !strcmp(pName, "HOSTNAME")) { pRes = getHOSTNAME(pMsg); -- cgit