svn commit: samba r17738 - in branches/SAMBA_4_0/source/lib/ldb: . ldb_tdb

tridge at tridge at
Thu Aug 24 00:26:53 GMT 2006


 > Tridge, wouldn't it make sense to create a libreplace, and make tdb,
 > talloc, ldb and samba4 to depend on it?
 > We may even backport and share it with samba3 so that we ahve a common
 > set or replacement functions.

possibly ... it does have some disadvantages tho.

Say we made a libreplace, and put all the lib/replace/ stuff from
Samba4 in it. That would mean that even a standalone talloc or tdb
build would start to depend on all sorts of libc functions and
libraries that they don't need (such as things like initgroups(),
innetgr(), chroot() etc). In turn that would mean that if some
external project wanted to use talloc, then they would be forced to
use our replacements for those functions. 

While our replacements work well for us, I'm not so confident of them
that I would want to force them on everyone who might want to use
talloc or tdb.

So I'm inclined to only replace functions in talloc that talloc
actually uses, and only replace functions in tdb that tdb uses. It
means that we are going to end up with our portability code more
spread out though.

Alternatively, we could try to work out some way of having a common
lib/replace/, but only pulling in the bits that are needed when using
it in each package. I can think of a couple of ways of doing that, but
they aren't exactly pretty.

Cheers, Tridge

More information about the samba-technical mailing list