From a736f237f86f15fe031572e77478364f1f55047c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 16 Dec 2003 05:55:52 +0000 Subject: [PATCH] Deprecate +objectClass in favor of @objectClass per IETF discussions --- include/ldap.h | 3 ++- servers/slapd/aclparse.c | 2 +- servers/slapd/ad.c | 26 ++++++++++++++------------ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/ldap.h b/include/ldap.h index 3ad3d5de8f..7586b6b576 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -260,7 +260,8 @@ typedef struct ldapcontrol { /* LDAP Features */ #define LDAP_FEATURE_ALL_OPERATIONAL_ATTRS "1.3.6.1.4.1.4203.1.5.1" /* + */ -#define LDAP_FEATURE_OBJECTCLASS_ATTRS "1.3.6.1.4.1.4203.1.5.2" +#define LDAP_FEATURE_OBJECTCLASS_ATTRS \ + "1.3.6.1.4.1.4203.1.5.2" /* @objectClass - new number to be assigned */ #define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */ #define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4" #define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5" diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 383f0b9d3d..73ab0db634 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -1719,7 +1719,7 @@ print_acl( Backend *be, AccessControl *a ) fprintf( stderr, "," ); } if (an->an_oc) { - fputc( an->an_oc_exclude ? '!' : '+', stderr); + fputc( an->an_oc_exclude ? '!' : '@', stderr); } fputs( an->an_name.bv_val, stderr ); first = 0; diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 8543c9b2a4..a3d6ab53c8 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -531,13 +531,14 @@ int ad_inlist( } /* - * EXTENSION: see if requested description is +objectClass + * EXTENSION: see if requested description is @objectClass * if so, return attributes which the class requires/allows */ oc = attrs->an_oc; if( oc == NULL && attrs->an_name.bv_val ) { switch( attrs->an_name.bv_val[0] ) { - case '+': /* new way */ + case '@': /* @objectClass */ + case '+': /* +objectClass (deprecated) */ case '!': { /* exclude */ struct berval ocname; ocname.bv_len = attrs->an_name.bv_len - 1; @@ -728,16 +729,16 @@ an_find( } /* - * Convert a delimited string into a list of AttributeNames; - * add on to an existing list if it was given. If the string - * is not a valid attribute name, if a '-' is prepended it is - * skipped and the remaining name is tried again; if a '+' is - * prepended, an objectclass name is searched instead; if a - * '!' is prepended, the objectclass name is negated. + * Convert a delimited string into a list of AttributeNames; add + * on to an existing list if it was given. If the string is not + * a valid attribute name, if a '-' is prepended it is skipped + * and the remaining name is tried again; if a '@' (or '+') is + * prepended, an objectclass name is searched instead; if a '!' + * is prepended, the objectclass name is negated. * - * NOTE: currently, if a valid attribute name is not found, - * the same string is also checked as valid objectclass name; - * however, this behavior is deprecated. + * NOTE: currently, if a valid attribute name is not found, the + * same string is also checked as valid objectclass name; however, + * this behavior is deprecated. */ AttributeName * str2anlist( AttributeName *an, char *in, const char *brkstr ) @@ -792,7 +793,8 @@ str2anlist( AttributeName *an, char *in, const char *brkstr ) } } break; - case '+': + case '@': + case '+': /* (deprecated) */ case '!': { struct berval ocname; ocname.bv_len = anew->an_name.bv_len - 1; -- 2.39.5