From: Howard Chu Date: Wed, 17 Aug 2005 16:42:22 +0000 (+0000) Subject: ITS#3946 use connection_destroy hook to reset lockouts instead of unbind X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~684 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d247840d6b3512ea6e8383e8902165c958af7282;p=openldap ITS#3946 use connection_destroy hook to reset lockouts instead of unbind --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 64daabd22c..503a9c63fa 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -998,9 +998,9 @@ ppolicy_bind( Operation *op, SlapReply *rs ) /* Reset the restricted flag for the next session on this connection */ static int -ppolicy_unbind( Operation *op, SlapReply *rs ) +ppolicy_connection_destroy( BackendDB *bd, Connection *conn ) { - pwcons[op->o_conn->c_conn_idx].restricted = 0; + pwcons[conn->c_conn_idx].restricted = 0; return SLAP_CB_CONTINUE; } @@ -1785,11 +1785,11 @@ int ppolicy_init() ppolicy.on_bi.bi_op_add = ppolicy_add; ppolicy.on_bi.bi_op_bind = ppolicy_bind; - ppolicy.on_bi.bi_op_unbind = ppolicy_unbind; ppolicy.on_bi.bi_op_compare = ppolicy_restrict; ppolicy.on_bi.bi_op_delete = ppolicy_restrict; ppolicy.on_bi.bi_op_modify = ppolicy_modify; ppolicy.on_bi.bi_op_search = ppolicy_restrict; + ppolicy.on_bi.bi_connection_destroy = ppolicy_connection_destroy; return overlay_register( &ppolicy ); }