dovecot-2.0: auth: Make sure ldap userdb iteration request isn't...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 20 17:19:08 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/d8af22b91beb
changeset: 11868:d8af22b91beb
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 20 15:19:04 2010 +0100
description:
auth: Make sure ldap userdb iteration request isn't aborted too early.
diffstat:
src/auth/userdb-ldap.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r 8424d5efa6ad -r d8af22b91beb src/auth/userdb-ldap.c
--- a/src/auth/userdb-ldap.c Tue Jul 20 15:18:16 2010 +0100
+++ b/src/auth/userdb-ldap.c Tue Jul 20 15:19:04 2010 +0100
@@ -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 @@
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,
More information about the dovecot-cvs
mailing list