[PATCH] Allow include= to point as a missing file in lib/param

Jeremy Allison jra at samba.org
Fri Aug 23 13:33:11 MDT 2013


On Thu, Aug 22, 2013 at 05:00:25PM +1200, Andrew Bartlett wrote:
> This helps particularly when include = points at a % macro that
> lib/param currently can't handle, and matches the source3 code, ensuring
> it can load more otherwise valid configurations.
> 
> Andrew Bartlett
> -- 
> Andrew Bartlett
> http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> Samba Developer, Catalyst IT                   http://catalyst.net.nz
> 

> >From d4f4ea9bbc885db8bc758db6184871acbaf19e2e Mon Sep 17 00:00:00 2001
> From: Andrew Bartlett <abartlet at samba.org>
> Date: Wed, 21 Aug 2013 13:59:53 +1200
> Subject: [PATCH] lib/param: Allow include file to be missing
> 
> This matches the smb.conf loader in source3/param and allows a more graceful handling
> of the lack of % macros and for files that are simply not present at this time.
> 
> Andrew Bartlett
> ---
>  lib/param/loadparm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
> index fc209a7..e8c40c3 100644
> --- a/lib/param/loadparm.c
> +++ b/lib/param/loadparm.c
> @@ -1138,7 +1138,7 @@ static bool handle_include(struct loadparm_context *lp_ctx, int unused,
>  
>  	DEBUG(2, ("Can't find include file %s\n", fname));
>  
> -	return false;
> +	return true;
>  }
>  
>  /***************************************************************************
> -- 
> 1.7.10.4

LGTM but missing Signed-off-by: line. Can you add it and I'll
push to autobuild.

Cheers,

	Jeremy.


More information about the samba-technical mailing list