[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#4218) back-config broken in HEAD
On Fri, 2005-11-25 at 22:50 +0000, ando@sys-net.it wrote:
> On Fri, 2005-11-25 at 14:35 -0800, Quanah Gibson-Mount wrote:
> >
> > --On Friday, November 25, 2005 10:59 PM +0100 Pierangelo Masarati
> > <ando@sys-net.it> wrote:
> >
> > > Apparently, when in config_back_db_open got_ldif == 1 the database nodes
> > > are not created; as a consequence, when the rootDSE info is generated,
> > > only the config database appears to be present. I have no direct clue,
> > > though.
> >
> > Well, it has to be a fairly recent change to back-config. I was using the
> > HEAD version from a few days past 2.3.12's release w/o problem...
>
> It's a matter of access. After the frontend entry is read, and ACLs
> take effect, there's no longer access to config data because the fake
> operation that's being used has no o_ndn attached, and test_filter
> fails. It might be related to recent changes about the rootdn of back-
> config?
>
This patch makes it work again, but it's a horrible hack; I couldn't
find a better place to hijack the rootdn when it changes.
p.
Index: servers/slapd/bconfig.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/bconfig.c,v
retrieving revision 1.170
diff -u -r1.170 bconfig.c
--- servers/slapd/bconfig.c 25 Nov 2005 21:17:24 -0000 1.170
+++ servers/slapd/bconfig.c 25 Nov 2005 23:20:27 -0000
@@ -2789,6 +2789,12 @@
Debug( LDAP_DEBUG_ANY, "config error processing %s: %s\n",
rs->sr_entry->e_name.bv_val, sc->ca->msg, 0 );
}
+
+ if ( strcasecmp( rs->sr_entry->e_nname.bv_val, "olcDatabase={0}config,cn=config" ) == 0 ) {
+ BackendDB *be = select_backend( &rs->sr_entry->e_nname, 0, 0 );
+ op->o_dn = be->be_rootdn;
+ op->o_ndn = be->be_rootndn;
+ }
}
return rs->sr_err;
}