Mercurial > dovecot > core-2.2
changeset 14191:e8da2675da41
ldap: Support attr=name=prefix style template attributes for backwards compatibility.
This was mainly used for quota, e.g. "quotaBytes=quota=*:storage="
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 21 Feb 2012 02:15:54 +0200 |
parents | bf340465cb70 |
children | c854f19f10e3 |
files | src/auth/db-ldap.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/db-ldap.c Mon Feb 20 23:39:20 2012 +0000 +++ b/src/auth/db-ldap.c Tue Feb 21 02:15:54 2012 +0200 @@ -1039,6 +1039,13 @@ str_truncate(tmp_str, 0); var_expand_with_funcs(tmp_str, templ, NULL, var_funcs_table, &ctx); + if (strchr(templ, '%') == NULL) { + /* backwards compatibility: + attr=name=prefix means same as + attr=name=prefix%$ when %vars are missing */ + templ = p_strconcat(conn->pool, templ, + "%$", NULL); + } } if (*name == '\0')