smb.conf in registry

Michael Adam obnox at samba.org
Sat Sep 21 03:14:53 CEST 2013


anybody?

On 2013-09-17 at 19:31 +0200, Michael Adam wrote:
> On 2013-09-17 at 00:42 -0700, Matthieu Patou wrote:
> > On 09/14/2013 11:26 PM, Michael Adam wrote:
> > >
> > >When I wrote this, there was no separate "state directory"
> > >parameter. So I should probably add "state directory" to the
> > >list of forbidden parameters...
> > That would be bad idea actually, as state is used to store the
> > sysvol in AD mode (well maybe it shouldn't be in lp_state ...) as it
> > would pretty much mean that we couldn't have the AD smb.conf in
> > registry.
> 
> The first thing is that we may not change the directory the
> registry file is located in the registry config itself.
> 
> Attached find a patch that adds "state directory" to the
> list of forbidden parameters in the registry.
> Please review and push if you are ok with it.
> We should probably also do a bug report for this
> for 4.1, 4.0, 3.6 ...
> 
> The next thing is that it would certainly be nice to
> use registry config for the AD setup. There are various
> possible ways out of that. Either we put the sysvol
> into a different path. Or we put the registry db into
> a different path. Maybe others. This needs more thought,
> at least from my side. Possibly others have more ideas.
> 
> Cheers - Michael

> From 0171718122a7244439f5004cdd8189293839afac Mon Sep 17 00:00:00 2001
> From: Michael Adam <obnox at samba.org>
> Date: Tue, 17 Sep 2013 19:10:48 +0200
> Subject: [PATCH] smbconf: add "state directory" to the list of forbidden
>  parameters for registry config
> 
> At the time when the registry configuration was introduced,
> the registry database file was placed in the "lock directory".
> So the "lock directory" was added to the list of parameters
> that may not be changed in the registry configuration
> (because the next config reload would then load a different
>  registry and drop all the original seetings).
> 
> Later, "state directory" and "cache directory" were introduced,
> both defaulting to "lock directory". And the registry's location
> was changed to "state directory".
> 
> It slipped my attention that the forbidden parameters for the
> should have been adapted at the time.
> 
> So this patch adds "state directory" to the list.
> It keeps the lock directory, to catch the case
> where the state directory is not explicitly set, hence
> defaulting to the "lock directory".
> 
> Signed-off-by: Michael Adam <obnox at samba.org>
> ---
>  source3/lib/smbconf/smbconf_reg.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
> index ec6b93f..21f65a8 100644
> --- a/source3/lib/smbconf/smbconf_reg.c
> +++ b/source3/lib/smbconf/smbconf_reg.c
> @@ -57,6 +57,8 @@ static bool smbconf_reg_valname_forbidden(const char *valname)
>  {
>  	/* hard code the list of forbidden names here for now */
>  	const char *forbidden_valnames[] = {
> +		"state directory",
> +		"state dir",
>  		"lock directory",
>  		"lock dir",
>  		"config backend",
> -- 
> 1.7.9.5
> 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130921/d0ba14dc/attachment.pgp>


More information about the samba-technical mailing list