Fw: [PATCH] testparm: Warnings should not cause failure

Christof Schmitt cs at samba.org
Fri Nov 15 11:23:56 MST 2013


On Sat, Nov 16, 2013 at 05:15:38AM +1100, Martin Schwenke wrote:
> Anyone?
> 
> peace & happiness,
> martin
> 
> 
> Begin forwarded message:
> 
> Date: Tue, 5 Nov 2013 06:38:03 +1100
> From: Martin Schwenke <martin at meltin.net>
> To: Samba Technical <samba-technical at samba.org>
> Subject: [PATCH] testparm: Warnings should not cause failure
> 
> 
> Remove the return code of 1 associated with some warnings.  Warnings
> should not cause failure.  If any of these cases should cause a
> failure then they should be changed to errors.

I agree.

Reviewed-by: Christof Schmitt <cs at samba.org>

> 
> peace & happiness,
> martin

> >From 99edf8a9072b5b179440f008c98d7600febd3d79 Mon Sep 17 00:00:00 2001
> From: Martin Schwenke <martin at meltin.net>
> Date: Tue, 5 Nov 2013 06:31:29 +1100
> Subject: [PATCH] testparm: Warnings should not cause failure
> 
> Remove the return code of 1 associated with some warnings.  Warnings
> should not cause failure.  If any of these cases should cause a
> failure then they should be changed to errors.
> 
> Signed-off-by: Martin Schwenke <martin at meltin.net>
> ---
>  source3/utils/testparm.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
> index 1c13b52..ce85353 100644
> --- a/source3/utils/testparm.c
> +++ b/source3/utils/testparm.c
> @@ -86,7 +86,6 @@ static int do_global_checks(void)
>  	if (strequal(lp_workgroup(), lp_netbios_name())) {
>  		fprintf(stderr, "WARNING: 'workgroup' and 'netbios name' "
>  				"must differ.\n\n");
> -		ret = 1;
>  	}
>  
>  	if (!directory_exist_stat(lp_lockdir(), &st)) {
> @@ -97,7 +96,6 @@ static int do_global_checks(void)
>  		fprintf(stderr, "WARNING: lock directory %s should have "
>  				"permissions 0755 for browsing to work\n\n",
>  		       lp_lockdir());
> -		ret = 1;
>  	}
>  
>  	if (!directory_exist_stat(lp_statedir(), &st)) {
> @@ -108,7 +106,6 @@ static int do_global_checks(void)
>  		fprintf(stderr, "WARNING: state directory %s should have "
>  				"permissions 0755 for browsing to work\n\n",
>  		       lp_statedir());
> -		ret = 1;
>  	}
>  
>  	if (!directory_exist_stat(lp_cachedir(), &st)) {
> @@ -119,7 +116,6 @@ static int do_global_checks(void)
>  		fprintf(stderr, "WARNING: cache directory %s should have "
>  				"permissions 0755 for browsing to work\n\n",
>  		       lp_cachedir());
> -		ret = 1;
>  	}
>  
>  	if (!directory_exist_stat(lp_piddir(), &st)) {
> -- 
> 1.8.4.rc3
> 


More information about the samba-technical mailing list