mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
do not let entryDN,subschemaSubentry slip into results when mapped out (ITS#5760)
This commit is contained in:
parent
203eaa6204
commit
8fa2f07531
@ -318,6 +318,8 @@ typedef struct metatarget_t {
|
||||
#define META_BACK_TGT_NOREFS(mt) META_BACK_TGT_ISSET( (mt), LDAP_BACK_F_NOREFS )
|
||||
#define META_BACK_TGT_NOUNDEFFILTER(mt) META_BACK_TGT_ISSET( (mt), LDAP_BACK_F_NOUNDEFFILTER )
|
||||
|
||||
slap_mask_t mt_rep_flags;
|
||||
|
||||
int mt_version;
|
||||
time_t mt_network_timeout;
|
||||
struct timeval mt_bind_timeout;
|
||||
|
@ -170,6 +170,8 @@ meta_back_db_open(
|
||||
slap_bindconf sb = { BER_BVNULL };
|
||||
metatarget_t *mt = mi->mi_targets[ i ];
|
||||
|
||||
struct berval mapped;
|
||||
|
||||
ber_str2bv( mt->mt_uri, 0, 0, &sb.sb_uri );
|
||||
sb.sb_version = mt->mt_version;
|
||||
sb.sb_method = LDAP_AUTH_SIMPLE;
|
||||
@ -224,6 +226,22 @@ meta_back_db_open(
|
||||
not_always_anon_non_prescriptive = 1;
|
||||
}
|
||||
}
|
||||
|
||||
BER_BVZERO( &mapped );
|
||||
ldap_back_map( &mt->mt_rwmap.rwm_at,
|
||||
&slap_schema.si_ad_entryDN->ad_cname, &mapped,
|
||||
BACKLDAP_REMAP );
|
||||
if ( BER_BVISNULL( &mapped ) || mapped.bv_val[0] == '\0' ) {
|
||||
mt->mt_rep_flags |= REP_NO_ENTRYDN;
|
||||
}
|
||||
|
||||
BER_BVZERO( &mapped );
|
||||
ldap_back_map( &mt->mt_rwmap.rwm_at,
|
||||
&slap_schema.si_ad_subschemaSubentry->ad_cname, &mapped,
|
||||
BACKLDAP_REMAP );
|
||||
if ( BER_BVISNULL( &mapped ) || mapped.bv_val[0] == '\0' ) {
|
||||
mt->mt_rep_flags |= REP_NO_SUBSCHEMA;
|
||||
}
|
||||
}
|
||||
|
||||
if ( not_always == 0 ) {
|
||||
|
@ -2147,7 +2147,7 @@ next_attr:;
|
||||
rs->sr_entry = &ent;
|
||||
rs->sr_attrs = op->ors_attrs;
|
||||
rs->sr_operational_attrs = NULL;
|
||||
rs->sr_flags = 0;
|
||||
rs->sr_flags = mi->mi_targets[ target ]->mt_rep_flags;
|
||||
rs->sr_err = LDAP_SUCCESS;
|
||||
rc = send_search_entry( op, rs );
|
||||
switch ( rc ) {
|
||||
|
Loading…
Reference in New Issue
Block a user