From: Timo Sirainen Date: Tue, 20 Jul 2010 14:19:04 +0000 (+0100) Subject: auth: Make sure ldap userdb iteration request isn't aborted too early. X-Git-Tag: 2.0.rc3~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c90d2ba88185b229f4d9c2cde1a2284f98b7ee3e;p=thirdparty%2Fdovecot%2Fcore.git auth: Make sure ldap userdb iteration request isn't aborted too early. --- diff --git a/src/auth/userdb-ldap.c b/src/auth/userdb-ldap.c index d31d8b2d12..a47ba26d5c 100644 --- a/src/auth/userdb-ldap.c +++ b/src/auth/userdb-ldap.c @@ -5,6 +5,7 @@ #if defined(USERDB_LDAP) && (defined(BUILTIN_LDAP) || defined(PLUGIN_BUILD)) +#include "ioloop.h" #include "hash.h" #include "str.h" #include "var-expand.h" @@ -159,6 +160,10 @@ static void userdb_ldap_iterate_callback(struct ldap_connection *conn, return; } + /* the iteration can take a while. reset the request's create time so + it won't be aborted while it's still running */ + request->create_time = ioloop_time; + ctx->in_callback = TRUE; ldap_iter = db_ldap_result_iterate_init(conn, res, request->auth_request,