[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Backend meta as a module errors


Not knowing the internals of OpenLDAP when it comes to module loading, but couldn't you factor the common code of both back-meta & back-ldap into a separate library (libmetacommon.la...) and then have both back-meta & back-ldap have library dependencies on that common library?  This would alleviate your concerns of code duplication as well as of putting the common code into core slapd, but may be more of a maintenance problem than your other options.


Pierangelo Masarati <ando@sys-net.it> wrote:
Quanah Gibson-Mount wrote:

> I think enabling back-meta should force the enabling of back-ldap. If
> someone tries to force building back-meta without back-ldap, then
> configure should throw an error and fail to run.

What's odd is that to use back-meta when built as module, not only one
needs to build back-ldap as well, but, in case back-ldap is also built
as module, it needs to be loaded before back-meta. Too many
requirements, in my opinion to make sense. I see two(/three) solutions:

1) duplicate the code in the two backends (that's what I tried hard to
avoid, as it was a maintenance nightmare)

2) move the common code into the core of slapd (bad, since most of the
times it's specific to the two proxy backends)

3) tie the two backends together (the dependence is not so tight, though)


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati@sys-net.it

Darin Broady