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: <20240705170503.GD987634@thelio-3990X>
Date: Fri, 5 Jul 2024 10:05:03 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nicolas Schier <nicolas@...sle.eu>
Subject: Re: [PATCH] kbuild: deb-pkg: use default string when variable is
 unset or null

On Fri, Jul 05, 2024 at 12:23:32AM +0900, Masahiro Yamada wrote:
> ${DEBFULLNAME-${user}} falls back to ${user} when DEBFULLNAME is unset.
> It is more reasonable to do so when DEBFULLNAME is unset or null.
> 
> Otherwise, the command:
> 
>   $ DEBFULLNAME= make deb-pkg
> 
> will leave the name field blank.
> 
> The same applies to KBUILD_BUILD_USER and KBUILD_BUILD_HOST.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>

Yeah, it definitely does not really make sense to let someone do that,
although I am not really sure why anyone would...

Reviewed-by: Nathan Chancellor <nathan@...nel.org>

> ---
> 
>  scripts/package/mkdebian | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 0cc1913aad30..196b14e8ad47 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -125,12 +125,12 @@ gen_source ()
>  rm -rf debian
>  mkdir debian
>  
> -user=${KBUILD_BUILD_USER-$(id -nu)}
> -name=${DEBFULLNAME-${user}}
> +user=${KBUILD_BUILD_USER:-$(id -nu)}
> +name=${DEBFULLNAME:-${user}}
>  if [ "${DEBEMAIL:+set}" ]; then
>  	email=${DEBEMAIL}
>  else
> -	buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)}
> +	buildhost=${KBUILD_BUILD_HOST:-$(hostname -f 2>/dev/null || hostname)}
>  	email="${user}@...uildhost}"
>  fi
>  maintainer="${name} <${email}>"
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