Pass lp_ctx parameters to tdb functions

Andrew Bartlett abartlet at samba.org
Wed Oct 12 06:08:35 MDT 2011


On Wed, 2011-10-12 at 10:56 +1100, Andrew Bartlett wrote:
> On Tue, 2011-10-11 at 15:52 +0200, Michael Adam wrote:
> >        via  6fb5c47 s3:torture: convert torture.c to only use dbwrap wrapper functions
> 
> Michael,
> 
> I just wanted to give you a heads up, that I think this could be really,
> really useful in my hope to restore the smb.conf configuration options
> in the tdb_wrap code.
> 
> When I merged everything for the top level build, I cheated and #ifdefed
> out the 'use mmap' and tdb_hashsize parameters in the common tdb_wrap.c
> for Samba4 builds.  
> 
> Part of why I'm keen to get the lpcfg_ shim available is to correct
> this, and so I propose to add an (optional) struct loadparm_context
> parameter to tdb_wrap_open(), and to have the dbwrap code provide this
> (based on the loadparm_init_s3()).

I've pushed a number of patches to restore this functionality to:

http://git.samba.org/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/lpcfg-for-tdb-mmap-control

(currently the top 5 patches)

Please let me know what you think, and any suggestions you have.  I
didn't make the loadparm optional in the end - it was mostly pretty
painless to add it to all the required places.  I'm running a 'make
test' on it here, but it looks good so far.

> I need to check with rusty, but I think this will also allow us to turn
> on tdb2 with an smb.conf option.

I'll add this as soon as I get the information from rusty about how to
do this.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list