summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-01-12 14:48:38 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-01-12 14:48:38 +0100
commit43b9df51ba85f5703c12088884649c6bcf568b5a (patch)
tree0bbbc0199455b8533855603490de40ea22d33832 /runtime/net.c
parent98624f1bc46b8fd259bc1096022df5fc642e90bf (diff)
parent20ff1ed403f05606b68c13e4d5c591c6b8706f86 (diff)
downloadrsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.tar.gz
rsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.tar.xz
rsyslog-43b9df51ba85f5703c12088884649c6bcf568b5a.zip
Merge branch 'debian_lenny' into v3-stable
Conflicts: ChangeLog
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 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);
}