From 590dbba228c1ab55cd925828a49cc400a85e138d Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 27 Jun 2021 18:28:07 -0700 Subject: [PATCH] chrootsetup_*: make sure pull_in_bin binaries are 0755 When pulling in binaries into the chroot, do make sure that they end up with permissions 0755 regardless of what they started out with. If they were built under odd circumstances, they could possibly have unusual permissions. A future update ought to do the same thing for pulled in libraries. Signed-off-by: Kyle J. McKay --- chrootsetup_dragonfly.sh | 1 + chrootsetup_freebsd.sh | 1 + chrootsetup_linux.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/chrootsetup_dragonfly.sh b/chrootsetup_dragonfly.sh index 152fbe8..95ac19b 100644 --- a/chrootsetup_dragonfly.sh +++ b/chrootsetup_dragonfly.sh @@ -110,6 +110,7 @@ pull_in_bin() { for lib in $(ldd "$bin" | grep '=>' | LC_ALL=C awk '{print $3}'); do pull_in_lib "$lib" lib done + chmod 0755 "var/tmp/$(basename "$bin")" mv -f "var/tmp/$(basename "$bin")" "$bdst/$bnam" } diff --git a/chrootsetup_freebsd.sh b/chrootsetup_freebsd.sh index 4d9c7cd..abcbe1c 100644 --- a/chrootsetup_freebsd.sh +++ b/chrootsetup_freebsd.sh @@ -104,6 +104,7 @@ pull_in_bin() { for lib in $(ldd "$bin" | grep '=>' | LC_ALL=C awk '{print $3}'); do pull_in_lib "$lib" lib done + chmod 0755 "var/tmp/$(basename "$bin")" mv -f "var/tmp/$(basename "$bin")" "$bdst/$bnam" } diff --git a/chrootsetup_linux.sh b/chrootsetup_linux.sh index 01f598a..62f3d69 100644 --- a/chrootsetup_linux.sh +++ b/chrootsetup_linux.sh @@ -141,6 +141,7 @@ pull_in_bin() { for lib in $(extract_libs "$bin"); do pull_in_lib "$lib" lib done + chmod 0755 "var/tmp/$(basename "$bin")" mv -f "var/tmp/$(basename "$bin")" "$bdst/$bnam" } -- 2.11.4.GIT