From 07fd8431c26dbd36fa49e9a6f8278756375eb03b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 6 Sep 2005 17:21:24 +0000 Subject: [PATCH] allow "proxied" attributeDescriptions in DN as well (more about ITS#3959) --- servers/slapd/dn.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) 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; -- 2.39.5