[patch] testparm --section-name, --parameter-name, and --show-all-parameters

Lars MÜLLER lmuelle at SuSE.de
Sat Jun 4 15:59:30 GMT 2005


On Fri, Jun 03, 2005 at 09:42:18AM -0700, Jeremy Allison wrote:
> On Fri, Jun 03, 2005 at 03:17:54PM +0200, Lars MÜLLER wrote:
> > 
> > I've added three new options to testparm to make it handier for the
> > daily usage.
> > 
> > --section-name allows to limit the view of testparm to one section.  If
> > you use global it shows the global section.
> > 
> > --parameter-name allows to limit the view to one parameter.  If the
> > section name isn't set global is assumed.

This is intended to replace testparm -sv | grep "^[[:space:]]*foo bar ="
statements.

> > --show-all-parameters outputs a ini file with [local] and [global]
> > sections of all available parameters, the type, possible values for
> > enums, and the flags. For example:
> > 
> > ldap ssl=P_ENUM,no|No|off|Off|start tls|Start_tls,FLAG_ADVANCED
> > 
> > This might allow a configuration tool to provide appropriate control
> > widgets for each parameter.  We'll create this list while the build
> > process and ship it with the Samba package.
> > 
> > The patch is attached to bug #2767.
> > 
> > Any comments?
> 
> Looks really good to me (although I'll valgrind it to be sure :-). I
> should do that more often with my own code :-) :-).

Done for the following command line settings:

--section-name global
--section-name mig

No problems reported for the new code if valgrinded with --tool=memcheck
--num-callers=20 --leak-check=yes --show-reachable=yes

--section-name global --parameter-name workgroup
--section-name mig --parameter-name path

Also no problems reported for dump_a_parameter().

--show-all-parameters

Also no problems reported.

Lars
-- 
Lars MÜLLER [ˈlaː(r)z ˈmʏlɐ]
SuSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050604/979ce3ea/attachment.bin


More information about the samba-technical mailing list