]> git.sur5r.net Git - openldap/commitdiff
allow "proxied" attributeDescriptions in DN as well (more about ITS#3959)
authorPierangelo Masarati <ando@openldap.org>
Tue, 6 Sep 2005 17:21:24 +0000 (17:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 6 Sep 2005 17:21:24 +0000 (17:21 +0000)
servers/slapd/dn.c

index a47d1c418f25e8432cd8a82d8f89913f1d5b29c1..3326ba930936c13663d751e4940884675d6ed591 100644 (file)
@@ -73,7 +73,12 @@ LDAPRDN_validate( LDAPRDN rdn )
 
                        rc = slap_bv2ad( &ava->la_attr, &ad, &text );
                        if ( rc != LDAP_SUCCESS ) {
-                               return LDAP_INVALID_SYNTAX;
+                               rc = slap_bv2undef_ad( &ava->la_attr,
+                                       &ad, &text,
+                                       SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+                               if ( rc != LDAP_SUCCESS ) {
+                                       return LDAP_INVALID_SYNTAX;
+                               }
                        }
 
                        ava->la_private = ( void * )ad;
@@ -132,7 +137,12 @@ LDAPDN_validate( LDAPDN dn )
 
                                rc = slap_bv2ad( &ava->la_attr, &ad, &text );
                                if ( rc != LDAP_SUCCESS ) {
-                                       return LDAP_INVALID_SYNTAX;
+                                       rc = slap_bv2undef_ad( &ava->la_attr,
+                                               &ad, &text,
+                                               SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+                                       if ( rc != LDAP_SUCCESS ) {
+                                               return LDAP_INVALID_SYNTAX;
+                                       }
                                }
 
                                ava->la_private = ( void * )ad;
@@ -344,7 +354,12 @@ LDAPRDN_rewrite( LDAPRDN rdn, unsigned flags, void *ctx )
 
                        rc = slap_bv2ad( &ava->la_attr, &ad, &text );
                        if ( rc != LDAP_SUCCESS ) {
-                               return LDAP_INVALID_SYNTAX;
+                               rc = slap_bv2undef_ad( &ava->la_attr,
+                                       &ad, &text,
+                                       SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+                               if ( rc != LDAP_SUCCESS ) {
+                                       return LDAP_INVALID_SYNTAX;
+                               }
                        }
                        
                        ava->la_private = ( void * )ad;
@@ -469,7 +484,12 @@ LDAPDN_rewrite( LDAPDN dn, unsigned flags, void *ctx )
 
                                rc = slap_bv2ad( &ava->la_attr, &ad, &text );
                                if ( rc != LDAP_SUCCESS ) {
-                                       return LDAP_INVALID_SYNTAX;
+                                       rc = slap_bv2undef_ad( &ava->la_attr,
+                                               &ad, &text,
+                                               SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+                                       if ( rc != LDAP_SUCCESS ) {
+                                               return LDAP_INVALID_SYNTAX;
+                                       }
                                }
                                
                                ava->la_private = ( void * )ad;