]> git.sur5r.net Git - openldap/commitdiff
Fix adding ACLs to specific DBs vs global/frontend
authorHoward Chu <hyc@openldap.org>
Fri, 28 Apr 2006 23:01:59 +0000 (23:01 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 28 Apr 2006 23:01:59 +0000 (23:01 +0000)
servers/slapd/bconfig.c

index 514f7a8bc2ab14aa47bfabf66f542f810109dbbb..fe96605739dfa70b96a807eaaf3f7a3b8696b9e3 100644 (file)
@@ -1243,6 +1243,14 @@ config_generic(ConfigArgs *c) {
                        break;
 
                case CFG_ACL:
+                       /* Don't append to the global ACL if we're on a specific DB */
+                       if ( c->be != frontendDB && frontendDB->be_acl && c->valx == -1 ) {
+                               AccessControl *a;
+                               c->valx = 0;
+                               for ( a=c->be->be_acl; a && a != frontendDB->be_acl;
+                                       a = a->acl_next )
+                                       c->valx++;
+                       }
                        if ( parse_acl(c->be, c->fname, c->lineno, c->argc, c->argv, c->valx ) ) {
                                return 1;
                        }