diff mbox

[08/11] Reset timezone information on reconfigure

Message ID 1386936854-8399-9-git-send-email-hare@suse.de (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Hannes Reinecke Dec. 13, 2013, 12:14 p.m. UTC
Whenever 'reconfigure' is called we need to re-initialize the
timezone information as it might have been changed in the
meantime.

References: bnc#830511

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/log.c | 1 +
 multipathd/main.c  | 3 +++
 2 files changed, 4 insertions(+)
diff mbox

Patch

diff --git a/libmultipath/log.c b/libmultipath/log.c
index 37c7cd7..74702d8 100644
--- a/libmultipath/log.c
+++ b/libmultipath/log.c
@@ -99,6 +99,7 @@  void log_close (void)
 void log_reset (char *program_name)
 {
 	closelog();
+	tzset();
 	openlog(program_name, 0, LOG_DAEMON);
 }
 
diff --git a/multipathd/main.c b/multipathd/main.c
index 96564f8..1a1aa2d 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1416,6 +1416,9 @@  reconfigure (struct vectors * vecs)
 	vecs->pathvec = NULL;
 	conf = NULL;
 
+	/* Re-read any timezone changes */
+	tzset();
+
 	if (!load_config(DEFAULT_CONFIGFILE, udev)) {
 		conf->verbosity = old->verbosity;
 		conf->daemon = 1;