]> git.sur5r.net Git - openldap/commitdiff
ITS#8108 silence rootdn check on hidden backends
authorHoward Chu <hyc@openldap.org>
Thu, 23 Apr 2015 04:58:50 +0000 (05:58 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 23 Apr 2015 17:53:37 +0000 (12:53 -0500)
select_backend() skips hidden backends so it fails to match the
rootdn of a database that has been hidden. rootpw tries to see
if the rootdn matches the current backend but the check fails
when hidden. Ignore this check on hidden backends since one
cannot Bind to a hidden backend anyway.

servers/slapd/bconfig.c

index 2579050ca7c27d416c045abfdc63652f1f5223e7..aa74b89f25a8e965f68ae695fe1c1c54f28ea8e3 100644 (file)
@@ -3039,7 +3039,7 @@ config_rootpw(ConfigArgs *c) {
        }
 
        tbe = select_backend(&c->be->be_rootndn, 0);
-       if(tbe != c->be) {
+       if(tbe != c->be && !SLAP_DBHIDDEN( c->be )) {
                snprintf( c->cr_msg, sizeof( c->cr_msg ), "<%s> can only be set when rootdn is under suffix",
                        c->argv[0] );
                Debug(LDAP_DEBUG_ANY, "%s: %s\n",