summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2009-01-19 13:34:43 +0100
committerMichael Biebl <biebl@debian.org>2009-01-19 13:34:43 +0100
commita9a14cc4ca04738ea56eee92c98a63829bdbd438 (patch)
tree1595de69e42dbcbbf38079a2f70391d491f8ebea /runtime
parent84080b58f8c6c5c040723a02503ddd90f02b5898 (diff)
downloadrsyslog-a9a14cc4ca04738ea56eee92c98a63829bdbd438.tar.gz
Imported Upstream version 3.20.3upstream/3.20.3
Diffstat (limited to 'runtime')
-rw-r--r--runtime/net.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/runtime/net.c b/runtime/net.c
index ac13597..c5fa771 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);
}