"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: gotwebd.conf.5: Fix a typo
To:
Josiah Frentsos <jfrent@tilde.team>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 15 Jun 2023 12:27:30 +0200

Download raw body.

Thread
On 2023/05/11 08:43:26 -0400, Josiah Frentsos <jfrent@tilde.team> wrote:
> On Sun, May 07, 2023 at 11:16:00AM -0600, Tracey Emery wrote:
> > I'm fine with that.
> > 
> > On May 7, 2023 2:02:33 AM MDT, Stefan Sperling <stsp@stsp.name> wrote:
> > >On Sat, May 06, 2023 at 05:05:56PM -0600, Tracey Emery wrote:
> > >> No is a valid configuration, which is why it was listed. But cool idea and near catch, regardless. Yes no, on off, true false. At least my brain says that was the original idea.
> > >
> > >The man page displays "on | off" for such settings.
> > >
> > >Supporting both "no" and "on" as valid syntax with an opposite meaning
> > >could easily result in accidental misconfiguration.
> > >Should we remove "yes/no" from the syntax to prevent this?

just noticed that this was still pending.  Committed, thanks!

> diff bfcdc9e9816dc81c90ce2db28ad9b602ec06b95a f41cc1b4a1871248c3ac1df4f19cba078434f070
> commit - bfcdc9e9816dc81c90ce2db28ad9b602ec06b95a
> commit + f41cc1b4a1871248c3ac1df4f19cba078434f070
> blob - 78e7f005317e5620be61b4b2bb064c91e4eff405
> blob + 765208e819180a987e11496151b42a2800b2aed9
> --- gotwebd/gotwebd.conf.5
> +++ gotwebd/gotwebd.conf.5
> @@ -204,9 +204,9 @@ server "localhost-unix" {
>  	# on by default
>  	#show_site_owner  on
>  	#show_repo_owner  on
>  	#show_repo_age  on
> -	#show_repo_description no
> +	#show_repo_description on
>  	#show_repo_cloneurl  on
>  	#respect_exportok off
>  
>  	#max_repos   0
> blob - d5a7dbbee8448313fbb103ee1f02db4a45a1bb10
> blob + 59772ae24db728527ea2792f7987419ce5dc911d
> --- gotwebd/parse.y
> +++ gotwebd/parse.y
> @@ -160,14 +160,12 @@ boolean		: STRING {
>  		;
>  
>  boolean		: STRING {
>  			if (strcasecmp($1, "1") == 0 ||
> -			    strcasecmp($1, "yes") == 0 ||
>  			    strcasecmp($1, "on") == 0)
>  				$$ = 1;
>  			else if (strcasecmp($1, "0") == 0 ||
> -			    strcasecmp($1, "off") == 0 ||
> -			    strcasecmp($1, "no") == 0)
> +			    strcasecmp($1, "off") == 0)
>  				$$ = 0;
>  			else {
>  				yyerror("invalid boolean value '%s'", $1);
>  				free($1);
> @@ -341,10 +339,9 @@ serveropts1	: REPOS_PATH STRING {
>  			}
>  			new_srv->fcgi_socket = 1;
>  		}
>  		| LISTEN ON SOCKET STRING {
> -			if (!strcasecmp($4, "off") ||
> -			    !strcasecmp($4, "no")) {
> +			if (strcasecmp($4, "off") == 0) {
>  				new_srv->unix_socket = 0;
>  				free($4);
>  				YYACCEPT;
>  			}