[tbb-commits] [tor-browser-bundle/master] Bug 11240: Don't run chmod on (dangling) symlinks.

gk at torproject.org gk at torproject.org
Wed Apr 2 08:32:49 UTC 2014


commit 681b1598bbbb0704f620bc0e27624a46d6f51f89
Author: Georg Koppen <gk at torproject.org>
Date:   Wed Apr 2 10:30:11 2014 +0000

    Bug 11240: Don't run chmod on (dangling) symlinks.
---
 gitian/build-helpers/dtar.sh |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gitian/build-helpers/dtar.sh b/gitian/build-helpers/dtar.sh
index 282ec2d..e8ec340 100755
--- a/gitian/build-helpers/dtar.sh
+++ b/gitian/build-helpers/dtar.sh
@@ -5,7 +5,8 @@ export LC_ALL=C
 TARFILE=$1
 shift
 
-find $@ -executable -exec chmod 700 {} \;
-find $@ ! -executable -exec chmod 600 {} \;
+# No need to execute chmod on (possibly) dangling symlinks.
+find $@ ! -type l -executable -exec chmod 700 {} \;
+find $@ ! -type l ! -executable -exec chmod 600 {} \;
 
 find $@ | sort | tar --no-recursion -Jcvf $TARFILE -T -



More information about the tbb-commits mailing list