Mercurial > dovecot > core-2.2
changeset 11633:0dc6f14c271d HEAD
lib-storage: Call settings_check() after duplicating settings struct. Fixes lock_method setting.
lock_method was always ignored and the default fcntl was used.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 25 Jun 2010 15:03:44 +0100 |
parents | 8d76b2cef0b5 |
children | 7f19062f58fd |
files | src/lib-storage/mail-user.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-user.c Fri Jun 25 15:02:57 2010 +0100 +++ b/src/lib-storage/mail-user.c Fri Jun 25 15:03:44 2010 +0100 @@ -36,6 +36,7 @@ const struct mail_user_settings *set) { struct mail_user *user; + const char *error; pool_t pool; i_assert(username != NULL); @@ -49,6 +50,12 @@ user->set_info = set_info; user->unexpanded_set = settings_dup(set_info, set, pool); user->set = settings_dup(set_info, set, pool); + + /* check settings so that the duplicated structure will again + contain the parsed fields */ + if (!settings_check(set_info, pool, user->set, &error)) + i_panic("Settings check unexpectedly failed: %s", error); + user->v.deinit = mail_user_deinit_base; user->v.get_temp_prefix = mail_user_get_temp_prefix_base; p_array_init(&user->module_contexts, user->pool, 5);