diff options
author | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:32 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:32 +0100 |
commit | 6baee6e64e3c9427ced7724d2e4378e1d00dbf11 (patch) | |
tree | f13652cbe6290fa8ce8931278b7a94e0e6e4f987 | |
parent | 60ca71394b49d283841f91facefadb2d43de4313 (diff) | |
download | rsyslog-6baee6e64e3c9427ced7724d2e4378e1d00dbf11.tar.gz |
Imported Debian patch 1.19.3-1debian/1.19.3-1
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | doc/rsyslog_conf.html | 31 | ||||
-rw-r--r-- | doc/status.html | 8 | ||||
-rw-r--r-- | msg.c | 39 | ||||
-rw-r--r-- | omfwd.c | 4 | ||||
-rw-r--r-- | omshell.c | 2 | ||||
-rw-r--r-- | syslogd.c | 16 | ||||
-rw-r--r-- | template.c | 4 | ||||
-rw-r--r-- | template.h | 2 |
12 files changed, 111 insertions, 33 deletions
@@ -1,4 +1,12 @@ --------------------------------------------------------------------------- +Version 1.19.3 (rgerhards), 2007-08-31 +- small mem leak fixed (after calling parseSelectorAct) - Thx varmojkekoj +- documentation section "Regular File" und "Blocks" updated +- solved an issue with dynamic file generation - Once again many thanks + to varmojfekoj +- the negative selector for program name filter (Blocks) does not work as + expected - Thanks varmojfekoj for patching +--------------------------------------------------------------------------- Version 1.19.2 (rgerhards), 2007-08-28 - a specifically formed message caused a segfault - Many thanks varmojfekoj for providing a patch @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for rsyslog 1.19.2. +# Generated by GNU Autoconf 2.61 for rsyslog 1.19.3. # # Report bugs to <rsyslog@lists.adiscon.com.>. # @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='rsyslog' PACKAGE_TARNAME='rsyslog' -PACKAGE_VERSION='1.19.2' -PACKAGE_STRING='rsyslog 1.19.2' +PACKAGE_VERSION='1.19.3' +PACKAGE_STRING='rsyslog 1.19.3' PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com.' ac_unique_file="syslogd.c" @@ -1397,7 +1397,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rsyslog 1.19.2 to adapt to many kinds of systems. +\`configure' configures rsyslog 1.19.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1467,7 +1467,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rsyslog 1.19.2:";; + short | recursive ) echo "Configuration of rsyslog 1.19.3:";; esac cat <<\_ACEOF @@ -1579,7 +1579,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rsyslog configure 1.19.2 +rsyslog configure 1.19.3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1593,7 +1593,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rsyslog $as_me 1.19.2, which was +It was created by rsyslog $as_me 1.19.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2283,7 +2283,7 @@ fi # Define the identity of the package. PACKAGE=rsyslog - VERSION=1.19.2 + VERSION=1.19.3 cat >>confdefs.h <<_ACEOF @@ -24006,7 +24006,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rsyslog $as_me 1.19.2, which was +This file was extended by rsyslog $as_me 1.19.3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24059,7 +24059,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -rsyslog config.status 1.19.2 +rsyslog config.status 1.19.3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index d9103d1..9387467 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[1.19.2],[rsyslog@lists.adiscon.com.]) -AM_INIT_AUTOMAKE(rsyslog, 1.19.2) +AC_INIT([rsyslog],[1.19.3],[rsyslog@lists.adiscon.com.]) +AM_INIT_AUTOMAKE(rsyslog, 1.19.3) AC_CONFIG_SRCDIR([syslogd.c]) AC_CONFIG_HEADER([config.h]) diff --git a/debian/changelog b/debian/changelog index f5aaf47..1c354a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rsyslog (1.19.3-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl <biebl@debian.org> Sun, 02 Sep 2007 20:15:02 +0200 + rsyslog (1.19.2-1) unstable; urgency=low * New upstream release. diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html index 2089b87..6976005 100644 --- a/doc/rsyslog_conf.html +++ b/doc/rsyslog_conf.html @@ -214,10 +214,14 @@ then the second block will only log messages from the ppp program on dialhost. <p>A program specification is a line beginning with ‘!prog’ and the following blocks will be associated with calls to syslog from that specific program. A program specification for ‘foo’ will also match any message logged by the kernel -with the prefix ‘foo: ’. A hostname specification of the form ‘+hostname’ and +with the prefix ‘foo: ’. Alternatively, a program specification ‘-foo’ causes the +following blocks to be applied to messages from any program but the one specified. + +A hostname specification of the form ‘+hostname’ and the following blocks will be applied to messages received from the specified hostname. Alternatively, a hostname specification ‘-hostname’ causes the following blocks to be applied to messages from any host but the one specified. + If the hostname is given as ‘@’, the local hostname will be used. (NOT YET IMPLEMENTED) A program or hostname specification may be reset by giving the program or hostname as ‘*’.</p> @@ -410,24 +414,27 @@ name. An example can be seen above in the description of template. We will use the "DynFile" template defined there. Dynamic filenames are indicated by specifying a questions mark "?" instead of a slash, followed by the template name. Thus, the selector line for our dynamic file name would look as follows:</p> -<p align="center"> +<blockquote> <code>*.* ?DynFile</code> -</p> +</blockquote> <p>That's all you need to do. Rsyslog will now automatically generate file names for you and store the right messages into the right files. Please note that the minus sign also works with dynamic file name selectors. Thus, to avoid syncing, you may use</p> -<p align="center"> -<code>*.* -?DynFile</code></p> +<blockquote> +<code>*.* -?DynFile</code></blockquote> <p>And of course you can use templates to specify the output format:</p> -<p align="center"> -<code>*.* ?DynFile;MyTemplate</code></p> +<blockquote> +<code>*.* ?DynFile;MyTemplate</code></blockquote> <p><b>A word of caution:</b> rsyslog creates files as needed. So if a new host is using your syslog server, rsyslog will automatically create a new file for -it. <b>However, directories are never created</b>. So if you use a dynamic -directory name, you must make sure that all possible directories are created, -otherwise the writes will fail. This restriction will most probably be removed -in later versions of rsyslogd.</p> +it.</p> + +<p><b>Creating directories is also supported</b>. For example you can use the hostname as directory +and the program name as file name:</p> +<blockquote> +<code>$template DynFile,"/var/log/%HOSTNAME%/%programname%.log"</code></blockquote> + <h3>Named Pipes</h3> <p>This version of rsyslogd(8) has support for logging output to named pipes (fifos). A fifo or named pipe can be used as a destination for log messages by prepending @@ -806,4 +813,4 @@ defining such features is available in rsyslogd, only.<br> </p> </body> -</html>
\ No newline at end of file +</html> diff --git a/doc/status.html b/doc/status.html index 3da059d..2487baa 100644 --- a/doc/status.html +++ b/doc/status.html @@ -4,11 +4,11 @@ </head> <body> <h2>rsyslog status page</h2> -<p>This page reflects the status as of 2007-08-28.</p> +<p>This page reflects the status as of 2007-08-31.</p> <h2>Current Releases</h2> -<p><b>development:</b> 1.19.2 - -<a href="http://www.rsyslog.com/Article119.phtml">change log</a> - -<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-54.phtml">download</a></p> +<p><b>development:</b> 1.19.3 - +<a href="http://www.rsyslog.com/Article121.phtml">change log</a> - +<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-55.phtml">download</a></p> <p><b>stable:</b> 1.0.5 - <a href="http://www.rsyslog.com/Article85.phtml">change log</a> - <a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-39.phtml">download</a></p> <p> (<a href="version_naming.html">How are versions named?</a>)</p> @@ -1606,6 +1606,45 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, } } + /* Take care of spurious characters to make the property safe + * for a path definition + */ + if(pTpe->data.field.options.bSecPathDrop || pTpe->data.field.options.bSecPathReplace) { + if(pTpe->data.field.options.bSecPathDrop) { + char *pSrc = pRes; + char *pDst = pRes; + while(*pSrc) { + if(*pSrc != '/') + *pDst++ = *pSrc; + pSrc++; + } + *pDst = '\0'; + } else { + char *pB = pRes; + while(*pB) { + if(*pB == '/') + *pB = '_'; + pB++; + } + } + + if(*pRes == '.' && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) + *pRes = '_'; + + if(*pRes == '\0') { + if(*pbMustBeFreed == 1) + free(pRes); + pRes = malloc(2); + if(pRes == NULL) { + *pbMustBeFreed = 0; + return "**OUT OF MEMORY ALLOCATING pBuf**"; + } + *pRes = '_'; + *(pRes + 1) = '\0'; + *pbMustBeFreed = 1; + } + } + /* Now drop last LF if present (pls note that this must not be done * if bEscapeCC was set! */ @@ -714,7 +714,7 @@ CODESTARTparseSelectorAct CODE_STD_STRING_REQUESTparseSelectorAct(1) if(*p == '@') { if((iRet = createInstance(&pData)) != RS_RET_OK) - return iRet; + goto finalize_it; ++p; /* eat '@' */ if(*p == '@') { /* indicator for TCP! */ pData->protocol = FORW_TCP; @@ -837,7 +837,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) /* process template */ if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*) " StdFwdFmt")) != RS_RET_OK) - return iRet; + goto finalize_it; /* first set the pData->eDestState */ memset(&hints, 0, sizeof(hints)); @@ -99,7 +99,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) */ if(*p == '^') { if((iRet = createInstance(&pData)) != RS_RET_OK) - return iRet; + goto finalize_it; } @@ -2302,8 +2302,20 @@ int shouldProcessThisMessage(selector_t *f, msg_t *pMsg) } if(f->pCSProgNameComp != NULL) { - if(rsCStrSzStrCmp(f->pCSProgNameComp, (uchar*) getProgramName(pMsg), getProgramNameLen(pMsg))) { - /* not equal, so we are already done... */ + int bInv = 0, bEqv = 0, offset = 0; + if(*(rsCStrGetSzStr(f->pCSProgNameComp)) == '-') { + if(*(rsCStrGetSzStr(f->pCSProgNameComp) + 1) == '-') + offset = 1; + else { + bInv = 1; + offset = 1; + } + } + if(!rsCStrOffsetSzStrCmp(f->pCSProgNameComp, offset, (uchar*) getProgramName(pMsg), getProgramNameLen(pMsg))) + bEqv = 1; + + if((!bEqv && !bInv) || (bEqv && bInv)) { + /* not equal or inverted selection, so we are already done... */ dbgprintf("programname filter '%s' does not match '%s'\n", rsCStrGetSzStr(f->pCSProgNameComp), getProgramName(pMsg)); return 0; @@ -432,6 +432,10 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe) pTpe->data.field.options.bSpaceCC = 1; } else if(!strcmp((char*)Buf, "drop-last-lf")) { pTpe->data.field.options.bDropLastLF = 1; + } else if(!strcmp((char*)Buf, "secpath-drop")) { + pTpe->data.field.options.bSecPathDrop = 1; + } else if(!strcmp((char*)Buf, "secpath-replace")) { + pTpe->data.field.options.bSecPathReplace = 1; } else { dbgprintf("Invalid field option '%s' specified - ignored.\n", Buf); } @@ -65,6 +65,8 @@ struct templateEntry { unsigned bSpaceCC: 1; /* change control characters to spaceescape? */ unsigned bEscapeCC: 1; /* escape control characters? */ unsigned bDropLastLF: 1; /* drop last LF char in msg (PIX!) */ + unsigned bSecPathDrop: 1; /* drop slashes, replace dots, empty string */ + unsigned bSecPathReplace: 1; /* replace slashes, replace dots, empty string */ } options; /* options as bit fields */ } field; } data; |