2011-07-28 14:07:12 +02:00
|
|
|
From b5ddeac919d767a390d7d9e3c2dac092cc4232e1 Mon Sep 17 00:00:00 2001
|
2011-02-16 14:51:13 +01:00
|
|
|
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
|
2011-07-28 14:07:12 +02:00
|
|
|
index ce3da34..7ffed1b 100644
|
2011-02-16 14:51:13 +01:00
|
|
|
--- a/servers/slapd/overlays/sssvlv.c
|
|
|
|
+++ b/servers/slapd/overlays/sssvlv.c
|
2011-07-28 14:07:12 +02:00
|
|
|
@@ -1295,6 +1295,10 @@ static int sssvlv_db_init(
|
2011-02-16 14:51:13 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2011-07-28 14:07:12 +02:00
|
|
|
@@ -1330,6 +1334,15 @@ static int sssvlv_db_destroy(
|
2011-02-16 14:51:13 +01:00
|
|
|
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
|
|
|
|
|