]> git.sur5r.net Git - openldap/commitdiff
fix handling of invalid DN-valued attrs (ITS#4107)
authorPierangelo Masarati <ando@openldap.org>
Mon, 24 Oct 2005 20:22:08 +0000 (20:22 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 24 Oct 2005 20:22:08 +0000 (20:22 +0000)
servers/slapd/back-meta/search.c

index 544bf6e31f5f2c0a9ebe69d01b505cebadf15221..37fefb0dd7281088ab30cbe23d6f5838f36d499c 100644 (file)
@@ -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;