]> git.sur5r.net Git - openldap/commitdiff
Ready for release
authorKurt Zeilenga <kurt@openldap.org>
Tue, 17 Jan 2006 20:37:19 +0000 (20:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 17 Jan 2006 20:37:19 +0000 (20:37 +0000)
CHANGES
build/version.var
servers/slapd/add.c
servers/slapd/back-ldap/chain.c
servers/slapd/bind.c
servers/slapd/compare.c
servers/slapd/delete.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/search.c

diff --git a/CHANGES b/CHANGES
index 83f21cc5152d1e9b39904ca5576ca26533cc7e0f..cfc10f84923e92fc568f9109d1f9b7a7c2a15861 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,6 @@
 OpenLDAP 2.3 Change Log
 
-OpenLDAP 2.3.18 Engineering
+OpenLDAP 2.3.18 Release
        Fixed slapd syncrepl variable used before set bug (ITS#4331)
        Updated slapd-meta retry capabiltiies (ITS#4328)
        Fixed slapo-pcache attrsets issues (ITS#4316)
index c107677653adc9427a50ed46284a3d968c91895c..edbf26f8593a23d82f3bb1386e67daf25c6294f7 100644 (file)
@@ -15,9 +15,9 @@
 ol_package=OpenLDAP
 ol_major=2
 ol_minor=3
-ol_patch=X
-ol_api_inc=20317
+ol_patch=18
+ol_api_inc=20318
 ol_api_current=2
-ol_api_revision=5
+ol_api_revision=6
 ol_api_age=2
-ol_release_date="2006/01/10"
+ol_release_date="2006/01/17"
index bc1889d4e0a20741e731fd117b3d2591168c3235..16e1656553973f1b9d4caa3461d81ec2d0bb6d17 100644 (file)
@@ -217,7 +217,7 @@ fe_op_add( Operation *op, SlapReply *rs )
        Modifications   *modlist = op->ora_modlist;
        Modifications   **modtail = &modlist;
        int             rc = 0;
-       BackendDB *op_be;
+       BackendDB *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
 
@@ -230,14 +230,13 @@ fe_op_add( Operation *op, SlapReply *rs )
         */
        op->o_bd = select_backend( &op->ora_e->e_nname, manageDSAit, 1 );
        if ( op->o_bd == NULL ) {
+               op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->ora_e->e_name, LDAP_SCOPE_DEFAULT );
                if ( !rs->sr_ref ) rs->sr_ref = default_referral;
                if ( rs->sr_ref ) {
                        rs->sr_err = LDAP_REFERRAL;
-                       op->o_bd = frontendDB;
                        send_ldap_result( op, rs );
-                       op->o_bd = NULL;
 
                        if ( rs->sr_ref != default_referral ) {
                                ber_bvarray_free( rs->sr_ref );
@@ -379,6 +378,7 @@ fe_op_add( Operation *op, SlapReply *rs )
        }
 
 done:;
+       op->o_bd = bd;
        return rc;
 }
 
index 29ee510a9e30559a002f3fcfc477a1b4b474fc69..5b7816584e9089d3382610328b126bf09089cc4c 100644 (file)
@@ -748,7 +748,16 @@ cleanup:;
                        }
                        
                } else {
-                       rc = ldap_chain_op( op, rs, lback->bi_op_search, ref );
+                       /* we might get here before any database actually 
+                        * performed a search; in those cases, we need
+                        * to check limits, to make sure safe defaults
+                        * are in place */
+                       if ( op->ors_limit != NULL || limits_check( op, rs ) == 0 ) {
+                               rc = ldap_chain_op( op, rs, lback->bi_op_search, ref );
+
+                       } else {
+                               rc = SLAP_CB_CONTINUE;
+                       }
                }
                break;
 
@@ -1491,6 +1500,9 @@ static int
 ldap_chain_db_open(
        BackendDB       *be )
 {
+       slap_overinst   *on = (slap_overinst *) be->bd_info;
+       ldap_chain_t    *lc = (ldap_chain_t *)on->on_bi.bi_private;
+
 #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
        int     rc = 0;
 
@@ -1500,6 +1512,13 @@ ldap_chain_db_open(
        }
 #endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
 
+       if ( lc->lc_common_li == NULL ) {
+               void    *be_private = be->be_private;
+               ldap_chain_db_init_common( be );
+               lc->lc_common_li = lc->lc_cfg_li = (ldapinfo_t *)be->be_private;
+               be->be_private = be_private;
+       }
+
        return ldap_chain_db_func( be, db_open );
 }
 
index e9eee9cace1f6757c4a7e5d97359a06f20180daf..8c261489e8657f7226c542a45dc2ff66458db421 100644 (file)
@@ -223,6 +223,7 @@ int
 fe_op_bind( Operation *op, SlapReply *rs )
 {
        struct berval   mech = op->orb_tmp_mech;
+       BackendDB       *bd = op->o_bd;
 
        /* check for inappropriate controls */
        if( get_manageDSAit( op ) == SLAP_CONTROL_CRITICAL ) {
@@ -387,9 +388,8 @@ fe_op_bind( Operation *op, SlapReply *rs )
                /* don't return referral for bind requests */
                /* noSuchObject is not allowed to be returned by bind */
                rs->sr_err = LDAP_INVALID_CREDENTIALS;
-               op->o_bd = frontendDB;
+               op->o_bd = bd;
                send_ldap_result( op, rs );
-               op->o_bd = NULL;
                goto cleanup;
        }
 
@@ -452,6 +452,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
        }
 
 cleanup:;
+       op->o_bd = bd;
        return rs->sr_err;
 }
 
index 2dd0b169eb90d7fc91ffa3060a191ec0dbeecbea..41034b732de2af4b34736193611a39d77c2a56ad 100644 (file)
@@ -138,6 +138,7 @@ fe_op_compare( Operation *op, SlapReply *rs )
        Entry *entry = NULL;
        int manageDSAit;
        AttributeAssertion ava = *op->orc_ava;
+       BackendDB       *bd = op->o_bd;
 
        if( strcasecmp( op->o_req_ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) {
                Debug( LDAP_DEBUG_ARGS,
@@ -214,9 +215,8 @@ fe_op_compare( Operation *op, SlapReply *rs )
 
                rs->sr_err = LDAP_REFERRAL;
                if (!rs->sr_ref) rs->sr_ref = default_referral;
-               op->o_bd = frontendDB;
+               op->o_bd = bd;
                send_ldap_result( op, rs );
-               op->o_bd = NULL;
 
                if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
                rs->sr_err = 0;
@@ -369,6 +369,7 @@ fe_op_compare( Operation *op, SlapReply *rs )
        }
 
 cleanup:;
+       op->o_bd = bd;
        return rs->sr_err;
 }
 
index 544ab964af8391c7e15862dd73b7bd375528875d..a6a6a9708f8c645110d5e1dc3ee9e6e0cf097489 100644 (file)
@@ -101,7 +101,7 @@ fe_op_delete( Operation *op, SlapReply *rs )
 {
        struct berval   pdn = BER_BVNULL;
        int             manageDSAit;
-       BackendDB *op_be;
+       BackendDB *op_be, *bd = op->o_bd;
        
        manageDSAit = get_manageDSAit( op );
 
@@ -112,23 +112,19 @@ fe_op_delete( Operation *op, SlapReply *rs )
         */
        op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
        if ( op->o_bd == NULL ) {
+               op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
 
                if (!rs->sr_ref) rs->sr_ref = default_referral;
                if ( rs->sr_ref != NULL ) {
                        rs->sr_err = LDAP_REFERRAL;
-
-                       op->o_bd = frontendDB;
                        send_ldap_result( op, rs );
-                       op->o_bd = NULL;
 
                        if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
                } else {
-                       op->o_bd = frontendDB;
                        send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
                                "no global superior knowledge" );
-                       op->o_bd = NULL;
                }
                goto cleanup;
        }
@@ -243,5 +239,6 @@ fe_op_delete( Operation *op, SlapReply *rs )
        }
 
 cleanup:;
+       op->o_bd = bd;
        return rs->sr_err;
 }
