mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 11:09:34 -05:00
Fallout from ITS#4986 - remove unused param of select_backend()
This commit is contained in:
parent
974ca7b366
commit
88cbe052e0
31 changed files with 61 additions and 84 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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: "
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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] );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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: "
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 ||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue