From: Luke Howard Date: Sun, 31 Aug 2003 03:08:06 +0000 (+0000) Subject: Call post-op bind functions after SASL bind X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~758 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e40215e7807e36e6590883e31e8f1283fab9fe60;p=openldap Call post-op bind functions after SASL bind --- diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index d0add6a7a5..c7dfa7ebb0 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -294,6 +294,22 @@ do_bind( rs->sr_err = slap_sasl_bind( op, rs ); +#ifdef LDAP_SLAPI + /* + * Normally post-operation plugins are called only after the + * backend operation. Because the front-end performs SASL + * binds on behalf of the backend, we'll make a special + * exception to call the post-operation plugins after a + * SASL bind. + */ + slapi_x_pblock_set_operation( pb, op ); + slapi_pblock_set( pb, SLAPI_BIND_TARGET, (void *)dn.bv_val ); + slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)method ); + slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->orb_cred ); + slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) ); + (void) doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ); +#endif /* LDAP_SLAPI */ + ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex ); if( rs->sr_err == LDAP_SUCCESS ) { ber_dupbv(&op->o_conn->c_dn, &op->orb_edn); @@ -634,6 +650,7 @@ do_bind( #endif /* defined( LDAP_SLAPI ) */ cleanup: + op->o_conn->c_sasl_bindop = NULL; if( op->o_req_dn.bv_val != NULL ) {