dovecot-2.1: ldap: If attributes contain ldapAttr=key=template%$...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 14 19:30:07 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/4bbc12a87a29
changeset: 14526:4bbc12a87a29
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 14 19:30:03 2012 +0300
description:
ldap: If attributes contain ldapAttr=key=template%$ and ldapAttr doesn't exist, skip the field.
This makes it work again the same as with v2.0.

diffstat:

 src/auth/db-ldap.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 7f238016db81 -r 4bbc12a87a29 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Mon May 14 19:01:46 2012 +0300
+++ b/src/auth/db-ldap.c	Mon May 14 19:30:03 2012 +0300
@@ -1252,6 +1252,11 @@
 		/* use the LDAP attribute's value */
 	} else {
 		/* template */
+		if (values[0] == NULL && *field->ldap_attr_name != '\0') {
+			/* ldapAttr=key=template%$, but ldapAttr doesn't
+			   exist. */
+			return values;
+		}
 		if (values[0] != NULL && values[1] != NULL) {
 			auth_request_log_warning(ctx->auth_request, "ldap",
 				"Multiple values found for '%s', "


More information about the dovecot-cvs mailing list