]> git.sur5r.net Git - openldap/commitdiff
global overlays need to set o_bd = frontendDB to return the error in case no database...
authorPierangelo Masarati <ando@openldap.org>
Sun, 23 Jan 2005 21:44:23 +0000 (21:44 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 23 Jan 2005 21:44:23 +0000 (21:44 +0000)
servers/slapd/add.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

index 204caa0380237e391c63363ec61d7298468ab519..92f6759aea4780fd17e2f8be50c7ea0757c758b0 100644 (file)
@@ -220,14 +220,18 @@ fe_op_add( Operation *op, SlapReply *rs )
                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 );
                        }
                } else {
+                       op->o_bd = frontendDB;
                        send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
                                "no global superior knowledge" );
+                       op->o_bd = NULL;
                }
                goto done;
        }
index cbc6abd83e877698fc9db9577efe06e309daa172..c39caea9f64e37be8a26d0ead16d2685e5fa49bd 100644 (file)
@@ -464,7 +464,9 @@ 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;
                send_ldap_result( op, rs );
+               op->o_bd = NULL;
                goto cleanup;
        }
 
index ed575fd1e84627994235bfb002dca151583996fc..d6596c248791d9102f28b092118375cd3566e4fb 100644 (file)
@@ -208,7 +208,9 @@ 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;
                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;
index a1004f7967a57a0160130e35eb52617ed0ef0e48..6762093c4ace96e27fa5dfb3184dfe79fa229f0d 100644 (file)
@@ -124,12 +124,16 @@ fe_op_delete( Operation *op, SlapReply *rs )
                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;
        }
index 88a120bd74fd9297b4517d54ee8c1ce43393bfdc..ea961ef57f7d3823746d468195d278009aad5cec 100644 (file)
@@ -316,12 +316,16 @@ fe_op_modify( Operation *op, SlapReply *rs )
 
                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;
        }
index 44f97d059e9ff8d81f2a59bc1ea0f60c906c8f2d..c9e6c02dac31bd97e23a3a9c6017c0579ff5c354 100644 (file)
@@ -238,12 +238,16 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
 
                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;
        }
index 283fb6dfcf4bd8e67eb30dff64d8468db4b639e6..a162b20068be6af2607b28996036f4123a27a173 100644 (file)
@@ -353,7 +353,9 @@ 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;
                send_ldap_result( op, rs );
+               op->o_bd = NULL;
 
                if (rs->sr_ref != default_referral)
                ber_bvarray_free( rs->sr_ref );