changeset 12269:5cc31ecf199e

ldap: Log a warning if iterate_attrs has other fields than 'user'.
author Timo Sirainen <tss@iki.fi>
date Fri, 15 Oct 2010 13:27:59 +0100
parents df6f5d270a46
children a8b9d7fdc646
files src/auth/userdb-ldap.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/userdb-ldap.c	Thu Oct 14 18:20:58 2010 +0100
+++ b/src/auth/userdb-ldap.c	Fri Oct 15 13:27:59 2010 +0100
@@ -169,6 +169,11 @@
 						request->auth_request,
 						conn->iterate_attr_map);
 	while (db_ldap_result_iterate_next_all(ldap_iter, &name, &values)) {
+		if (strcmp(name, "user") != 0) {
+			i_warning("ldap: iterate: "
+				  "Ignoring field not named 'user': %s", name);
+			continue;
+		}
 		for (; *values != NULL; values++) {
 			ctx->continued = FALSE;
 			ctx->ctx.callback(*values, ctx->ctx.context);