]> git.sur5r.net Git - openldap/commitdiff
More ACL to dn="" bug fixing... and add test006-acl check
authorKurt Zeilenga <kurt@openldap.org>
Thu, 11 Jul 2002 01:45:22 +0000 (01:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 11 Jul 2002 01:45:22 +0000 (01:45 +0000)
servers/slapd/aclparse.c
tests/data/slapd-acl.conf

index f53d273aa6373e5edbb946b996a252555962bea1..02703af4706bfa0f80dd51d884936b0a7a77f6db 100644 (file)
@@ -118,7 +118,9 @@ parse_acl(
                                }
 
                                if ( strcasecmp( argv[i], "*" ) == 0 ) {
-                                       if( a->acl_dn_pat.bv_len != 0 ) {
+                                       if( a->acl_dn_pat.bv_len ||
+                                               ( a->acl_dn_style != ACL_STYLE_REGEX ) )
+                                       {
                                                fprintf( stderr,
                                                        "%s: line %d: dn pattern"
                                                        " already specified in to clause.\n",
@@ -142,7 +144,9 @@ parse_acl(
                                }
 
                                if ( strcasecmp( left, "dn" ) == 0 ) {
-                                       if( a->acl_dn_pat.bv_len != 0 ) {
+                                       if( a->acl_dn_pat.bv_len != 0 ||
+                                               ( a->acl_dn_style != ACL_STYLE_REGEX ) )
+                                       {
                                                fprintf( stderr,
                                                        "%s: line %d: dn pattern"
                                                        " already specified in to clause.\n",
@@ -230,7 +234,9 @@ parse_acl(
                                a->acl_dn_pat.bv_len = 0;
                        }
                        
-                       if( a->acl_dn_pat.bv_len != 0 ) {
+                       if( a->acl_dn_pat.bv_len != 0 ||
+                               ( a->acl_dn_style != ACL_STYLE_REGEX ) )
+                       {
                                if ( a->acl_dn_style != ACL_STYLE_REGEX ) {
                                        struct berval bv;
                                        rc = dnNormalize2( NULL, &a->acl_dn_pat, &bv);
index d04ae6b4d2b64f9ba4e71ad3421a2f0d2f5b4a2a..81cfba6d7646b35fa8aee5fa6656e354ae90ee0d 100644 (file)
@@ -34,6 +34,9 @@ rootpw                secret
 # cn=monitor, cn=schema, and cn=config
 #
 
+access to dn="" by * read
+access to dn.base="" by * read
+
 access         to attr=objectclass
                by * =rsc stop