[PATCH] Use talloc in source3 loadparm, make more handlers common

Andrew Bartlett abartlet at samba.org
Sun Mar 9 19:36:23 MDT 2014


On Wed, 2014-02-26 at 14:14 +0100, Andreas Schneider wrote:
> On Monday 24 February 2014 17:46:52 you wrote:
> > Now that much of loadparm is generated and made regular, Garming's
> > attention has turned to the requested task of merging common code.  In
> > particular, there is a strong desire to undo the #include of
> > param_table.c, and these steps are all critical to that goal.
> > 
> > The patch series starts with a simple talloc -> malloc conversion, and
> > later patches construct an appropriate talloc tree.  Many other small
> > changes are needed or desired along the way.
> > 
> > The general approach is to use the s3_fns hook to handle the special
> > cases where the source3 code does something different, and to then
> > slowly eliminate these hooks as even more code becomes common.
> > 
> > The patch series starts here:
> > 
> > https://gerrit.sernet.de/97
> > 
> > https://gerrit.sernet.de/#/q/status:open+project:samba+branch:master+topic:l
> > oadparm-talloc-polish,n,z
> 
> I've reviewed them in Gerrit. There are function were I think we should remove 
> them completely and use talloc and talloc pools.

Updated patches are in gerrit. 

As far as I can see, the concerns raised in your earlier review on this
code in gerrit have been addressed, and we now have patch extending the
successful docs.py testsuite to confirm values can be correctly set. 

See
http://git.catalyst.net.nz/gitweb?p=samba.git;a=shortlog;h=refs/heads/loadparm-talloc-polish and starting at https://gerrit.samba.org/97/ and ending at https://gerrit.samba.org/160 in gerrit.

 lib/param/loadparm.c         |  253 +++++++++-------
 lib/param/loadparm.h         |    8 
 lib/param/param.h            |    2 
 lib/param/s3_param.h         |    1 
 python/samba/tests/docs.py   |  136 ++++++++
 source3/include/proto.h      |    1 
 source3/param/loadparm.c     |  666
++++++++++++-------------------------------
 source3/param/loadparm_ctx.c |    3 
 8 files changed, 482 insertions(+), 588 deletions(-)

Please carefully review. 

Thanks!

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list