From: Kurt Zeilenga Date: Tue, 17 Sep 2002 04:22:48 +0000 (+0000) Subject: ocs in ad list updates X-Git-Tag: OPENLDAP_REL_ENG_2_1_5~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f09c8e06332cc1d37af389eba2b64a22d59a6de2;p=openldap ocs in ad list updates --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 360da3ca94..89cf5ab1ea 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -444,8 +444,18 @@ int ad_inlist( * if so, return attributes which the class requires/allows */ oc = attrs->an_oc; - if( oc == NULL ) { - oc = oc_bvfind( &attrs->an_name ); + if( oc == NULL && attrs->an_name.bv_val ) { + switch( attrs->an_name.bv_val[0] ) { + case '+': + case '-': { + struct berval ocname; + ocname.bv_len = attrs->an_name.bv_len - 1; + ocname.bv_val = &attrs->an_name.bv_val[1]; + oc = oc_bvfind( &ocname ); + } break; + default: + oc = oc_bvfind( &attrs->an_name ); + } attrs->an_oc = oc; } if( oc != NULL ) {