mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#2847: fix cn=#,...
This commit is contained in:
parent
98e5afc28f
commit
61dffba479
@ -267,6 +267,11 @@ LDAPDN_rewrite( LDAPDN *dn, unsigned flags )
|
|||||||
ava->la_attr = ad->ad_cname;
|
ava->la_attr = ad->ad_cname;
|
||||||
|
|
||||||
if( ava->la_flags & LDAP_AVA_BINARY ) {
|
if( ava->la_flags & LDAP_AVA_BINARY ) {
|
||||||
|
if( ava->la_value.bv_len == 0 ) {
|
||||||
|
/* BER encoding is empty */
|
||||||
|
return LDAP_INVALID_SYNTAX;
|
||||||
|
}
|
||||||
|
|
||||||
/* AVA is binary encoded, don't muck with it */
|
/* AVA is binary encoded, don't muck with it */
|
||||||
} else if( flags & SLAP_LDAPDN_PRETTY ) {
|
} else if( flags & SLAP_LDAPDN_PRETTY ) {
|
||||||
transf = ad->ad_type->sat_syntax->ssyn_pretty;
|
transf = ad->ad_type->sat_syntax->ssyn_pretty;
|
||||||
|
@ -845,10 +845,17 @@ entry_naming_check(
|
|||||||
snprintf( textbuf, textlen,
|
snprintf( textbuf, textlen,
|
||||||
"naming attribute '%s' is not present in entry",
|
"naming attribute '%s' is not present in entry",
|
||||||
ava->la_attr.bv_val );
|
ava->la_attr.bv_val );
|
||||||
rc = LDAP_NO_SUCH_ATTRIBUTE;
|
rc = LDAP_NAMING_VIOLATION;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ava->la_flags & LDAP_AVA_BINARY ) {
|
||||||
|
snprintf( textbuf, textlen,
|
||||||
|
"value of naming attribute '%s' in unsupported BER form",
|
||||||
|
ava->la_attr.bv_val );
|
||||||
|
rc = LDAP_NAMING_VIOLATION;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SLAP_NVALUES
|
#ifdef SLAP_NVALUES
|
||||||
if ( value_find_ex( desc,
|
if ( value_find_ex( desc,
|
||||||
SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH,
|
SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH,
|
||||||
@ -861,7 +868,7 @@ entry_naming_check(
|
|||||||
snprintf( textbuf, textlen,
|
snprintf( textbuf, textlen,
|
||||||
"value of naming attribute '%s' is not present in entry",
|
"value of naming attribute '%s' is not present in entry",
|
||||||
ava->la_attr.bv_val );
|
ava->la_attr.bv_val );
|
||||||
rc = LDAP_NO_SUCH_ATTRIBUTE;
|
rc = LDAP_NAMING_VIOLATION;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user