]> git.sur5r.net Git - openldap/commitdiff
ocs in ad list updates
authorKurt Zeilenga <kurt@openldap.org>
Tue, 17 Sep 2002 04:22:48 +0000 (04:22 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 17 Sep 2002 04:22:48 +0000 (04:22 +0000)
servers/slapd/ad.c

index 360da3ca94fe61d7b21ebc8fb53bc16d36517357..89cf5ab1eac9682fcc67050e9539fb9024e7e5e1 100644 (file)
@@ -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 ) {