dovecot-2.2: lib-master: Fixed crashing with -i <instance> param...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 3 04:09:33 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/04cd35e86025
changeset: 15183:04cd35e86025
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 03 04:09:23 2012 +0300
description:
lib-master: Fixed crashing with -i <instance> parameter handling.

diffstat:

 src/lib-master/master-service.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r ee0cf9c67571 -r 04cd35e86025 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c	Wed Oct 03 04:01:59 2012 +0300
+++ b/src/lib-master/master-service.c	Wed Oct 03 04:09:23 2012 +0300
@@ -336,8 +336,10 @@
 	const struct master_instance *inst;
 	const char *instance_path, *path;
 
-	instance_path = t_strconcat(master_service->set->state_dir,
-				    "/"MASTER_INSTANCE_FNAME, NULL);
+	/* note that we don't have any settings yet. we're just finding out
+	   which dovecot.conf we even want to read! so we must use the
+	   hardcoded state_dir path. */
+	instance_path = t_strconcat(PKG_STATEDIR"/"MASTER_INSTANCE_FNAME, NULL);
 	list = master_instance_list_init(instance_path);
 	inst = master_instance_list_find_by_name(list, name);
 	if (inst != NULL) {


More information about the dovecot-cvs mailing list