mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 14:10:39 -05:00
Working test001 and test002.
This commit is contained in:
parent
b76043013d
commit
dab0793d0c
3 changed files with 28 additions and 25 deletions
|
|
@ -138,6 +138,7 @@ ldbm_back_search(
|
|||
|
||||
/* need normalized dn below */
|
||||
realbase = ch_strdup( e->e_ndn );
|
||||
|
||||
cache_return_entry_r( &li->li_cache, e );
|
||||
|
||||
if ( candidates == NULL ) {
|
||||
|
|
@ -400,15 +401,20 @@ search_candidates(
|
|||
)
|
||||
{
|
||||
ID_BLOCK *candidates;
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
candidates = filter_candidates( be, filter );
|
||||
#else
|
||||
|
||||
Filter rf, rf_or, af, af_or, lf, lf_and;
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
struct berval rf_or_bv, af_or_bv;
|
||||
static AttributeDescription *objectClass = NULL;
|
||||
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
|
||||
#endif
|
||||
|
||||
Debug(LDAP_DEBUG_TRACE, "search_candidates: base=\"%s\" s=%d d=%d\n",
|
||||
e->e_ndn, scope, deref );
|
||||
#endif
|
||||
|
||||
#ifndef SLAPD_SCHEMA_NOT_COMPAT
|
||||
if( !manageDSAit ) {
|
||||
/* match referrals */
|
||||
rf.f_next = NULL;
|
||||
|
|
@ -416,10 +422,8 @@ search_candidates(
|
|||
rf.f_or = &rf_or;
|
||||
rf.f_or->f_choice = LDAP_FILTER_EQUALITY;
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
rf.f_or->f_av_desc = objectClass;
|
||||
rf.f_or->f_av_value = &rf_or_bv;
|
||||
rf.f_or->f_av_value->bv_val = ch_strdup( "REFERRAL" );
|
||||
rf.f_or->f_av_value->bv_len = sizeof("REFERRAL")-1;
|
||||
rf.f_or->f_av_desc = ad_objectClass;
|
||||
rf.f_or->f_av_value = ber_bvstrdup("REFERRAL");
|
||||
#else
|
||||
rf.f_or->f_avtype = ch_strdup( "objectclass" );
|
||||
rf.f_or->f_avvalue.bv_val = ch_strdup( "REFERRAL" );
|
||||
|
|
@ -439,9 +443,7 @@ search_candidates(
|
|||
af.f_or->f_choice = LDAP_FILTER_EQUALITY;
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
af.f_or->f_av_desc = objectClass;
|
||||
af.f_or->f_av_value = &af_or_bv;
|
||||
af.f_or->f_av_value->bv_val = ch_strdup( "ALIAS" );
|
||||
af.f_or->f_av_value->bv_len = sizeof("ALIAS")-1;
|
||||
af.f_or->f_av_value = ber_bvstrdup("ALIAS");
|
||||
#else
|
||||
af.f_or->f_avtype = ch_strdup( "objectclass" );
|
||||
af.f_or->f_avvalue.bv_val = ch_strdup( "ALIAS" );
|
||||
|
|
@ -477,7 +479,7 @@ search_candidates(
|
|||
/* free dynamically allocated bits */
|
||||
if( af.f_or != NULL ) {
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
free( af.f_or->f_av_value->bv_val );
|
||||
ber_bvfree( af.f_or->f_av_value );
|
||||
#else
|
||||
free( af.f_or->f_avtype );
|
||||
free( af.f_or->f_avvalue.bv_val );
|
||||
|
|
@ -486,12 +488,13 @@ search_candidates(
|
|||
|
||||
if( rf.f_or != NULL ) {
|
||||
#ifdef SLAPD_SCHEMA_NOT_COMPAT
|
||||
free( rf.f_or->f_av_value->bv_val );
|
||||
ber_bvfree( rf.f_or->f_av_value );
|
||||
#else
|
||||
free( rf.f_or->f_avtype );
|
||||
free( rf.f_or->f_avvalue.bv_val );
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
return( candidates );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ attributetype ( 2.5.4.40 NAME 'crossCertificatePair'
|
|||
|
||||
# 2.5.4.41 is 'name', moved above since other attribute types derive from it
|
||||
|
||||
attributetype ( 2.5.4.42 NAME 'givenName' SUP name )
|
||||
attributetype ( 2.5.4.42 NAME ( 'givenName' 'gn' ) SUP name )
|
||||
|
||||
attributetype ( 2.5.4.43 NAME 'initials' SUP name )
|
||||
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@ static void at_usage(void) LDAP_GCCATTR((noreturn));
|
|||
static char *const err2text[] = {
|
||||
"",
|
||||
"Out of memory",
|
||||
"Objectclass not found",
|
||||
"Attribute type not found",
|
||||
"Duplicate objectclass",
|
||||
"Duplicate attributetype",
|
||||
"Duplicate syntax",
|
||||
"Duplicate matchingrule",
|
||||
"ObjectClass not found",
|
||||
"AttributeType not found",
|
||||
"Duplicate objectClass",
|
||||
"Duplicate attributeType",
|
||||
"Duplicate ldapSyntax",
|
||||
"Duplicate matchingRule",
|
||||
"OID or name required",
|
||||
"Syntax or superior required",
|
||||
"Matchingrule not found",
|
||||
"SYNTAX or SUPerior required",
|
||||
"MatchingRule not found",
|
||||
"Syntax not found",
|
||||
"Syntax required"
|
||||
};
|
||||
|
|
@ -123,7 +123,7 @@ parse_oc_old(
|
|||
for( namep = oc->oc_at_oids_must; *namep ; namep++ ) {
|
||||
code = at_fake_if_needed( *namep );
|
||||
if ( code ) {
|
||||
fprintf( stderr, "%s: line %d: %s %s\n",
|
||||
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
|
||||
fname, lineno, scherr2str(code), *namep);
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ parse_oc_old(
|
|||
for( namep = oc->oc_at_oids_may; *namep; namep++ ) {
|
||||
code = at_fake_if_needed( *namep );
|
||||
if ( code ) {
|
||||
fprintf( stderr, "%s: line %d: %s %s\n",
|
||||
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
|
||||
fname, lineno, scherr2str(code), *namep);
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ parse_oc_old(
|
|||
|
||||
code = oc_add(oc,&err);
|
||||
if ( code ) {
|
||||
fprintf( stderr, "%s: line %d: %s %s\n",
|
||||
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
|
||||
fname, lineno, scherr2str(code), err);
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
@ -298,7 +298,7 @@ parse_oc(
|
|||
/* oc->oc_oid == NULL will be an error someday */
|
||||
code = oc_add(oc,&err);
|
||||
if ( code ) {
|
||||
fprintf( stderr, "%s: line %d: %s %s\n",
|
||||
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
|
||||
fname, lineno, scherr2str(code), err);
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ parse_at(
|
|||
}
|
||||
code = at_add(at,&err);
|
||||
if ( code ) {
|
||||
fprintf( stderr, "%s: line %d: %s %s\n",
|
||||
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
|
||||
fname, lineno, scherr2str(code), err);
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue