lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230120074910.966fdeea1fe670c25be7670d@kernel.org>
Date:   Fri, 20 Jan 2023 07:49:10 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Antonio Alvarez Feijoo <antonio.feijoo@...e.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/bootconfig: fix single & used for logical
 condition

On Thu, 12 Jan 2023 12:42:15 +0100
Antonio Alvarez Feijoo <antonio.feijoo@...e.com> wrote:

> A single & will create a background process and return true, so the grep
> command will run even if the file checked in the first condition does not
> exist.
> 

Good catch!

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thank you!

> Signed-off-by: Antonio Alvarez Feijoo <antonio.feijoo@...e.com>
> ---
>  tools/bootconfig/scripts/ftrace2bconf.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
> index 6183b36c6846..1603801cf126 100755
> --- a/tools/bootconfig/scripts/ftrace2bconf.sh
> +++ b/tools/bootconfig/scripts/ftrace2bconf.sh
> @@ -93,7 +93,7 @@ referred_vars() {
>  }
>  
>  event_is_enabled() { # enable-file
> -	test -f $1 & grep -q "1" $1
> +	test -f $1 && grep -q "1" $1
>  }
>  
>  per_event_options() { # event-dir
> -- 
> 2.35.3
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