dovecot-1.3: Assume unknown settings returned by userdb lookup a...

dovecot at dovecot.org dovecot at dovecot.org
Sun Apr 12 05:27:28 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/52bf76fa5b85
changeset: 9076:52bf76fa5b85
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Apr 11 22:27:23 2009 -0400
description:
Assume unknown settings returned by userdb lookup are plugin settings.

diffstat:

1 file changed, 8 insertions(+), 1 deletion(-)
src/lib-storage/mail-storage-service.c |    9 ++++++++-

diffs (26 lines):

diff -r eb8a2d17fd44 -r 52bf76fa5b85 src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c	Sat Apr 11 21:59:26 2009 -0400
+++ b/src/lib-storage/mail-storage-service.c	Sat Apr 11 22:27:23 2009 -0400
@@ -71,7 +71,7 @@ user_reply_handle(struct master_service 
 		  const struct auth_user_reply *reply,
 		  const char **system_groups_user_r, const char **error_r)
 {
-	const char *const *str, *p, *line;
+	const char *const *str, *p, *line, *key;
 	unsigned int i, count;
 	int ret = 0;
 
@@ -114,6 +114,13 @@ user_reply_handle(struct master_service 
 			line = t_strconcat(str[i], "=yes", NULL);
 		else
 			line = str[i];
+
+		key = t_strcut(line, '=');
+		if (!settings_parse_is_valid_key(service->set_parser, key)) {
+			/* assume it's a plugin setting */
+			line = t_strconcat("plugin/", line, NULL);
+		}
+
 		ret = settings_parse_line(service->set_parser, line);
 	} T_END;
 


More information about the dovecot-cvs mailing list