mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-11 13:50:39 +08:00
Improve error messages
This commit is contained in:
parent
6084373d10
commit
39b6cf783d
@ -46,7 +46,7 @@ static int ad_keystring(
|
||||
{
|
||||
ber_len_t i;
|
||||
|
||||
if( !AD_CHAR( bv->bv_val[0] ) ) {
|
||||
if( !AD_LEADCHAR( bv->bv_val[0] ) ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -137,14 +137,14 @@ int slap_bv2ad(
|
||||
assert( ad != NULL );
|
||||
assert( *ad == NULL ); /* temporary */
|
||||
|
||||
if( bv == NULL || bv->bv_len == 0 ) {
|
||||
*text = "empty attribute description";
|
||||
if( bv == NULL || BER_BVISNULL( bv ) || BER_BVISEMPTY( bv ) ) {
|
||||
*text = "empty AttributeDescription";
|
||||
return rtn;
|
||||
}
|
||||
|
||||
/* make sure description is IA5 */
|
||||
if( ad_keystring( bv ) ) {
|
||||
*text = "attribute description contains inappropriate characters";
|
||||
*text = "AttributeDescription contains inappropriate characters";
|
||||
return rtn;
|
||||
}
|
||||
|
||||
@ -663,13 +663,13 @@ int slap_bv2undef_ad(
|
||||
assert( ad != NULL );
|
||||
|
||||
if( bv == NULL || bv->bv_len == 0 ) {
|
||||
*text = "empty attribute description";
|
||||
*text = "empty AttributeDescription";
|
||||
return LDAP_UNDEFINED_TYPE;
|
||||
}
|
||||
|
||||
/* make sure description is IA5 */
|
||||
if( ad_keystring( bv ) ) {
|
||||
*text = "attribute description contains inappropriate characters";
|
||||
*text = "AttributeDescription contains inappropriate characters";
|
||||
return LDAP_UNDEFINED_TYPE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user