My plans and direction for a merged loadparm

Andrew Bartlett abartlet at samba.org
Tue Jun 28 03:30:15 MDT 2011


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. 

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
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list