diff options
author | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:50 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:50 +0100 |
commit | cb2fd7c6eb840386b2af9a1a75581d4c47281e70 (patch) | |
tree | df229cd0216426fd0c5e146041be7b05e766238f | |
parent | 9a7c5b2414911cfe8919b9f376cfc047259081b7 (diff) | |
download | rsyslog-cb2fd7c6eb840386b2af9a1a75581d4c47281e70.tar.gz |
Imported Upstream version 1.21.1upstream/1.21.1
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | cfsysline.c | 11 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/rsconf1_includeconfig.html | 5 | ||||
-rw-r--r-- | doc/status.html | 8 | ||||
-rw-r--r-- | linkedlist.c | 3 | ||||
-rw-r--r-- | syslogd.c | 17 |
8 files changed, 52 insertions, 23 deletions
@@ -1,4 +1,13 @@ --------------------------------------------------------------------------- +Version 1.21.1 (rgerhards), 2007-12-23 +- small doc fix for $IncludeConfig +- fixed a bug in llDestroy() +- bugfix: fixing memory leak when message queue is full and during + parsing. Thanks to varmojfekoj for the patch. +- bugfix: when compiled without network support, unix sockets were + not properply closed +- bugfix: memory leak in cfsysline.c/doGetWord() fixed +--------------------------------------------------------------------------- Version 1.21.0 (rgerhards), 2007-12-19 - GSS-API support for syslog/TCP connections was added. Thanks to varmojfekoj for providing the patch with this functionality diff --git a/cfsysline.c b/cfsysline.c index 14f5092..c4d8143 100644 --- a/cfsysline.c +++ b/cfsysline.c @@ -353,6 +353,13 @@ finalize_it: * a pointer to a string which is to receive the option * value. The returned string must be freed by the caller. * rgerhards, 2007-09-07 + * To facilitate multiple instances of the same command line + * directive, doGetWord() now checks if pVal is already a + * non-NULL pointer. If so, we assume it was created by a previous + * incarnation and is automatically freed. This happens only when + * no custom handler is defined. If it is, the customer handler + * must do the cleanup. I have checked and this was al also memory + * leak with some code. Obviously, not a large one. -- rgerhards, 2007-12-20 */ static rsRetVal doGetWord(uchar **pp, rsRetVal (*pSetHdlr)(void*, uchar*), void *pVal) { @@ -381,7 +388,9 @@ static rsRetVal doGetWord(uchar **pp, rsRetVal (*pSetHdlr)(void*, uchar*), void /* we got the word, now set it */ if(pSetHdlr == NULL) { /* we should set value directly to var */ - *((uchar**)pVal) = pNewVal; + if(*((uchar**)pVal) != NULL) + free(*((uchar**)pVal)); /* free previous entry */ + *((uchar**)pVal) = pNewVal; /* set new one */ } else { /* we set value via a set function */ CHKiRet(pSetHdlr(pVal, pNewVal)); @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for rsyslog 1.21.0. +# Generated by GNU Autoconf 2.61 for rsyslog 1.21.1. # # 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.21.0' -PACKAGE_STRING='rsyslog 1.21.0' +PACKAGE_VERSION='1.21.1' +PACKAGE_STRING='rsyslog 1.21.1' PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com.' ac_unique_file="syslogd.c" @@ -1407,7 +1407,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.21.0 to adapt to many kinds of systems. +\`configure' configures rsyslog 1.21.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1477,7 +1477,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rsyslog 1.21.0:";; + short | recursive ) echo "Configuration of rsyslog 1.21.1:";; esac cat <<\_ACEOF @@ -1591,7 +1591,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rsyslog configure 1.21.0 +rsyslog configure 1.21.1 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1605,7 +1605,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.21.0, which was +It was created by rsyslog $as_me 1.21.1, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2295,7 +2295,7 @@ fi # Define the identity of the package. PACKAGE='rsyslog' - VERSION='1.21.0' + VERSION='1.21.1' cat >>confdefs.h <<_ACEOF @@ -24980,7 +24980,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.21.0, which was +This file was extended by rsyslog $as_me 1.21.1, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25033,7 +25033,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -rsyslog config.status 1.21.0 +rsyslog config.status 1.21.1 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 0039eac..21e883d 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],[1.21.0],[rsyslog@lists.adiscon.com.]) +AC_INIT([rsyslog],[1.21.1],[rsyslog@lists.adiscon.com.]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([syslogd.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/doc/rsconf1_includeconfig.html b/doc/rsconf1_includeconfig.html index cd8d8a5..24462f7 100644 --- a/doc/rsconf1_includeconfig.html +++ b/doc/rsconf1_includeconfig.html @@ -27,13 +27,12 @@ Upon uninstallation, the file could be easily removed again. This approach<br> would be much cleaner and less error prone, than having to munge around<br> with the /etc/rsyslog.conf file directly.</i></p> </blockquote> -<p>Please note that in this description, only "*.conf" files would be read. The actual implementation, however, reads all files except for those starting with a dot. If you find this is a real big problem, please complain.</p> <p><b>Sample:</b></p> <p><code><b>$IncludeConfig /etc/some-included-file.conf</b></code></p> <p>Directories can also be included. To do so, the name must end on a slash:</p> <p><code><b>$IncludeConfig /etc/rsyslog.d/</b></code></p> -<p><code><b>And finally, only specific files matching a wildcard my be included -from a directory:</b></code></p> +<p><b>And finally, only specific files matching a wildcard my be included +from a directory:</b></p> <p><code><b>$IncludeConfig /etc/rsyslog.d/*.conf</b></code></p> <p>[<a href="rsyslog_conf.html">rsyslog.conf overview</a>] [<a href="manual.html">manual diff --git a/doc/status.html b/doc/status.html index f56422e..f950d68 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-12-19.</p> +<p>This page reflects the status as of 2007-12-23.</p> <h2>Current Releases</h2> -<p><b>development:</b> 1.21.0 - -<a href="http://www.rsyslog.com/Article149.phtml">change log</a> - -<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-67.phtml">download</a></p> +<p><b>development:</b> 1.21.1 - +<a href="http://www.rsyslog.com/Article151.phtml">change log</a> - +<a href="http://www.rsyslog.com/Downloads-index-req-getit-lid-68.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> diff --git a/linkedlist.c b/linkedlist.c index bea2cb9..27d6db3 100644 --- a/linkedlist.c +++ b/linkedlist.c @@ -104,6 +104,9 @@ rsRetVal llDestroy(linkedList_t *pThis) llDestroyElt(pThis, pEltPrev); } + pThis->pRoot = NULL; + pThis->pLast = NULL; + return iRet; } @@ -2824,6 +2824,7 @@ static void enqueueMsg(msg_t *pMsg) if(pthread_cond_timedwait (fifo->notFull, fifo->mut, &t) != 0) { dbgprintf("enqueueMsg: cond timeout, dropping message!\n"); + MsgDestruct(pMsg); goto unlock; } } @@ -3030,6 +3031,7 @@ static int parseRFCSyslogMsg(msg_t *pMsg, int flags) /* MSG */ MsgSetMSG(pMsg, p2parse); + free(pBuf); return 0; /* all ok */ } /* parse a legay-formatted syslog message. This function returns @@ -3249,13 +3251,17 @@ logmsg(int pri, msg_t *pMsg, int flags) if(msg[0] == '1' && msg[1] == ' ') { dbgprintf("Message has syslog-protocol format.\n"); setProtocolVersion(pMsg, 1); - if(parseRFCSyslogMsg(pMsg, flags) == 1) + if(parseRFCSyslogMsg(pMsg, flags) == 1) { + MsgDestruct(pMsg); return; + } } else { /* we have legacy syslog */ dbgprintf("Message has legacy syslog format.\n"); setProtocolVersion(pMsg, 0); - if(parseLegacySyslogMsg(pMsg, flags) == 1) + if(parseLegacySyslogMsg(pMsg, flags) == 1) { + MsgDestruct(pMsg); return; + } } /* ---------------------- END PARSING ---------------- */ @@ -3628,11 +3634,11 @@ static void die(int sig) #endif /* now clean up the listener part */ -#ifdef SYSLOG_INET /* Close the UNIX sockets. */ for (i = 0; i < nfunix; i++) if (funix[i] != -1) close(funix[i]); +#ifdef SYSLOG_INET /* Close the UDP inet socket. */ closeUDPListenSockets(); /* Close the TCP inet socket. */ @@ -6292,7 +6298,7 @@ int main(int argc, char **argv) /* END core initializations */ - while ((ch = getopt(argc, argv, "46Aa:dehi:f:g:l:m:nop:qQr::s:t:u:vwx")) != EOF) { + while ((ch = getopt(argc, argv, "46Aa:c:dehi:f:g:l:m:nop:qQr::s:t:u:vwx")) != EOF) { switch((char)ch) { case '4': family = PF_INET; @@ -6316,6 +6322,9 @@ int main(int argc, char **argv) else fprintf(stderr, "rsyslogd: Out of descriptors, ignoring %s\n", optarg); break; + case 'c': /* forward-compatibility: sets mode in v3+ */ + fprintf(stderr, "-c option not yet supported, reserved for future use\n"); + break; case 'd': /* debug */ Debug = 1; break; |