summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-12 14:21:53 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-12 14:21:53 +0100
commitf6dfcc7c3d326c54e1d5e301e1a2c032e4131e02 (patch)
treed61ed310ddd9953893a6ff4ce9e390bf912026e9
parente4542eb926c9fd757dc8f40f4fe6cb843b8b2650 (diff)
downloadrsyslog-f6dfcc7c3d326c54e1d5e301e1a2c032e4131e02.tar.gz
rsyslog-f6dfcc7c3d326c54e1d5e301e1a2c032e4131e02.tar.xz
rsyslog-f6dfcc7c3d326c54e1d5e301e1a2c032e4131e02.zip
correcting -q/-Q patch - was invalid
This is the correct patch. The previous one solved the segfault, but disabled the -q/Q options.
-rw-r--r--runtime/net.c3
-rw-r--r--runtime/net.h4
-rw-r--r--tools/syslogd.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/runtime/net.c b/runtime/net.c
index f289ecc5..29f7062b 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -1517,6 +1517,9 @@ CODESTARTobjQueryInterface(net)
pIf->AddPermittedPeer = AddPermittedPeer;
pIf->DestructPermittedPeers = DestructPermittedPeers;
pIf->PermittedPeerWildcardMatch = PermittedPeerWildcardMatch;
+ /* data members */
+ pIf->pACLAddHostnameOnFail = &ACLAddHostnameOnFail;
+ pIf->pACLDontResolve = &ACLDontResolve;
finalize_it:
ENDobjQueryInterface(net)
diff --git a/runtime/net.h b/runtime/net.h
index 8e64f7ab..092c3116 100644
--- a/runtime/net.h
+++ b/runtime/net.h
@@ -147,8 +147,8 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */
rsRetVal (*DestructPermittedPeers)(permittedPeers_t **ppRootPeer);
rsRetVal (*PermittedPeerWildcardMatch)(permittedPeers_t *pPeer, uchar *pszNameToMatch, int *pbIsMatching);
/* data members - these should go away over time... TODO */
- int pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */
- int pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */
+ int *pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */
+ int *pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */
ENDinterface(net)
#define netCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 9dbea061..75d5ff82 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -3422,10 +3422,10 @@ int realMain(int argc, char **argv)
fprintf(stderr, "error -p is no longer supported, use module imuxsock instead");
}
case 'q': /* add hostname if DNS resolving has failed */
- net.pACLAddHostnameOnFail = 1;
+ *(net.pACLAddHostnameOnFail) = 1;
break;
case 'Q': /* dont resolve hostnames in ACL to IPs */
- net.pACLDontResolve = 1;
+ *(net.pACLDontResolve) = 1;
break;
case 'r': /* accept remote messages */
if(iCompatibilityMode < 3) {