dovecot-1.1: Allow %variables in static LDAP fields.

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 24 16:31:11 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/0dbf10f4493a
changeset: 7455:0dbf10f4493a
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 24 16:31:07 2008 +0300
description:
Allow %variables in static LDAP fields.

diffstat:

1 file changed, 9 insertions(+), 2 deletions(-)
src/auth/db-ldap.c |   11 +++++++++--

diffs (21 lines):

diff -r 053ec63146cb -r 0dbf10f4493a src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Thu Apr 24 16:08:25 2008 +0300
+++ b/src/auth/db-ldap.c	Thu Apr 24 16:31:07 2008 +0300
@@ -979,8 +979,15 @@ db_ldap_result_iterate_init(struct ldap_
 	ctx->attr_map = attr_map;
 
 	static_data = hash_lookup(attr_map, "");
-	if (static_data != NULL)
-		ctx->static_attrs = t_strsplit(static_data, ",");
+	if (static_data != NULL) {
+		const struct var_expand_table *table;
+		string_t *str;
+
+		table = auth_request_get_var_expand_table(auth_request, NULL);
+		str = t_str_new(256);
+		var_expand(str, static_data, table);
+		ctx->static_attrs = t_strsplit(str_c(str), ",");
+	}
 
 	if (auth_request->auth->verbose_debug)
 		ctx->debug = t_str_new(256);


More information about the dovecot-cvs mailing list