From: Pierangelo Masarati Date: Fri, 9 Jul 2004 00:14:15 +0000 (+0000) Subject: cleanup AD stuff (ITS#3225) X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~108 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2afdce833429f77a68071deada56609091418784;p=openldap cleanup AD stuff (ITS#3225) --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 19a8ca0c55..0dacb6eb9d 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -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; } @@ -138,13 +138,13 @@ int slap_bv2ad( assert( *ad == NULL ); /* temporary */ if( bv == NULL || BER_BVISNULL( bv ) || BER_BVISEMPTY( bv ) ) { - *text = "empty attribute description"; + *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; } diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index f1853ee04f..1951cd983e 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -148,9 +148,9 @@ LDAP_BEGIN_DECL #define OID_CHAR(c) ( OID_LEADCHAR(c) || OID_SEPARATOR(c) ) #define ATTR_LEADCHAR(c) ( DESC_LEADCHAR(c) || OID_LEADCHAR(c) ) -#define ATTR_CHAR(c) ( DESC_CHAR((c)) || (c) == '.' ) +#define ATTR_CHAR(c) ( DESC_CHAR((c)) || OID_SEPARATOR(c) ) -#define AD_LEADCHAR(c) ( ATTR_CHAR(c) ) +#define AD_LEADCHAR(c) ( ATTR_LEADCHAR(c) ) #define AD_CHAR(c) ( ATTR_CHAR(c) || (c) == ';' ) #define SLAP_NUMERIC(c) ( ASCII_DIGIT(c) || ASCII_SPACE(c) )