From c90d2ba88185b229f4d9c2cde1a2284f98b7ee3e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Jul 2010 15:19:04 +0100 Subject: [PATCH] auth: Make sure ldap userdb iteration request isn't aborted too early. --- 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 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, -- 2.47.3