From: Pierangelo Masarati Date: Tue, 6 Sep 2005 17:21:24 +0000 (+0000) Subject: allow "proxied" attributeDescriptions in DN as well (more about ITS#3959) X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~471 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07fd8431c26dbd36fa49e9a6f8278756375eb03b;p=openldap allow "proxied" attributeDescriptions in DN as well (more about ITS#3959) --- diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index a47d1c418f..3326ba9309 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -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;