]> git.sur5r.net Git - openldap/commitdiff
ITS#2285 string_expand for acl set
authorHoward Chu <hyc@openldap.org>
Thu, 30 Jan 2003 20:59:47 +0000 (20:59 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 30 Jan 2003 20:59:47 +0000 (20:59 +0000)
servers/slapd/acl.c

index 50511134b12f55537979035c1bc034cc1eae0c75..20935cad3d863989b83aeecb664ea5fc80394b5e 100644 (file)
@@ -982,7 +982,16 @@ dn_match_cleanup:;
                }
 
                if ( b->a_set_pat.bv_len != 0 ) {
-                       if (aci_match_set( &b->a_set_pat, be, e, conn, op, 0 ) == 0) {
+                       struct berval bv;
+                       char buf[ACL_BUF_SIZE];
+                       if( b->a_set_style == ACL_STYLE_REGEX ){
+                               bv.bv_len = sizeof(buf) - 1;
+                               bv.bv_val = buf;
+                               string_expand( &bv, &b->a_set_pat, e->e_ndn, matches );
+                       }else{
+                               bv = b->a_set_pat;
+                       }
+                       if (aci_match_set( &bv, be, e, conn, op, 0 ) == 0) {
                                continue;
                        }
                }