From 5188a9d0265cc6f7235a8af1d31ab02e4a24853d Mon Sep 17 00:00:00 2001 From: Romain GEISSLER Date: Wed, 12 May 2021 07:45:33 +0530 Subject: Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash instead (FYI, this is a repost of https://sourceware.org/pipermail/libc-alpha/2019-July/105035.html now that FSF papers have been signed and confirmed on FSF side). This trivial patch attemps to fix BZ 24106. Basically the bash locally used when building glibc on the host shall not leak on the installed glibc, as the system where it is installed might be different and use another bash location. So I have looked for all occurences of @BASH@ or $(BASH) in installed files, and replaced it by /bin/bash. This was suggested by Florian Weimer in the bug report. Reviewed-by: Siddhesh Poyarekar --- elf/Makefile | 4 +--- elf/ldd.bash.in | 2 +- elf/sotruss.sh | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'elf') diff --git a/elf/Makefile b/elf/Makefile index 3241cb6046..4e148e532a 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -144,8 +144,7 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \ $(common-objpfx)libc_nonshared.a $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make - sed -e 's%@BASH@%$(BASH)%g' \ - -e 's%@VERSION@%$(version)%g' \ + sed -e 's%@VERSION@%$(version)%g' \ -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \ -e 's%@PREFIX@%$(prefix)%g' \ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ @@ -654,7 +653,6 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \ -e 's%@VERSION@%$(version)%g' \ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \ - -e 's%@BASH@%$(BASH)%g' \ -e 's%@TEXTDOMAINDIR@%$(localedir)%g' ifeq ($(ldd-rewrite-script),no) diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in index 57442bc3f2..ba736464ac 100644 --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is part of the GNU C Library. diff --git a/elf/sotruss.sh b/elf/sotruss.sh index fd4da80244..003cf4d825 100755 --- a/elf/sotruss.sh +++ b/elf/sotruss.sh @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 2011-2021 Free Software Foundation, Inc. # This file is part of the GNU C Library. -- cgit v1.2.3-70-g09d2