automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Don't create world-writable files.


From: Benoit Sigoure
Subject: [PATCH] Don't create world-writable files.
Date: Sat, 10 Nov 2007 23:10:46 +0100

        There is one last occurrence in `distdir' but it seems to be there
        to work around buggy tar implementations.
        * Makefile.am (path-check): Here.
        * lib/am/distdir.am (distcheck): Here.
        * tests/defs.in (trap setup): Here.

Signed-off-by: Benoit Sigoure <address@hidden>
---
 ChangeLog         |    9 +++++++++
 Makefile.am       |    2 +-
 lib/am/distdir.am |    2 +-
 tests/defs.in     |    2 +-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aa64b97..042520b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-10  Benoit Sigoure  <address@hidden>
+
+       Don't create world-writable files.
+       There is one last occurrence in `distdir' but it seems to be there
+       to work around buggy tar implementations.
+       * Makefile.am (path-check): Here.
+       * lib/am/distdir.am (distcheck): Here.
+       * tests/defs.in (trap setup): Here.
+
 2007-11-04  Benoit Sigoure  <address@hidden>
 
        Document AM_MISSING_PROG.
diff --git a/Makefile.am b/Makefile.am
index bb069df..0b3238f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -351,7 +351,7 @@ path-check: distdir
 ## of files on stdin, at least.
          find . -print | xargs pathchk -p); \
          status=$$?; \
-         chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \
+         chmod -R u+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \
          exit $$status
 
 ## Program to use to fetch files.
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index ce547fd..9523eb3 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -339,7 +339,7 @@ distcheck: dist
 ## Make the new source tree read-only.  Distributions ought to work in
 ## this case.  However, make the top-level directory writable so we
 ## can make our new subdirs.
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       chmod -R a-w $(distdir); chmod u+w $(distdir)
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
 ## Undo the write access.
diff --git a/tests/defs.in b/tests/defs.in
index d79d874..6bc1222 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -245,7 +245,7 @@ trap 'exit_status=$?
   cd "$curdir"
   case $exit_status,$keep_testdirs in
   0,)
-    chmod -R a+rwx $testSubDir > /dev/null 2>&1
+    chmod -R u+rwx $testSubDir > /dev/null 2>&1
     rm -rf "$testSubDir" ;;
   esac
   test "$signal" != 0 &&
-- 
1.5.3.5.654.gdd5ec





reply via email to

[Prev in Thread] Current Thread [Next in Thread]