index d94f4d0d6dfb57e15389843de206e15ba3e53bee..6d1aa6f67f6d43fd4f24310e6ac41d6ffd35bf09 100644 (file)
@@ -216,7 +216,7 @@ fe_op_modify( Operation *op, SlapReply *rs )
        int             manageDSAit;
        Modifications   *modlist = op->orm_modlist;
        int             increment = op->orm_increment;
-       BackendDB *op_be;
+       BackendDB *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
        
@@ -304,22 +304,19 @@ fe_op_modify( Operation *op, SlapReply *rs )
         */
        op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
        if ( op->o_bd == NULL ) {
+               op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                if (!rs->sr_ref) rs->sr_ref = default_referral;
 
                if (rs->sr_ref != NULL ) {
                        rs->sr_err = LDAP_REFERRAL;
-                       op->o_bd = frontendDB;
                        send_ldap_result( op, rs );
-                       op->o_bd = NULL;
 
                        if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
                } else {
-                       op->o_bd = frontendDB;
                        send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
                                "no global superior knowledge" );
-                       op->o_bd = NULL;
                }
                goto cleanup;
        }
@@ -429,6 +426,7 @@ fe_op_modify( Operation *op, SlapReply *rs )
        }
 
 cleanup:;
+       op->o_bd = bd;
        return rs->sr_err;
 }
 
