From: Ralf Haferkamp Date: Thu, 1 Jul 2010 11:51:43 +0000 (+0000) Subject: unregister controls when removing syncprov, ppolicy, valsort, chain or X-Git-Tag: MIGRATION_CVS2GIT~555 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c4f0c2cc2b69d15217b0c81e92649a3ac136e874;p=openldap unregister controls when removing syncprov, ppolicy, valsort, chain or sssvlv overlay --- diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index 6b7036a833..a7c51ee39d 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -1774,6 +1774,11 @@ ldap_chain_db_close( BackendDB *be, ConfigReply *cr ) { +#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR +#ifdef SLAP_CONFIG_DELETE + overlay_unregister_control( be, LDAP_CONTROL_X_CHAINING_BEHAVIOR ); +#endif /* SLAP_CONFIG_DELETE */ +#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */ return ldap_chain_db_func( be, db_close ); } diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 924071255c..101a5b6c90 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -2302,6 +2302,10 @@ ppolicy_close( slap_overinst *on = (slap_overinst *) be->bd_info; pp_info *pi = on->on_bi.bi_private; +#ifdef SLAP_CONFIG_DELETE + overlay_unregister_control( be, LDAP_CONTROL_PASSWORDPOLICYREQUEST ); +#endif /* SLAP_CONFIG_DELETE */ + /* Perhaps backover should provide bi_destroy hooks... */ ov_count--; if ( ov_count <=0 && pwcons ) { diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c index 10dde1f249..5f38e55c6e 100644 --- a/servers/slapd/overlays/sssvlv.c +++ b/servers/slapd/overlays/sssvlv.c @@ -1191,6 +1191,11 @@ static int sssvlv_db_destroy( ldap_pvt_thread_mutex_destroy( &sort_conns_mutex ); } +#ifdef SLAP_CONFIG_DELETE + overlay_unregister_control( be, LDAP_CONTROL_SORTREQUEST ); + overlay_unregister_control( be, LDAP_CONTROL_VLVREQUEST ); +#endif /* SLAP_CONFIG_DELETE */ + if ( si ) { ch_free( si ); on->on_bi.bi_private = NULL; diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index baf3806b3c..630a789008 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -3049,6 +3049,7 @@ syncprov_db_close( } si->si_ops=NULL; ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex ); + overlay_unregister_control( be, LDAP_CONTROL_SYNC ); #endif /* SLAP_CONFIG_DELETE */ return 0; diff --git a/servers/slapd/overlays/valsort.c b/servers/slapd/overlays/valsort.c index 9f57ece910..e516e46269 100644 --- a/servers/slapd/overlays/valsort.c +++ b/servers/slapd/overlays/valsort.c @@ -503,6 +503,10 @@ valsort_destroy( slap_overinst *on = (slap_overinst *)be->bd_info; valsort_info *vi = on->on_bi.bi_private, *next; +#ifdef SLAP_CONFIG_DELETE + overlay_unregister_control( be, LDAP_CONTROL_VALSORT ); +#endif /* SLAP_CONFIG_DELETE */ + for (; vi; vi = next) { next = vi->vi_next; ch_free( vi->vi_dn.bv_val );