]> git.sur5r.net Git - openldap/commitdiff
Fallout from ITS#4986 - remove unused param of select_backend()
authorHoward Chu <hyc@openldap.org>
Fri, 13 Jul 2007 03:18:20 +0000 (03:18 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 13 Jul 2007 03:18:20 +0000 (03:18 +0000)
31 files changed:
servers/slapd/acl.c
servers/slapd/add.c
servers/slapd/back-meta/config.c
servers/slapd/back-monitor/init.c
servers/slapd/back-relay/config.c
servers/slapd/back-relay/init.c
servers/slapd/back-relay/op.c
servers/slapd/back-sql/search.c
servers/slapd/backend.c
servers/slapd/bconfig.c
servers/slapd/bind.c
servers/slapd/compare.c
servers/slapd/delete.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/overlays/accesslog.c
servers/slapd/overlays/dds.c
servers/slapd/overlays/dynlist.c
servers/slapd/overlays/refint.c
servers/slapd/passwd.c
servers/slapd/proto-slap.h
servers/slapd/sasl.c
servers/slapd/saslauthz.c
servers/slapd/search.c
servers/slapd/slapadd.c
servers/slapd/slapcommon.c
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_overlay.c
servers/slapd/slapi/slapi_pblock.c
servers/slapd/slapi/slapi_utils.c
servers/slapd/syncrepl.c

index b58992fe048b4f0c8742a7834500d8cfaad7effc..14cc43894f160a2a3d421b4346d1fd003168dbf0 100644 (file)
@@ -304,7 +304,7 @@ fe_access_allowed(
        be_orig = op->o_bd;
 
        if ( op->o_bd == NULL ) {
-               op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
                if ( op->o_bd == NULL )
                        op->o_bd = frontendDB;
        }
@@ -2111,7 +2111,7 @@ acl_set_gather( SetCookie *cookie, struct berval *name, AttributeDescription *de
                goto url_done;
        }
 
-       op2.o_bd = select_backend( &op2.o_req_ndn, 0, 1 );
+       op2.o_bd = select_backend( &op2.o_req_ndn, 1 );
        if ( ( op2.o_bd == NULL ) || ( op2.o_bd->be_search == NULL ) ) {
                rc = LDAP_NO_SUCH_OBJECT;
                goto url_done;
index 02b721f3257dd3e50eeaafcd46af698499e6b2b3..3cbd561efeed71c5d3ad75adce22da97cc61bbe2 100644 (file)
@@ -220,21 +220,18 @@ done:;
 int
 fe_op_add( Operation *op, SlapReply *rs )
 {
-       int             manageDSAit;
        Modifications   **modtail = &op->ora_modlist;
        int             rc = 0;
        BackendDB       *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->ora_e->e_nname, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->ora_e->e_nname, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -257,7 +254,7 @@ fe_op_add( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->ora_e->e_nname, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->ora_e->e_nname, 0 );
        }
 
        /* check restrictions */
index d90e40ec2526dc860c17b908704ab898c46c40c1..0725a415d60f415bd5eb148197ee5e9125186680 100644 (file)
@@ -283,7 +283,7 @@ meta_back_db_config(
                 * uri MUST be a branch of suffix!
                 */
 #if 0 /* too strict a constraint */
-               if ( select_backend( &mt->mt_nsuffix, 0, 0 ) != be ) {
+               if ( select_backend( &mt->mt_nsuffix, 0 ) != be ) {
                        Debug( LDAP_DEBUG_ANY,
        "%s: line %d: <naming context> of URI does not refer to current backend"
        " in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",
@@ -294,7 +294,7 @@ meta_back_db_config(
                /*
                 * uri MUST be a branch of a suffix!
                 */
-               if ( select_backend( &mt->mt_nsuffix, 0, 0 ) == NULL ) {
+               if ( select_backend( &mt->mt_nsuffix, 0 ) == NULL ) {
                        Debug( LDAP_DEBUG_ANY,
        "%s: line %d: <naming context> of URI does not resolve to a backend"
        " in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",
@@ -1275,7 +1275,7 @@ idassert-authzFrom        "dn:<rootdn>"
                        return 1;
                }
                
-               tmp_be = select_backend( &nvnc, 0, 0 );
+               tmp_be = select_backend( &nvnc, 0 );
                if ( tmp_be != NULL && tmp_be != be ) {
                        Debug( LDAP_DEBUG_ANY, 
        "%s: line %d: suffix already in use by another backend in"
@@ -1297,7 +1297,7 @@ idassert-authzFrom        "dn:<rootdn>"
                }
        
 #if 0  
-               tmp_be = select_backend( &nrnc, 0, 0 );
+               tmp_be = select_backend( &nrnc, 0 );
                if ( tmp_be != NULL ) {
                        Debug( LDAP_DEBUG_ANY,
        "%s: line %d: massaged suffix already in use by another backend in" 
index f45ee21bcb4f24e9a7d3793b66ae7c05ec2f48fe..64926717acbdcfb723d3b739e5a9db3544db9940 100644 (file)
@@ -2099,7 +2099,7 @@ monitor_back_db_init(
 
        be->be_private = &monitor_info;
 
-       be2 = select_backend( &ndn, 0, 0 );
+       be2 = select_backend( &ndn, 0 );
        if ( be2 != be ) {
                char    *type = be2->bd_info->bi_type;
 
index 503da6e9404b3396f66c85026280d2bdba6d1639..502bfae4619e6aa6d5558d6c1ac4c8ddc2f736a2 100644 (file)
@@ -135,7 +135,7 @@ relay_back_db_config(
                        return 1;
                }
 
-               bd = select_backend( &ndn, 0, 1 );
+               bd = select_backend( &ndn, 1 );
                if ( bd == NULL ) {
                        Log3( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
                                "%s: line %d: "
index c8219e1e206cd6275a43a4bc572115f88e05b9b1..3b29726a8f90bf590b7cbcf3e84a2b9b4d8f59ff 100644 (file)
@@ -97,7 +97,7 @@ relay_back_db_open( Backend *be )
        assert( ri != NULL );
 
        if ( !BER_BVISNULL( &ri->ri_realsuffix ) ) {
-               ri->ri_bd = select_backend( &ri->ri_realsuffix, 0, 1 );
+               ri->ri_bd = select_backend( &ri->ri_realsuffix, 1 );
 
                /* must be there: it was during config! */
                assert( ri->ri_bd != NULL );
index 2a6d669a73d08f4be1ca4f745ed003d98daffd63..e3a40db3a36dda01d68849e854568c7ea73e07cb 100644 (file)
@@ -61,7 +61,7 @@ relay_back_select_backend( Operation *op, SlapReply *rs, int err, int dosend )
        BackendDB               *bd = ri->ri_bd;
 
        if ( bd == NULL && !BER_BVISNULL( &op->o_req_ndn ) ) {
-               bd = select_backend( &op->o_req_ndn, 0, 1 );
+               bd = select_backend( &op->o_req_ndn, 1 );
                if ( bd == op->o_bd ) {
                        if ( err > LDAP_SUCCESS && dosend ) {
                                send_ldap_error( op, rs,
@@ -483,7 +483,7 @@ relay_back_entry_release_rw( Operation *op, Entry *e, int rw )
 
        bd = ri->ri_bd;
        if ( bd == NULL) {
-               bd = select_backend( &op->o_req_ndn, 0, 1 );
+               bd = select_backend( &op->o_req_ndn, 1 );
                if ( bd == NULL ) {
                        return 1;
                }
@@ -511,7 +511,7 @@ relay_back_entry_get_rw( Operation *op, struct berval *ndn,
 
        bd = ri->ri_bd;
        if ( bd == NULL) {
-               bd = select_backend( &op->o_req_ndn, 0, 1 );
+               bd = select_backend( &op->o_req_ndn, 1 );
                if ( bd == NULL ) {
                        return 1;
                }
index 5cb2c38a5391635ec11823ade7b8f37b4deb6c40..fa0658f2d20c6a1e60e9a6ddcea129488eb5c3df 100644 (file)
@@ -2473,7 +2473,7 @@ send_results:;
                slap_callback   cb = { 0 };
 
                op2.o_tag = LDAP_REQ_ADD;
-               op2.o_bd = select_backend( &op->o_bd->be_nsuffix[0], 0, 0 );
+               op2.o_bd = select_backend( &op->o_bd->be_nsuffix[0], 0 );
                op2.ora_e = e;
                op2.o_callback = &cb;
 
index f072400eb34a58579fa6a81e1c1cc0a911cb3155..c18e7d3b6353d3d987407903abd96a92f21cdef0 100644 (file)
@@ -624,7 +624,6 @@ be_db_close( void )
 Backend *
 select_backend(
        struct berval * dn,
-       int manageDSAit,
        int noSubs )
 {
        int             j;
@@ -1263,7 +1262,7 @@ fe_acl_group(
        GroupAssertion *g;
        Backend *be = op->o_bd;
 
-       op->o_bd = select_backend( gr_ndn, 0, 0 );
+       op->o_bd = select_backend( gr_ndn, 0 );
 
        for ( g = op->o_groups; g; g = g->ga_next ) {
                if ( g->ga_be != op->o_bd || g->ga_oc != group_oc ||
@@ -1381,7 +1380,7 @@ fe_acl_group(
                                                if ( user == NULL ) {   
                                                        int rc2;
 
-                                                       op->o_bd = select_backend( op_ndn, 0, 0 );
+                                                       op->o_bd = select_backend( op_ndn, 0 );
                                                        op->o_private = NULL;
                                                        rc2 = be_entry_get_rw( op, op_ndn, NULL, NULL, 0, &user );
                                                        user_priv = op->o_private;
@@ -1500,7 +1499,7 @@ fe_acl_attribute(
        AccessControlState      acl_state = ACL_STATE_INIT;
        Backend                 *be = op->o_bd;
 
-       op->o_bd = select_backend( edn, 0, 0 );
+       op->o_bd = select_backend( edn, 0 );
 
        if ( target && dn_match( &target->e_nname, edn ) ) {
                e = target;
@@ -1653,7 +1652,7 @@ backend_access(
        assert( edn != NULL );
        assert( access > ACL_NONE );
 
-       op->o_bd = select_backend( edn, 0, 0 );
+       op->o_bd = select_backend( edn, 0 );
 
        if ( target && dn_match( &target->e_nname, edn ) ) {
                e = target;
@@ -1775,7 +1774,7 @@ fe_aux_operational(
                BackendDB               *be_orig = op->o_bd;
 
                /* Let the overlays have a chance at this */
-               op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
                if ( op->o_bd != NULL && !be_match( op->o_bd, frontendDB ) &&
                        ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) &&
                        op->o_bd->be_operational != NULL )
index d7b94cef5d089172cc560b9b6a136c01fbd04b84..94bb341727ccc48c93fee9d93dba779625c2c763 100644 (file)
@@ -2117,7 +2117,7 @@ config_suffix(ConfigArgs *c)
        if (SLAP_DBHIDDEN( c->be ))
                tbe = NULL;
        else
-               tbe = select_backend(&ndn, 0, 0);
+               tbe = select_backend(&ndn, 0);
        if(tbe == c->be) {
                Debug( LDAP_DEBUG_ANY, "%s: suffix already served by this backend!.\n",
                        c->log, 0, 0);
@@ -2202,7 +2202,7 @@ config_rootpw(ConfigArgs *c) {
                return 0;
        }
 
-       tbe = select_backend(&c->be->be_rootndn, 0, 0);
+       tbe = select_backend(&c->be->be_rootndn, 0);
        if(tbe != c->be) {
                snprintf( c->msg, sizeof( c->msg ), "<%s> can only be set when rootdn is under suffix",
                        c->argv[0] );
index 706cc43559b06ff9718c91c1080ff75e0a8642dd..b8a506aab351afa55ba1a4cc7d27d3c3233d33e9 100644 (file)
@@ -357,7 +357,7 @@ fe_op_bind( Operation *op, SlapReply *rs )
         * if we don't hold it.
         */
 
-       if ( (op->o_bd = select_backend( &op->o_req_ndn, 0, 0 )) == NULL ) {
+       if ( (op->o_bd = select_backend( &op->o_req_ndn, 0 )) == NULL ) {
                /* don't return referral for bind requests */
                /* noSuchObject is not allowed to be returned by bind */
                rs->sr_err = LDAP_INVALID_CREDENTIALS;
index 230602895a597849c61e6b39106d69634bd71e2e..3683087a298dc7c5ac4cb7ab5e54c5f576d9a048 100644 (file)
@@ -136,7 +136,6 @@ int
 fe_op_compare( Operation *op, SlapReply *rs )
 {
        Entry                   *entry = NULL;
-       int                     manageDSAit;
        AttributeAssertion      ava = *op->orc_ava;
        BackendDB               *bd = op->o_bd;
 
@@ -201,14 +200,12 @@ fe_op_compare( Operation *op, SlapReply *rs )
                goto cleanup;
        }
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
+       op->o_bd = select_backend( &op->o_req_ndn, 0 );
        if ( op->o_bd == NULL ) {
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
index 183066b7d6e6c51b5caeabee85d3ae45c405ac46..2f9c1a0b0e94fd7042c4f72de08199ec9be479c3 100644 (file)
@@ -107,17 +107,14 @@ int
 fe_op_delete( Operation *op, SlapReply *rs )
 {
        struct berval   pdn = BER_BVNULL;
-       int             manageDSAit;
        BackendDB       *op_be, *bd = op->o_bd;
        
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -139,7 +136,7 @@ fe_op_delete( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
        }
 
        /* check restrictions */
index bb0f32e02c33dacad1f0ec6a0ed7301ba36b8a7a..d4180770f711cdbbc62cf0e581e47936be06f0c9 100644 (file)
@@ -129,7 +129,6 @@ fe_op_modify( Operation *op, SlapReply *rs )
 #ifdef LDAP_DEBUG
        Modifications   *tmp;
 #endif
-       int             manageDSAit;
        BackendDB       *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
@@ -209,14 +208,12 @@ fe_op_modify( Operation *op, SlapReply *rs )
        }
 #endif /* LDAP_DEBUG */
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -243,7 +240,7 @@ fe_op_modify( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
        }
 
        /* check restrictions */
index 221a20e8d96abf39e5ff8b10963b2629711e864f..067dd4c5271588883fbc9e745f9d2718d7fbcb7d 100644 (file)
@@ -214,7 +214,6 @@ int
 fe_op_modrdn( Operation *op, SlapReply *rs )
 {
        Backend         *newSuperior_be = NULL;
-       int             manageDSAit;
        struct berval   pdn = BER_BVNULL;
        BackendDB       *op_be, *bd = op->o_bd;
        
@@ -237,14 +236,12 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
        Statslog( LDAP_DEBUG_STATS, "%s MODRDN dn=\"%s\"\n",
            op->o_log_prefix, op->o_req_dn.bv_val, 0, 0, 0 );
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -266,7 +263,7 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
        }
 
        /* check restrictions */
@@ -284,7 +281,7 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
         * the same backend, otherwise we return an error.
         */
        if( op->orr_newSup ) {
-               newSuperior_be = select_backend( op->orr_nnewSup, 0, 0 );
+               newSuperior_be = select_backend( op->orr_nnewSup, 0 );
 
                if ( newSuperior_be != op->o_bd ) {
                        /* newSuperior is in different backend */
@@ -341,7 +338,7 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
                                        }
                                }
                                op->o_managedsait = org_managedsait;
-                               op->o_dn = org_dn;
+                               op->o_dn = org_dn;
                                op->o_ndn = org_ndn;
                                op->o_req_dn = org_req_dn;
                                op->o_req_ndn = org_req_ndn;
index ef6a46d4a794a89d06172f594a7dc54205fdf196..4325c8f617887f80d2cf2e9c68b058ab36e79322 100644 (file)
@@ -767,7 +767,7 @@ log_cf_gen(ConfigArgs *c)
                switch( c->type ) {
                case LOG_DB:
                        if ( CONFIG_ONLINE_ADD( c )) {
-                               li->li_db = select_backend( &c->value_ndn, 0, 0 );
+                               li->li_db = select_backend( &c->value_ndn, 0 );
                                if ( !li->li_db ) {
                                        snprintf( c->msg, sizeof( c->msg ),
                                                "<%s> no matching backend found for suffix",
@@ -1616,7 +1616,7 @@ accesslog_db_open(
 
 
        if ( !BER_BVISEMPTY( &li->li_db_suffix )) {
-               li->li_db = select_backend( &li->li_db_suffix, 0, 0 );
+               li->li_db = select_backend( &li->li_db_suffix, 0 );
                ch_free( li->li_db_suffix.bv_val );
                BER_BVZERO( &li->li_db_suffix );
        }
index 5235a836214ea8b8d1aea0213cf981599937e748..008ec22b10ad162cdc1ae7dc369def8c6db036ee 100644 (file)
@@ -140,7 +140,7 @@ dds_expire( void *ctx, dds_info_t *di )
        op->o_tag = LDAP_REQ_SEARCH;
        memset( &op->oq_search, 0, sizeof( op->oq_search ) );
 
-       op->o_bd = select_backend( &di->di_nsuffix[ 0 ], 0, 0 );
+       op->o_bd = select_backend( &di->di_nsuffix[ 0 ], 0 );
 
        op->o_req_dn = op->o_bd->be_suffix[ 0 ];
        op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
@@ -1785,7 +1785,7 @@ slap_exop_refresh(
                op->o_log_prefix, op->o_req_ndn.bv_val );
        op->o_req_dn = op->o_req_ndn;
 
-       op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+       op->o_bd = select_backend( &op->o_req_ndn, 0 );
        if ( !SLAP_DYNAMIC( op->o_bd ) ) {
                send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
                        "backend does not support dynamic directory services" );
index 18edb952c4ebc1f366d01d986b8d203347c2a5e0..eb6fc7a564d2ad8cbe8f006a60b92b31708dfeb7 100644 (file)
@@ -477,7 +477,7 @@ dynlist_prepare_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
                        goto cleanup;
                }
                
-               o.o_bd = select_backend( &o.o_req_ndn, 0, 1 );
+               o.o_bd = select_backend( &o.o_req_ndn, 1 );
                if ( o.o_bd && o.o_bd->be_search ) {
 #ifdef SLAP_OPATTRS
                        r.sr_attr_flags = slap_attr_flags( o.ors_attrs );
@@ -586,7 +586,7 @@ dynlist_compare( Operation *op, SlapReply *rs )
                op->o_do_not_cache = 1;
                op->o_dn = op->o_bd->be_rootdn;
                op->o_ndn = op->o_bd->be_rootndn;
-               op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
 
                r.sr_err = be_entry_get_rw( op, &op->o_req_ndn,
                        dli->dli_oc, NULL, 0, &e );
@@ -615,7 +615,7 @@ dynlist_compare( Operation *op, SlapReply *rs )
                o.ors_tlimit = SLAP_NO_LIMIT;
                o.ors_slimit = SLAP_NO_LIMIT;
 
-               o.o_bd = select_backend( &o.o_req_ndn, 0, 1 );
+               o.o_bd = select_backend( &o.o_req_ndn, 1 );
                if ( !o.o_bd || !o.o_bd->be_search ) {
                        return SLAP_CB_CONTINUE;
                }
index 1d1b28723e439811b4feee7f53799d3cc531315d..c62c39bd52752c47bcce1160f724af3d25d8af28 100644 (file)
@@ -520,7 +520,7 @@ refint_qtask( void *ctx, void *arg )
 
                        op->o_req_dn    = dp->dn;
                        op->o_req_ndn   = dp->ndn;
-                       op->o_bd = select_backend(&dp->ndn, 0, 1);
+                       op->o_bd = select_backend(&dp->ndn, 1);
                        if(!op->o_bd) {
                                Debug( LDAP_DEBUG_TRACE,
                                        "refint_response: no backend for DN %s!\n",
@@ -677,7 +677,7 @@ refint_response(
        **
        */
 
-       db = select_backend(&id->dn, 0, 1);
+       db = select_backend(&id->dn, 1);
 
        if(db) {
                if (!db->be_search || !db->be_modify) {
index 1d69910baee7f5bca058e6ea06801a4f706ccc2b..a08bbba4b21f08e5107d4924d193569564ca29fa 100644 (file)
@@ -101,7 +101,7 @@ int passwd_extop(
                        rc = rs->sr_err;
                        goto error_return;
                }
-               op->o_bd = select_backend( &op->o_req_ndn, 0, 1 );
+               op->o_bd = select_backend( &op->o_req_ndn, 1 );
 
        } else {
                ber_dupbv_x( &op->o_req_dn, &op->o_dn, op->o_tmpmemctx );
@@ -136,7 +136,7 @@ int passwd_extop(
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
        }
 
        if (backend_check_restrictions( op, rs,
index 835c37f1d4da7f2e7b497f9debda619e00ea1cda..8d15e804967ce5b8f46dd9e26806d84e2e62e40a 100644 (file)
@@ -335,7 +335,6 @@ LDAP_SLAPD_F (void) backend_db_move LDAP_P((BackendDB *bd, int idx));
 
 LDAP_SLAPD_F (BackendDB *) select_backend LDAP_P((
        struct berval * dn,
-       int manageDSAit,
        int noSubordinates ));
 
 LDAP_SLAPD_F (int) be_issuffix LDAP_P(( Backend *be,
index 7b43c706d435fb7fb5f4957c7211de9d5199d931..beeead411bcbfc9349c5451fcad9dcd7a79c5eca 100644 (file)
@@ -326,7 +326,7 @@ slap_auxprop_lookup(
 
                cb.sc_private = &sl;
 
-               op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+               op.o_bd = select_backend( &op.o_req_ndn, 1 );
 
                if ( op.o_bd ) {
                        /* For rootdn, see if we can use the rootpw */
@@ -440,7 +440,7 @@ slap_auxprop_store(
        }
        if (!conn || !op.o_req_ndn.bv_val) return SASL_BADPARAM;
 
-       op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+       op.o_bd = select_backend( &op.o_req_ndn, 1 );
 
        if ( !op.o_bd || !op.o_bd->be_modify ) return SASL_FAIL;
                
@@ -1098,7 +1098,7 @@ slapd_rw_apply( void *private, const char *filter, struct berval *val )
 
        op->o_tag = LDAP_REQ_SEARCH;
        op->o_req_dn = op->o_req_ndn = sl->base;
-       op->o_bd = select_backend( &op->o_req_ndn, 0, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( !op->o_bd ) {
                return REWRITE_ERR;
        }
index 2f6fd33d48aa4e5d6fcf374afd933e9767a9da6b..f591668961df64011816cb8b8518f5880fe09b8e 100644 (file)
@@ -1820,7 +1820,7 @@ exact_match:
           "slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
           op.o_req_ndn.bv_val, op.ors_scope, 0 );
 
-       op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+       op.o_bd = select_backend( &op.o_req_ndn, 1 );
        if(( op.o_bd == NULL ) || ( op.o_bd->be_search == NULL)) {
                rc = LDAP_INAPPROPRIATE_AUTH;
                goto CONCLUDED;
@@ -1953,7 +1953,7 @@ slap_sasl2dn(
        }
 
        /* Must do an internal search */
-       op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+       op.o_bd = select_backend( &op.o_req_ndn, 1 );
 
        switch ( op.ors_scope ) {
        case LDAP_X_SCOPE_EXACT:
index f53584a9e88003fc62232b36f96f3b7a40b2fc80..828c1fc70c12d84281f4f3ea12f9701decacf927 100644 (file)
@@ -239,12 +239,8 @@ return_results:;
 int
 fe_op_search( Operation *op, SlapReply *rs )
 {
-       int                     manageDSAit;
-       int                     be_manageDSAit;
        BackendDB               *bd = op->o_bd;
 
-       manageDSAit = get_manageDSAit( op );
-
        /* fake while loop to allow breaking out */
        while ( op->ors_scope == LDAP_SCOPE_BASE ) {
                Entry *entry = NULL;
@@ -320,9 +316,7 @@ fe_op_search( Operation *op, SlapReply *rs )
         * if we don't hold it.
         */
 
-       be_manageDSAit = manageDSAit;
-
-       op->o_bd = select_backend( &op->o_req_ndn, be_manageDSAit, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( op->o_bd == NULL ) {
                rs->sr_ref = referral_rewrite( default_referral,
                        NULL, &op->o_req_dn, op->ors_scope );
index a39ad0b9f4bacf6f2e58c4857dddb3e00f7612c2..69f2a59b116573722cd13fb6ea74632950bec237 100644 (file)
@@ -144,7 +144,7 @@ slapadd( int argc, char **argv )
                }
 
                /* check backend */
-               if( select_backend( &e->e_nname, is_entry_referral(e), nosubordinates )
+               if( select_backend( &e->e_nname, nosubordinates )
                        != be )
                {
                        fprintf( stderr, "%s: line %d: "
index 22a5593c00a0be209cb0029ef5e2e96201cbbbc9..188d4c73e5c6e1064a6ef200937443a21febe6a1 100644 (file)
@@ -613,7 +613,7 @@ slap_tool_init(
                        exit( EXIT_FAILURE );
                }
 
-               be = select_backend( &nbase, 0, 0 );
+               be = select_backend( &nbase, 0 );
                ber_memfree( nbase.bv_val );
 
                switch ( tool ) {
index 0d31168fbaa7a76317de94e8dd38c904d9385792..fe1d2474c6a76f3c7491b99915daaebd8e8fa2e6 100644 (file)
@@ -296,7 +296,7 @@ slapi_int_set_operation_dn( Slapi_PBlock *pb )
 
        if ( BER_BVISNULL( &op->o_ndn ) ) {
                /* set to root DN */
-               be = select_backend( &op->o_req_ndn, get_manageDSAit( op ), 1 );
+               be = select_backend( &op->o_req_ndn, 1 );
                if ( be != NULL ) {
                        ber_dupbv( &op->o_dn, &be->be_rootdn );
                        ber_dupbv( &op->o_ndn, &be->be_rootndn );
index fcbe435643fda766e4daf23ce4657c20fde19e36..b36f5a749fc84df227a7c85a7f7917aa2b5ed9f0 100644 (file)
@@ -763,7 +763,7 @@ slapi_over_acl_group(
        GroupAssertion          *g;
        SlapReply               rs = { REP_RESULT };
 
-       op->o_bd = select_backend( gr_ndn, 0, 0 );
+       op->o_bd = select_backend( gr_ndn, 0 );
 
        for ( g = op->o_groups; g; g = g->ga_next ) {
                if ( g->ga_be != op->o_bd || g->ga_oc != group_oc ||
index 2414ce5ed6272b7d77b969dc1fbbfd5878207765..136a5586b1c7c7424f18c8c4a5b5b17326b09f59 100644 (file)
@@ -447,7 +447,7 @@ pblock_be_call( Slapi_PBlock *pb, int (*bep)(Operation *) )
        op = pb->pb_op;
 
        be_orig = op->o_bd;
-       op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
+       op->o_bd = select_backend( &op->o_req_ndn, 0 );
        rc = (*bep)( op );
        op->o_bd = be_orig;
 
@@ -526,7 +526,7 @@ pblock_get( Slapi_PBlock *pb, int param, void **value )
                break;
        case SLAPI_BACKEND:
                PBLOCK_ASSERT_OP( pb, 0 );
-               *((BackendDB **)value) = select_backend( &pb->pb_op->o_req_ndn, 0, 0 );
+               *((BackendDB **)value) = select_backend( &pb->pb_op->o_req_ndn, 0 );
                break;
        case SLAPI_BE_TYPE:
                PBLOCK_ASSERT_OP( pb, 0 );
index 6feae2bf7b37bb84c2805d4a9aba852a32b0af50..99d5ccbc33840033df433532ba70d57f2dc75d83 100644 (file)
@@ -478,7 +478,7 @@ slapi_entry_has_children( const Slapi_Entry *e )
 
        slapi_pblock_set( pb, SLAPI_TARGET_DN, slapi_entry_get_dn( (Entry *)e ) );
 
-       pb->pb_op->o_bd = select_backend( (struct berval *)&e->e_nname, 0, 0 );
+       pb->pb_op->o_bd = select_backend( (struct berval *)&e->e_nname, 0 );
        if ( pb->pb_op->o_bd != NULL ) {
                pb->pb_op->o_bd->be_has_subordinates( pb->pb_op, (Entry *)e, &hasSubordinates );
        }
@@ -946,7 +946,7 @@ int slapi_dn_isbesuffix( Slapi_PBlock *pb, char *ldn )
        ndn.bv_len = strlen( ldn );
        ndn.bv_val = ldn;
 
-       be = select_backend( &pb->pb_op->o_req_ndn, 0, 0 );
+       be = select_backend( &pb->pb_op->o_req_ndn, 0 );
        if ( be == NULL ) {
                return 0;
        }
@@ -983,7 +983,7 @@ char *slapi_dn_beparent( Slapi_PBlock *pb, const char *ldn )
                return NULL;
        }
 
-       be = select_backend( &pb->pb_op->o_req_ndn, 0, 0 );
+       be = select_backend( &pb->pb_op->o_req_ndn, 0 );
 
        if ( be == NULL || be_issuffix( be, &normalizedDN ) == 0 ) {
                dnParent( &prettyDN, &parentDN );
@@ -3116,7 +3116,7 @@ int slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e )
 
        be_orig = pb->pb_op->o_bd;
 
-       pb->pb_op->o_bd = select_backend( &e->e_nname, 0, 0 );
+       pb->pb_op->o_bd = select_backend( &e->e_nname, 0 );
        if ( pb->pb_op->o_bd != NULL ) {
                rc = entry_schema_check( pb->pb_op, e, NULL, 0, 0,
                        &text, textbuf, textlen );
@@ -3402,7 +3402,7 @@ Slapi_Backend *slapi_be_select( const Slapi_DN *sdn )
 
        slapi_sdn_get_ndn( sdn );
 
-       be = select_backend( (struct berval *)&sdn->ndn, 0, 0 );
+       be = select_backend( (struct berval *)&sdn->ndn, 0 );
 
        return be;
 }
index 85389e74c043cd6a795ff20fb5c6a50d686ff9d6..7b49e6eda7395da0bb4ba8bce6692273e1a9656a 100644 (file)
@@ -1141,7 +1141,7 @@ do_syncrepl(
        /* If we're glued, send writes through the glue parent */
        if ( !si->si_wbe ) {
                if ( SLAP_GLUE_SUBORDINATE( be )) {
-                       si->si_wbe = select_backend( &be->be_nsuffix[0], 0, 1 );
+                       si->si_wbe = select_backend( &be->be_nsuffix[0], 1 );
                } else {
                        si->si_wbe = be;
                }