[PATCH][SAMBA4] Enable the ldb_map database mapping module
mkhl at samba.org
Sun Aug 13 00:45:19 GMT 2006
On 8/11/06, Andrew Bartlett <abartlet at samba.org> wrote:
> On Thu, 2006-08-10 at 18:42 +0200, Martin Kühl wrote:
> > This changeset reimplements and enables the ldb_map ldb module and
> > adapts the example module and test case, both named samba3sam, to the
> > implementation.
> > The ldb_map module supports splitting an ldb database into two parts
> > (called the "local" and "remote" part) and storing the data in one of
> > them (the remote database) in a different format while the other acts
> > as a fallback.
> > This allows ldb to e.g. store to and load data from a remote LDAP
> > server and present it according to the Samba4 schema while still
> > allowing the LDAP to present and modify its data separately.
> > A complex example of this is the samba3sam module (by Jelmer
> > Vernooij), which maps data between the samba3 and samba4 schemas.
> > A simpler example is given by the entryUUID module (by Andrew
> > Bartlett), which maps objectGUID to and from entryUUID elements. This
> > is also an example of a module that doesn't use the local backend as
> > fallback storage.
> Firstly, I want to thank you very much for you hard work in this area,
> it has been a great assistance to me, particularly as I hit up against
> 'real' LDAP requirements, which required a mapping approach.
> While it took time, I am impressed with how well you picked up the
> complex code, and ran with it.
Thanks, and thanks again for the local_password module -- it helped a lot.
> > If noone objects, I'd very much like Andrew to merge these, so...
> > comments, anyone?
> I still think we need a better way to have it ignore the local DB.
> Currently for delete/rename operations, we still do some kind of 'local'
> search, despite there being no 'local' attributes.
I added a function to check whether either of the base DNs is NULL,
and changed the requests to only target the local DB if that is not
That should catch the situation you are interested in.
> The main issue is the need to reformat to Samba4s coding style
> (particularly with regard to the layout of function headers).
> I also think there would be value in splitting the ldb_map.c file up.
> At 3000 lines, it is very hard to move around in, and I frequently get
> I wonder if the the search functions could be split off into another
That's why I did that large restructuring commit, but splitting is
probably better in the long run.
I split the module into three files now (r17510), one for search, one
for add, modify, rename and delete, and one for the rest.
> Finally, is this hooked into the default testsuite? Doing so would help
> ensure it doesn't get broken in future.
No it isn't, but I can look into that tomorrow.
In the meantime, I've attached an updated version of the patch for
lib/ldb -- the other files haven't changed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 25347 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060813/26938a85/ldb-enable_mapping-module.2.patch.bin
More information about the samba-technical