diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-01-12 14:48:38 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-01-12 14:48:38 +0100 |
commit | 43b9df51ba85f5703c12088884649c6bcf568b5a (patch) | |
tree | 0bbbc0199455b8533855603490de40ea22d33832 | |
parent | 98624f1bc46b8fd259bc1096022df5fc642e90bf (diff) | |
parent | 20ff1ed403f05606b68c13e4d5c591c6b8706f86 (diff) | |
download | rsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.tar.gz rsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.tar.xz rsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.zip |
Merge branch 'debian_lenny' into v3-stable
Conflicts:
ChangeLog
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | runtime/net.c | 29 |
2 files changed, 38 insertions, 0 deletions
@@ -1,5 +1,9 @@ - doc bugfix: v3-compatiblity document had typo in config directive thanks to Andrej for reporting this +- fixed a potential segfault condition with $AllowedSender directive + On HUP, the root pointers were not properly cleaned up. Thanks to + Michael Biebel, olgoat, and Juha Koho for reporting and analyzing + the bug. --------------------------------------------------------------------------- Version 3.20.2 [v3-stable] (rgerhards), 2008-12-04 - re-release of 3.20.1 with an additional fix, that could also lead @@ -209,6 +213,11 @@ Version 3.19.0 (rgerhards), 2008-05-06 for the patch --------------------------------------------------------------------------- Version 3.18.7 (rgerhards), 2008-12-?? +======= +- fixed a potential segfault condition with $AllowedSender directive + On HUP, the root pointers were not properly cleaned up. Thanks to + Michael Biebel, olgoat, and Juha Koho for reporting and analyzing + the bug. - some legacy options were not correctly processed. Thanks to varmojfekoj for the patch. - doc bugfix: some spelling errors in man pages corrected. Thanks to diff --git a/runtime/net.c b/runtime/net.c index ac13597c..c5fa771e 100644 --- a/runtime/net.c +++ b/runtime/net.c @@ -116,6 +116,30 @@ setAllowRoot(struct AllowedSenders **ppAllowRoot, uchar *pszType) finalize_it: RETiRet; } +/* re-initializes (sets to NULL) the correct allow root pointer + * rgerhards, 2009-01-12 + */ +static inline rsRetVal +reinitAllowRoot(uchar *pszType) +{ + DEFiRet; + + if(!strcmp((char*)pszType, "UDP")) + pAllowedSenders_UDP = NULL; + else if(!strcmp((char*)pszType, "TCP")) + pAllowedSenders_TCP = NULL; +#ifdef USE_GSSAPI + else if(!strcmp((char*)pszType, "GSS")) + pAllowedSenders_GSS = NULL; +#endif + else { + dbgprintf("program error: invalid allowed sender ID '%s', denying...\n", pszType); + ABORT_FINALIZE(RS_RET_CODE_ERR); /* everything is invalid for an invalid type */ + } + +finalize_it: + RETiRet; +} /* add a wildcard entry to this permitted peer. Entries are always @@ -556,6 +580,11 @@ clearAllowedSenders(uchar *pszType) free(pPrev->allowedSender.addr.NetAddr); free(pPrev); } + + /* indicate root pointer is de-init (was forgotten previously, resulting in + * all kinds of interesting things) -- rgerhards, 2009-01-12 + */ + reinitAllowRoot(pszType); } |