summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-01-27 16:58:30 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-01-27 16:58:30 +0100
commit4c7ab3bcc6db2aaddd0515944f282e3dd6ab056a (patch)
tree2b60a6d27a7bae4125876bb3782194c45830c27d /runtime/net.c
parentd5360aa57436bb931c513677bc2cbdb1733a4c6b (diff)
parentce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3 (diff)
downloadrsyslog-4c7ab3bcc6db2aaddd0515944f282e3dd6ab056a.tar.gz
rsyslog-4c7ab3bcc6db2aaddd0515944f282e3dd6ab056a.tar.xz
rsyslog-4c7ab3bcc6db2aaddd0515944f282e3dd6ab056a.zip
Merge branch 'beta'
Conflicts: tools/omfile.c
Diffstat (limited to 'runtime/net.c')
-rw-r--r--runtime/net.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/runtime/net.c b/runtime/net.c
index 6fa27658..4e6d54a1 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);
}