int rc;
char *dbname;
slap_mask_t mask;
- struct berval *prefix;
+ struct berval prefix = {0};
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
#endif
-
idl = idl_allids( be );
+ if( desc == slap_schema.si_ad_objectClass ) {
+ return idl;
+ }
+
rc = index_param( be, desc, LDAP_FILTER_PRESENT,
&dbname, &mask, &prefix );
0, 0, 0 );
#endif
- ber_bvfree( prefix );
return idl;
}
dbname, LDBM_SUFFIX, 0 );
#endif
- ber_bvfree( prefix );
return idl;
}
- if( prefix != NULL ) {
+ if( prefix.bv_val != NULL ) {
idl_free( idl );
idl = NULL;
- rc = key_read( be, db, prefix, &idl );
+ rc = key_read( be, db, &prefix, &idl );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
}
ldbm_cache_close( be, db );
- ber_bvfree( prefix );
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
int rc;
char *dbname;
slap_mask_t mask;
- struct berval *prefix;
+ struct berval prefix = {0};
struct berval **keys = NULL;
MatchingRule *mr;
0, 0, 0 );
#endif
- ber_bvfree( prefix );
return idl;
}
mr = ava->aa_desc->ad_type->sat_equality;
if( !mr ) {
- ber_bvfree( prefix );
return idl;
}
if( !mr->smr_filter ) {
- ber_bvfree( prefix );
return idl;
}
mask,
ava->aa_desc->ad_type->sat_syntax,
mr,
- prefix,
+ &prefix,
ava->aa_value,
&keys );
- ber_bvfree( prefix );
-
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
int rc;
char *dbname;
slap_mask_t mask;
- struct berval *prefix;
+ struct berval prefix = {0};
struct berval **keys = NULL;
MatchingRule *mr;
0, 0, 0 );
#endif
- ber_bvfree( prefix );
return idl;
}
}
if( !mr ) {
- ber_bvfree( prefix );
return idl;
}
if( !mr->smr_filter ) {
- ber_bvfree( prefix );
return idl;
}
mask,
ava->aa_desc->ad_type->sat_syntax,
mr,
- prefix,
+ &prefix,
ava->aa_value,
&keys );
- ber_bvfree( prefix );
-
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
int rc;
char *dbname;
slap_mask_t mask;
- struct berval *prefix;
+ struct berval prefix = {0};
struct berval **keys = NULL;
MatchingRule *mr;
0, 0, 0 );
#endif
- ber_bvfree( prefix );
return idl;
}
mr = sub->sa_desc->ad_type->sat_substr;
if( !mr ) {
- ber_bvfree( prefix );
return idl;
}
if( !mr->smr_filter ) {
- ber_bvfree( prefix );
return idl;
}
mask,
sub->sa_desc->ad_type->sat_syntax,
mr,
- prefix,
+ &prefix,
sub,
&keys );
- ber_bvfree( prefix );
-
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ERR,