From 31344728fe6f83d4f02ce0e5868c331b4e25d659 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Sat, 20 Dec 2008 12:56:41 +0100
Subject: bufgix: $PreserveFQDN was not properly handled for locally emitted
messages
---
ChangeLog | 2 ++
runtime/glbl.c | 27 ++++++++++++++++++++++++++-
runtime/glbl.h | 1 +
tools/syslogd.c | 5 ++++-
4 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5056f68d..120ef935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+- bufgix: $PreserveFQDN was not properly handled for locally emitted
+ messages
---------------------------------------------------------------------------
Version 4.1.3 [DEVEL] (rgerhards), 2008-12-17
- added $InputTCPServerAddtlFrameDelimiter config directive, which
diff --git a/runtime/glbl.c b/runtime/glbl.c
index d06c88ff..28f14320 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -60,6 +60,7 @@ static int bDropMalPTRMsgs = 0;/* Drop messages which have malicious PTR records
static int option_DisallowWarning = 1; /* complain if message from disallowed sender is received */
static int bDisableDNS = 0; /* don't look up IP addresses of remote messages */
static uchar *LocalHostName = NULL;/* our hostname - read-only after startup */
+static uchar *LocalFQDNName = NULL;/* our hostname as FQDN - read-only after startup */
static uchar *LocalDomain; /* our local domain name - read-only after startup */
static char **StripDomains = NULL;/* these domains may be stripped before writing logs - r/o after s.u., never touched by init */
static char **LocalHosts = NULL;/* these hosts are logged with their hostname - read-only after startup, never touched by init */
@@ -100,6 +101,7 @@ SIMP_PROP(LocalDomain, LocalDomain, uchar*)
SIMP_PROP(StripDomains, StripDomains, char**)
SIMP_PROP(LocalHosts, LocalHosts, char**)
+SIMP_PROP_SET(LocalFQDNName, LocalFQDNName, uchar*)
SIMP_PROP_SET(LocalHostName, LocalHostName, uchar*)
SIMP_PROP_SET(DfltNetstrmDrvr, pszDfltNetstrmDrvr, uchar*) /* TODO: use custom function which frees existing value */
SIMP_PROP_SET(DfltNetstrmDrvrCAF, pszDfltNetstrmDrvrCAF, uchar*) /* TODO: use custom function which frees existing value */
@@ -116,7 +118,27 @@ SIMP_PROP_SET(DfltNetstrmDrvrCertFile, pszDfltNetstrmDrvrCertFile, uchar*) /* TO
static uchar*
GetLocalHostName(void)
{
- return(LocalHostName == NULL ? (uchar*) "[localhost]" : LocalHostName);
+ uchar *pszRet;
+
+ if(LocalHostName == NULL)
+ pszRet = (uchar*) "[localhost]";
+ else {
+ if(GetPreserveFQDN() == 1)
+ pszRet = LocalFQDNName;
+ else
+ pszRet = LocalHostName;
+ }
+ return(pszRet);
+}
+
+
+/* return the current localhost name as FQDN (requires FQDN to be set)
+ * TODO: we should set the FQDN ourselfs in here!
+ */
+static uchar*
+GetLocalFQDNName(void)
+{
+ return(LocalFQDNName == NULL ? (uchar*) "[localhost]" : LocalFQDNName);
}
@@ -186,6 +208,7 @@ CODESTARTobjQueryInterface(glbl)
SIMP_PROP(DropMalPTRMsgs);
SIMP_PROP(Option_DisallowWarning);
SIMP_PROP(DisableDNS);
+ SIMP_PROP(LocalFQDNName)
SIMP_PROP(LocalHostName)
SIMP_PROP(LocalDomain)
SIMP_PROP(StripDomains)
@@ -270,6 +293,8 @@ BEGINObjClassExit(glbl, OBJ_IS_CORE_MODULE) /* class, version */
free(pszWorkDir);
if(LocalHostName != NULL)
free(LocalHostName);
+ if(LocalFQDNName != NULL)
+ free(LocalFQDNName);
ENDObjClassExit(glbl)
/* vi:set ai:
diff --git a/runtime/glbl.h b/runtime/glbl.h
index 205a5212..5bdf4f57 100644
--- a/runtime/glbl.h
+++ b/runtime/glbl.h
@@ -48,6 +48,7 @@ BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */
SIMP_PROP(DropMalPTRMsgs, int)
SIMP_PROP(Option_DisallowWarning, int)
SIMP_PROP(DisableDNS, int)
+ SIMP_PROP(LocalFQDNName, uchar*)
SIMP_PROP(LocalHostName, uchar*)
SIMP_PROP(LocalDomain, uchar*)
SIMP_PROP(StripDomains, char**)
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 138bdfd8..2cac8fe4 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -3288,6 +3288,7 @@ int realMain(int argc, char **argv)
uchar legacyConfLine[80];
uchar *LocalHostName;
uchar *LocalDomain;
+ uchar *LocalFQDNName;
/* first, parse the command line options. We do not carry out any actual work, just
* see what we should do. This relieves us from certain anomalies and we can process
@@ -3392,7 +3393,9 @@ int realMain(int argc, char **argv)
/* get our host and domain names - we need to do this early as we may emit
* error log messages, which need the correct hostname. -- rgerhards, 2008-04-04
*/
- net.getLocalHostname(&LocalHostName);
+ net.getLocalHostname(&LocalFQDNName);
+ CHKmalloc(LocalHostName = (uchar*) strdup((char*)LocalFQDNName));
+ glbl.SetLocalFQDNName(LocalFQDNName); /* set the FQDN before we modify it */
if((p = (uchar*)strchr((char*)LocalHostName, '.'))) {
*p++ = '\0';
LocalDomain = p;
--
cgit
From de1da2c06aaae81fe44cb7d8df38931bc210d05a Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Sun, 23 Dec 2007 11:43:55 +0100
Subject: doc bugfix: duplicate and invalid link to regex check tool
---
doc/manual.html | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/manual.html b/doc/manual.html
index e8842de6..bc4c0bc5 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -36,9 +36,8 @@ the links below for the
- troubleshooting rsyslog problems
- configuration file syntax (rsyslog.conf)
-- a regular expression checker/generator tool for rsyslog
-- property replacer, an important core component
- a regular expression checker/generator tool for rsyslog
+- property replacer, an important core component
- a commented sample rsyslog.conf
- rsyslog bug list
- rsyslog packages
--
cgit
From ebc931db47bf1e28502a043dc2984acf5fd532b6 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Wed, 17 Sep 2008 15:46:19 +0200
Subject: doc bugfix: queue doc had wrong parameter name
...for setting controlling worker thread shutdown period
---
ChangeLog | 2 ++
doc/queues.html | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1995ca10..c11d6aa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@ Version 3.21.5 [DEVEL] (rgerhards), 2008-09-??
each input module (else it is blank).
- added system property "$myhostname", which contains the name of the
local host as it knows itself.
+- doc bugfix: queue doc had wrong parameter name for setting controlling
+ worker thread shutdown period
---------------------------------------------------------------------------
Version 3.21.4 [DEVEL] (rgerhards), 2008-09-04
- removed compile time fixed message size limit (was 2K), limit can now
diff --git a/doc/queues.html b/doc/queues.html
index a2074d36..b8fcb481 100644
--- a/doc/queues.html
+++ b/doc/queues.html
@@ -219,7 +219,7 @@ parall. Thus, the upper limit ca be set via "$<object>QueueWorkerThread
If it, for example, is set to four, no more than four workers will ever be
started, no matter how many elements are enqueued.
Worker threads that have been started are kept running until an inactivity
-timeout happens. The timeout can be set via "$<object>QueueWorkerTimeoutShutdown"
+timeout happens. The timeout can be set via "$<object>QueueWorkerTimeoutThreadShutdown"
and is specified in milliseconds. If you do not like to keep the workers
running, simply set it to 0, which means immediate timeout and thus immediate
shutdown. But consider that creating threads involves some overhead, and this is
@@ -357,4 +357,4 @@ parameters, because not all are applicable. For example, in current output
module design, actions do not support multi-threading. Consequently, the number
of worker threads is fixed to one for action queues and can not be changed.
-