summaryrefslogtreecommitdiffstats
path: root/plugins/imtcp/imtcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-12-08 12:26:36 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2008-12-08 12:26:36 +0100
commitb0317d31d98b17cd8b9b5d29f438191ac045cd33 (patch)
tree1e05eb1ab44b2cae8e48e3fb4365aaed65396355 /plugins/imtcp/imtcp.c
parent7cbbba198913ff3403116d2364d8765cfdd7f162 (diff)
downloadrsyslog-3.18.6.tar.gz
rsyslog-3.18.6.tar.xz
rsyslog-3.18.6.zip
backport of $AllowedSender security fixv3.18.6
- security bugfix: $AllowedSender was not honored, all senders were permitted instead (see http://www.rsyslog.com/Article322.phtml) (backport from v3-stable, v3.20.9) - minor bugfix: dual close() call on tcp session closure
Diffstat (limited to 'plugins/imtcp/imtcp.c')
-rw-r--r--plugins/imtcp/imtcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index 7baa95f2..9b4d49f5 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -66,7 +66,7 @@ static int
isPermittedHost(struct sockaddr *addr, char *fromHostFQDN, void __attribute__((unused)) *pUsrSrv,
void __attribute__((unused)) *pUsrSess)
{
- return net.isAllowedSender(net.pAllowedSenders_TCP, addr, fromHostFQDN);
+ return net.isAllowedSender((uchar*) "TCP", addr, fromHostFQDN);
}
@@ -158,10 +158,7 @@ ENDwillRun
BEGINafterRun
CODESTARTafterRun
/* do cleanup here */
- if(net.pAllowedSenders_TCP != NULL) {
- net.clearAllowedSenders(net.pAllowedSenders_TCP);
- net.pAllowedSenders_TCP = NULL;
- }
+ net.clearAllowedSenders((char*)"TCP");
ENDafterRun