From: Pierangelo Masarati Date: Fri, 4 Jan 2002 19:23:10 +0000 (+0000) Subject: more fixes/updates X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~290 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b28c3953d42decfbfe039654daa50873a2e6fe3f;p=openldap more fixes/updates --- diff --git a/servers/slapd/back-ldap/map.c b/servers/slapd/back-ldap/map.c index 888b61df4a..5e0dc55026 100644 --- a/servers/slapd/back-ldap/map.c +++ b/servers/slapd/back-ldap/map.c @@ -236,6 +236,8 @@ ldap_back_map_attrs( i++; } } + na[i] = NULL; + return(na); } diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 699f6e8b06..9b9f1cabea 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -347,7 +347,7 @@ meta_back_search( if ( mapped_filter == NULL ) { mapped_filter = ( char * )mfilter.bv_val; } else { - ber_memfree( mfilter.bv_val ); + free( mfilter.bv_val ); } mfilter.bv_val = NULL; mfilter.bv_len = 0; @@ -641,6 +641,9 @@ meta_send_entry( while ( ber_scanf( &ber, "{o", &a ) != LBER_ERROR ) { ldap_back_map( &li->targets[ target ]->at_map, &a, &mapped, 1 ); + if ( mapped.bv_val != a.bv_val ) { + free( a.bv_val ); + } if ( mapped.bv_val == NULL ) { continue; } @@ -668,9 +671,16 @@ meta_send_entry( } } + /* no subschemaSubentry */ + if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry ) { + ch_free(attr); + continue; + } + if ( ber_scanf( &ber, "[W]", &attr->a_vals ) == LBER_ERROR ) { attr->a_vals = &dummy; - } else if ( strcasecmp( mapped.bv_val, "objectClass" ) == 0 ) { + } else if ( attr->a_desc == slap_schema.si_ad_objectClass + || attr->a_desc == slap_schema.si_ad_structuralObjectClass ) { int i, last; for ( last = 0; attr->a_vals[ last ].bv_val; ++last ); for ( i = 0, bv = attr->a_vals; bv->bv_val; bv++, i++ ) {