]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Make sure ldap userdb iteration request isn't aborted too early.
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 14:19:04 +0000 (15:19 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 14:19:04 +0000 (15:19 +0100)
src/auth/userdb-ldap.c

index d31d8b2d12b0a29b09665d2559e4d66cf283e79e..a47ba26d5c77ef931a21c819d51404bec321139b 100644 (file)
@@ -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,