My plans and direction for a merged loadparm

simo idra at samba.org
Tue Jun 28 05:53:47 MDT 2011


On Tue, 2011-06-28 at 19:30 +1000, Andrew Bartlett wrote:
> I'm continuing to work on a merged loadparm.  My hope is to have a
> common set of parameters that we load, common values for those
> parameters and hopefully a single loadparm implementation.
> 
> So the list isn't blind-sided by my changes, I figured it might be worth
> pointing out the rough course I'm trying to plot:
> 
> My next step is to change the source3 loadparm code to use offset (ie,
> offsetof() integers for global and local variables.  Local (per-share)
> variables already use offsets, but do so implicitly via PTR_DIFF calls
> at runtime.  If we use them globally, we can share the struct
> param_struct between the two implementations, which in turn makes it
> easier to complete the loadparm_s3_ctx() code. 
> 
> My not-yet-working patch is very large (due to the need to change every
> smb.conf option), but it has not been feasible to make it smaller,
> mostly because it needs to rename .ptr to .offset at the same time. 

Have you thought of using macros in order to be able to make this in
steps ?
#define offset ptr

> http://git.samba.org/?p=abartlet/samba.git/.git;a=commitdiff;h=0e2bf4ebddc4bc91b0cbe68501185c53ed2a09fd
> 
> Once I get this going, my plan is to reformat the parameter table in
> source4/param to the same C99 format as source3/param, and to put the
> common elements in a .c file that is included into both. 
> 
> As part of that, I would like to auto-generate the loadparm_global and
> loadparm_service tables in source3/param much like I do in
> source4/param.  sDefaults in source3/param/loadparm.c will need to be
> C99 initialised at this point. 
> 
> Andrew Bartlett


-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list