From e95584a204016c87daec0f5bee0f3f794bbba38c Mon Sep 17 00:00:00 2001 From: oxpa Date: Thu, 22 Nov 2012 12:21:07 +0100 Subject: bugfix: hostname set in rsyslog.conf was not picked up until HUP which could also mean "never" or "not for a very long time". --- ChangeLog | 3 +++ tools/syslogd.c | 2 ++ 2 files changed, 5 insertions(+) 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" -- cgit v1.2.3