From 8a5a1ab39fc29d8419a9eeaf76a8a2d3714ed189 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 24 Oct 2005 20:22:08 +0000 Subject: [PATCH] fix handling of invalid DN-valued attrs (ITS#4107) --- servers/slapd/back-meta/search.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 544bf6e31f..37fefb0dd7 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -1029,16 +1029,18 @@ meta_send_entry( * ACLs to the target directory server, and letting * everything pass thru the ldap backend. */ - } else if ( attr->a_desc->ad_type->sat_syntax == + } else { + int i; + + if ( attr->a_desc->ad_type->sat_syntax == slap_schema.si_syn_distinguishedName ) - { - ldap_dnattr_result_rewrite( &dc, attr->a_vals ); + { + ldap_dnattr_result_rewrite( &dc, attr->a_vals ); - } else if ( attr->a_desc == slap_schema.si_ad_ref ) { - ldap_back_referral_result_rewrite( &dc, attr->a_vals ); + } else if ( attr->a_desc == slap_schema.si_ad_ref ) { + ldap_back_referral_result_rewrite( &dc, attr->a_vals ); - } else { - int i; + } for ( i = 0; i < last; i++ ) { struct berval pval; -- 2.39.5