From 834726fa62a1eecf6d2936c1434c613f44b9dfd9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 15 Oct 2010 13:27:59 +0100 Subject: [PATCH] ldap: Log a warning if iterate_attrs has other fields than 'user'. --- src/auth/userdb-ldap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/auth/userdb-ldap.c b/src/auth/userdb-ldap.c index a47ba26d5c..a042df955a 100644 --- a/src/auth/userdb-ldap.c +++ b/src/auth/userdb-ldap.c @@ -169,6 +169,11 @@ static void userdb_ldap_iterate_callback(struct ldap_connection *conn, 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); -- 2.47.3