summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroxpa <iippolitov@gmail.com>2012-11-22 12:21:07 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-22 12:21:07 +0100
commite95584a204016c87daec0f5bee0f3f794bbba38c (patch)
tree2306c4e0de204f7fff9479f7487a7a5040efc40e
parentbb33c256e2d56be76f2f5d4336f08e8d5ec274c9 (diff)
downloadrsyslog-e95584a204016c87daec0f5bee0f3f794bbba38c.tar.gz
rsyslog-e95584a204016c87daec0f5bee0f3f794bbba38c.tar.bz2
rsyslog-e95584a204016c87daec0f5bee0f3f794bbba38c.zip
bugfix: hostname set in rsyslog.conf was not picked up until HUP
which could also mean "never" or "not for a very long time".
-rw-r--r--ChangeLog3
-rw-r--r--tools/syslogd.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b3687b3e..677459c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,9 @@ Version 6.6.1 [v6-stable] 2012-10-??
... actually, they are microseconds. So the fractional part of the
timestamp was not properly formatted.
Thanks to Marius Tomaschewski for the bug report and the patch idea.
+- bugfix: hostname set in rsyslog.conf was not picked up until HUP
+ which could also mean "never" or "not for a very long time".
+ Thanks to oxpa for providing analysis and a patch
---------------------------------------------------------------------------
Version 6.6.0 [v6-stable] 2012-10-22
This starts a new stable branch, based on the 6.5.x series, plus:
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 3bd0f018..5cc1b319 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -2026,6 +2026,8 @@ int realMain(int argc, char **argv)
}
localRet = rsconf.Load(&ourConf, ConfFile);
+ queryLocalHostname(); /* need to re-query to pick up a changed hostname due to config */
+
if(localRet == RS_RET_NONFATAL_CONFIG_ERR) {
if(loadConf->globals.bAbortOnUncleanConfig) {
fprintf(stderr, "rsyslogd: $AbortOnUncleanConfig is set, and config is not clean.\n"