dovecot-2.1: ldap: Support attr=name=prefix style template attri...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 21 02:16:07 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/e8da2675da41
changeset: 14172:e8da2675da41
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 21 02:15:54 2012 +0200
description:
ldap: Support attr=name=prefix style template attributes for backwards compatibility.
This was mainly used for quota, e.g. "quotaBytes=quota=*:storage="
diffstat:
src/auth/db-ldap.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r bf340465cb70 -r e8da2675da41 src/auth/db-ldap.c
--- 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')
More information about the dovecot-cvs
mailing list