]> git.sur5r.net Git - openldap/commitdiff
fix access control when no backend could be found (might need work)
authorPierangelo Masarati <ando@openldap.org>
Wed, 13 Apr 2005 00:00:06 +0000 (00:00 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 13 Apr 2005 00:00:06 +0000 (00:00 +0000)
servers/slapd/slapacl.c

index 5b516c173730be9557dca23296c05ef85145f6aa..d70c709c0066541b902f65ff6d53cbb89e6b50b8 100644 (file)
@@ -86,6 +86,8 @@ slapacl( int argc, char **argv )
                                rc = 1;
                                goto destroy;
                        }
+
+                       i++;
                }
        }
 
@@ -213,6 +215,13 @@ slapacl( int argc, char **argv )
        }
 
        op->o_bd = be;
+       if ( op->o_bd == NULL ) {
+               /* NOTE: if no database could be found (e.g. because
+                * accessing the rootDSE or so), use the frontendDB
+                * rules; might need work */
+               op->o_bd = frontendDB;
+       }
+
        if ( !dryrun && be ) {
                ID      id;