summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-01-27 14:42:23 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-01-27 14:42:23 +0100
commitce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3 (patch)
tree0ded85bdb06e524e48ff9bad6292d792d14c467d /runtime/net.c
parente2ffeb19f9c2962fd711e28d50ce0d51ae3bbc45 (diff)
parent40514075c692195290306cd3928b5ce78f2aa38c (diff)
downloadrsyslog-ce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3.tar.gz
rsyslog-ce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3.tar.xz
rsyslog-ce11f7bdb8db977a8b00b28d9b84d1b1c924f3c3.zip
Merge branch 'v3-stable' into beta
Conflicts: ChangeLog configure.ac doc/manual.html
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 1472b4db..f289ecc5 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);
}