forked from pool/openldap2
47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
|
From 297c178d36f1e09f1112e97cb139b9843a53ef7c Mon Sep 17 00:00:00 2001
|
||
|
From: ralf <ralf>
|
||
|
Date: Fri, 22 Jan 2010 17:01:25 +0000
|
||
|
Subject: Fix exposure of SSS/VLV controls (ITS#6647)
|
||
|
|
||
|
Fixes bnc#648479
|
||
|
|
||
|
Contains the following upstream commits:
|
||
|
|
||
|
- Unregister VLV control as well when last overlay instance
|
||
|
is removed (additional fix for ITS#6647)
|
||
|
|
||
|
diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c
|
||
|
index ab52b3a..93d98b5 100644
|
||
|
--- a/servers/slapd/overlays/sssvlv.c
|
||
|
+++ b/servers/slapd/overlays/sssvlv.c
|
||
|
@@ -1276,6 +1276,10 @@ static int sssvlv_db_init(
|
||
|
if ( rc != LDAP_SUCCESS ) {
|
||
|
Debug( LDAP_DEBUG_ANY, "Failed to register VLV Request control '%s' (%d)\n",
|
||
|
LDAP_CONTROL_VLVREQUEST, rc, 0 );
|
||
|
+#ifdef SLAP_CONFIG_DELETE
|
||
|
+ overlay_unregister_control( be, LDAP_CONTROL_SORTREQUEST );
|
||
|
+ unregister_supported_control( LDAP_CONTROL_SORTREQUEST );
|
||
|
+#endif /* SLAP_CONFIG_DELETE */
|
||
|
return rc;
|
||
|
}
|
||
|
}
|
||
|
@@ -1311,6 +1315,15 @@ 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 );
|
||
|
+ if ( ov_count == 0 ) {
|
||
|
+ unregister_supported_control( LDAP_CONTROL_SORTREQUEST );
|
||
|
+ unregister_supported_control( LDAP_CONTROL_VLVREQUEST );
|
||
|
+ }
|
||
|
+#endif /* SLAP_CONFIG_DELETE */
|
||
|
+
|
||
|
if ( si ) {
|
||
|
ch_free( si );
|
||
|
on->on_bi.bi_private = NULL;
|
||
|
--
|
||
|
1.7.3.4
|
||
|
|