X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_prep.c;h=7c145bf148ab728f7c46855cba01436d9a9969d4;hb=ca9bb44089145bdb7435135714590d48f4a6eabd;hp=85c4f80a09d77799331ae993e95941c9f79c62d3;hpb=c04e9ac9932961ff54fe59f352919d417c49ab7c;p=openldap diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index 85c4f80a09..7c145bf148 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -28,14 +28,15 @@ static int objectClassNormalize( struct slap_syntax *syntax, /* NULL if in is asserted value */ struct slap_matching_rule *mr, struct berval * in, - struct berval * out ) + struct berval * out, + void *ctx ) { ObjectClass *oc = oc_bvfind( in ); if( oc != NULL ) { - ber_dupbv( out, &oc->soc_cname ); + ber_dupbv_x( out, &oc->soc_cname, ctx ); } else { - ber_dupbv( out, in ); + ber_dupbv_x( out, in, ctx ); } #if OCDEBUG @@ -90,7 +91,8 @@ objectSubClassMatch( return SLAPD_COMPARE_UNDEFINED; } - if( SLAP_IS_MR_VALUE_SYNTAX_MATCH( flags ) ) { + if( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX( flags ) ) + { *matchp = ( asserted != oc ); } else { *matchp = !is_object_subclass( asserted, oc ); @@ -117,7 +119,8 @@ static int objectSubClassIndexer( struct slap_matching_rule *mr, struct berval *prefix, BerVarray values, - BerVarray *keysp ) + BerVarray *keysp, + void *ctx ) { int rc, noc, i; BerVarray ocvalues; @@ -127,7 +130,7 @@ static int objectSubClassIndexer( } /* over allocate */ - ocvalues = ch_malloc( sizeof( struct berval ) * (noc+16) ); + ocvalues = sl_malloc( sizeof( struct berval ) * (noc+16), ctx ); /* copy listed values (and termination) */ for( i=0; i