svn commit: samba r23553 - in branches: SAMBA_3_0/source/param SAMBA_3_0_26/source/param

Michael Adam ma at sernet.de
Wed Jun 20 10:25:32 GMT 2007


Hi List,

I would like to hear your opinion about this. 
I have added support for activation of global registry options
in smb.conf (by specifying "include = registry") in r23509.

With this it is in principle possible to create buggy or at least
strange configurations. With the idea in mind that the
"supported" configuration with registry global options would be
a "registry only configuration like

~~~~~~~~~~~~~~~~~~~~~~
[global]
include = registry
~~~~~~~~~~~~~~~~~~~~~~

I have now disabled the interpretation of "include" and "lock
directory" parameters in loadparm.c. 

If this is agreed, I could even disable _setting_ these parameters
deeper down in the registry code.

Of course, this still does not prevent the admin from creating a
screwd config like

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[global]
include = registry
lock directory = /some/other/dir
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

which effectively replaces the registry used after reading the
configuration from it. But this would fall under "unsupported
configurations".

What do you think? Is this a reasonable strategy?

Michael


On Mi, Jun 20, 2007 at 10:08:32 +0000, obnox at samba.org wrote:
> Author: obnox
> Date: 2007-06-20 10:08:31 +0000 (Wed, 20 Jun 2007)
> New Revision: 23553
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23553
> 
> Log:
> Also ignore "lock directory" in registry global options.
> 
> Michael
> 
> 
> Modified:
>    branches/SAMBA_3_0/source/param/loadparm.c
>    branches/SAMBA_3_0_26/source/param/loadparm.c
> 
> 
> Changeset:
> Modified: branches/SAMBA_3_0/source/param/loadparm.c
> ===================================================================
> --- branches/SAMBA_3_0/source/param/loadparm.c	2007-06-20 08:47:13 UTC (rev 23552)
> +++ branches/SAMBA_3_0/source/param/loadparm.c	2007-06-20 10:08:31 UTC (rev 23553)
> @@ -3163,9 +3163,12 @@
>  				  &type,
>  				  &size,
>  				  &data_p);
> -		if (strwicmp(valname,"include") == 0) {
> +		if ((strwicmp(valname,"include") == 0) ||
> +		    (strwicmp(valname, "lock directory") == 0) ||
> +		    (strwicmp(valname, "lock dir") == 0)) 
> +		{
>  			DEBUG(10, ("process_registry_globals: Ignoring "
> -				   "parameter 'include' in registry.\n"));
> +				   "parameter '%s' in registry.\n", valname));
>  			continue;
>  		}
>  		DEBUG(10, ("process_registry_globals: got value '%s'\n",
> 
> Modified: branches/SAMBA_3_0_26/source/param/loadparm.c
> ===================================================================
> --- branches/SAMBA_3_0_26/source/param/loadparm.c	2007-06-20 08:47:13 UTC (rev 23552)
> +++ branches/SAMBA_3_0_26/source/param/loadparm.c	2007-06-20 10:08:31 UTC (rev 23553)
> @@ -3164,9 +3164,12 @@
>  				  &type,
>  				  &size,
>  				  &data_p);
> -		if (strwicmp(valname,"include") == 0) {
> +		if ((strwicmp(valname,"include") == 0) ||
> +		    (strwicmp(valname, "lock directory") == 0) ||
> +		    (strwicmp(valname, "lock dir") == 0)) 
> +		{
>  			DEBUG(10, ("process_registry_globals: Ignoring "
> -				   "parameter 'include' in registry.\n"));
> +				   "parameter '%s' in registry.\n", valname));
>  			continue;
>  		}
>  		DEBUG(10, ("process_registry_globals: got value '%s'\n",
> 

-- 
Michael Adam <ma at sernet.de>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE


More information about the samba-technical mailing list