]> git.sur5r.net Git - openldap/commitdiff
reset the conn field in the cached connection if the bound DN is privileged (ITS...
authorPierangelo Masarati <ando@openldap.org>
Mon, 15 May 2006 01:42:05 +0000 (01:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 15 May 2006 01:42:05 +0000 (01:42 +0000)
servers/slapd/back-ldap/bind.c
servers/slapd/back-meta/bind.c

index 0a482f6d7f24a810bc246456caedb96a858611e5..d43d13df336b6f1ae1333bfc1bdfe7ee2c13603b 100644 (file)
@@ -197,6 +197,9 @@ retry_lock:;
 
                if ( LDAP_BACK_CONN_ISBOUND( lc ) ) {
                        ber_bvreplace( &lc->lc_local_ndn, &op->o_req_ndn );
+                       if ( be_isroot_dn( op->o_bd, &op->o_req_ndn ) ) {
+                               lc->lc_conn = LDAP_BACK_PCONN_SET( op );
+                       }
                        lerr = avl_insert( &li->li_conninfo.lai_tree, (caddr_t)lc,
                                ldap_back_conndn_cmp, ldap_back_conndn_dup );
                }
index fcbe0fd21eb967340d26d1b06ba8bfd2e134d7ef..9b654c75842305f78ba2e5b3c1087a81e224f5b9 100644 (file)
@@ -231,6 +231,9 @@ retry_lock:;
                        }
 
                        ber_bvreplace( &mc->mc_local_ndn, &op->o_req_ndn );
+                       if ( be_isroot_dn( op->o_bd, &op->o_req_ndn ) ) {
+                               mc->mc_conn = LDAP_BACK_PCONN_SET( op );
+                       }
                        lerr = avl_insert( &mi->mi_conninfo.lai_tree, (caddr_t)mc,
                                meta_back_conndn_cmp, meta_back_conndn_dup );
                        ldap_pvt_thread_mutex_unlock( &mi->mi_conninfo.lai_mutex );