index 3288f710bd77873ab722c3b5a10ad2503015afca..3284a5f0f0af9dab3dfa1b5c40c20d21ea79984b 100644 (file)
@@ -198,7 +198,7 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
        Backend         *newSuperior_be = NULL;
        int             manageDSAit;
        struct berval   pdn = BER_BVNULL;
-       BackendDB *op_be;
+       BackendDB *op_be, *bd = op->o_bd;
        
        if( op->o_req_ndn.bv_len == 0 ) {
                Debug( LDAP_DEBUG_ANY, "do_modrdn: root dse!\n", 0, 0, 0 );
@@ -228,22 +228,19 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
         */
        op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
        if ( op->o_bd == NULL ) {
+               op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                if (!rs->sr_ref) rs->sr_ref = default_referral;
 
                if ( rs->sr_ref != NULL ) {
                        rs->sr_err = LDAP_REFERRAL;
-                       op->o_bd = frontendDB;
                        send_ldap_result( op, rs );
-                       op->o_bd = NULL;
 
                        if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
                } else {
-                       op->o_bd = frontendDB;
                        send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
                                "no global superior knowledge" );
-                       op->o_bd = NULL;
                }
                goto cleanup;
        }
@@ -371,6 +368,7 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
        }
 
 cleanup:;
+       op->o_bd = bd;
        return rs->sr_err;
 }
 
index 8604281df6c2a83a080d2775b8d064f07aaaf9ae..6942cc21db2d954e8a8358158334ed70d1b78a63 100644 (file)
@@ -241,6 +241,7 @@ fe_op_search( Operation *op, SlapReply *rs )
 {
        int                     manageDSAit;
        int                     be_manageDSAit;
+       BackendDB                *bd = op->o_bd;
 
        manageDSAit = get_manageDSAit( op );
 
@@ -328,9 +329,8 @@ fe_op_search( Operation *op, SlapReply *rs )
 
                if (!rs->sr_ref) rs->sr_ref = default_referral;
                rs->sr_err = LDAP_REFERRAL;
-               op->o_bd = frontendDB;
+               op->o_bd = bd;
                send_ldap_result( op, rs );
-               op->o_bd = NULL;
 
                if (rs->sr_ref != default_referral)
                ber_bvarray_free( rs->sr_ref );
@@ -362,6 +362,7 @@ fe_op_search( Operation *op, SlapReply *rs )
        }
 
 return_results:;
+       op->o_bd = bd;
        return rs->sr_err;
 }