From 2e1bb87af24e3cb053bb3d5f4bb6e2e72f79c44a Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Sat, 3 Feb 2024 19:55:23 -0500 Subject: install.sh: avoid creating symlinks with restricted permissions Linux and most systems do not have symlink permissions, but some systems, including MacOS, do, and creation of the symlink with umask set to 0777 makes the symlink inaccessible on such systems. clear umask when making a symlink so that the behavior is uniform. --- tools/install.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index d913b60b..855a8ca2 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -48,7 +48,9 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP umask 077 if test "$symlink" ; then +umask 000 ln -s "$1" "$tmp" +umask 077 else cat < "$1" > "$tmp" chmod "$mode" "$tmp" -- cgit 1.4.1