about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorRomain GEISSLER <romain.geissler@amadeus.com>2021-05-12 07:45:33 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-05-12 07:47:11 +0530
commit5188a9d0265cc6f7235a8af1d31ab02e4a24853d (patch)
tree048496f1c8a02ab8db081ee3f016be726514a39f /malloc
parentfec776b827755a0aac17a0745bc38c2329aad5ca (diff)
downloadglibc-5188a9d0265cc6f7235a8af1d31ab02e4a24853d.tar.gz
glibc-5188a9d0265cc6f7235a8af1d31ab02e4a24853d.tar.xz
glibc-5188a9d0265cc6f7235a8af1d31ab02e4a24853d.zip
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 <siddhesh@sourceware.org>
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Makefile5
-rwxr-xr-xmalloc/memusage.sh2
2 files changed, 3 insertions, 4 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 641967c512..afcd296ef6 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -238,9 +238,8 @@ $(objpfx)mtrace: mtrace.pl
 
 $(objpfx)memusage: memusage.sh
 	rm -f $@.new
-	sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
-	    -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
-	    -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+	sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
+	    -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
 
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index c1cd4e23b7..0645f09911 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -1,4 +1,4 @@
-#! @BASH@
+#!/bin/bash
 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.