[patch] ldb in Samba3

tridge at samba.org tridge at samba.org
Sat Sep 23 02:59:55 GMT 2006


 > Thanks a lot, this looks very interesting!

no problem, I hope this will be the first of many uses of ldb in

 > Question: In alias_memberships, why didn't you use one big
 > ldb filter or'ing all the SIDs? If we ever back this to
 > LDAP, we save a lot of round trips this way.

yes, that would certainly be more efficient on a network. I was really
just being lazy, and not doing the talloc_asprintf_append() loop. I'll
fix it up.

About the upgrade path, I know when we discussed this earlier today we
decided on keeping the file as group_mapping.tdb, but I'm now not sure
its a good idea. We'd need a file_exists(), then we'd have to try and
open with tdb and look for the magic record, then we'd have to convert
to a new file and rename. We would also be in big trouble if anyone
ran an old version of Samba that install dir - we'd get corruption
instead of an error.

Would you be ok with this:

  - use group_mapping.ldb for ldb file

  - check at open for group_mapping.tdb, if it exists, then open, loop
    converting, calling the ldb add function (via existing fns in
    mapping_ldb.c), and unlink tdb file

We could go all the way and add a "group mapping backend = tdb/ldb"
option, but I don't see much point to it. It's certainly easy to do
(as the code is now abstracted, its easy to add a method structure). 

Jerry, any opinions on upgrade paths for dbs like this?

Finally, should Samba3 build ldbedit, ldbsearch etc? They are easy
enough to add to the Makefile, but only if they are wanted.

Cheers, Tridge

More information about the samba-technical mailing list