From: Timo Sirainen Date: Fri, 15 Oct 2010 12:27:59 +0000 (+0100) Subject: ldap: Log a warning if iterate_attrs has other fields than 'user'. X-Git-Tag: 2.0.6~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=834726fa62a1eecf6d2936c1434c613f44b9dfd9;p=thirdparty%2Fdovecot%2Fcore.git ldap: Log a warning if iterate_attrs has other fields than 'user'. --- 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);