summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in3
-rw-r--r--NEWS4
-rw-r--r--lib/am/distdir.am9
4 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f0360a263..8f3ea9c1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-28 Jim Meyering <meyering@redhat.com>
+
+ do not put world-writable directories in distribution tarballs
+ * lib/am/distdir.am (distdir): Do not make all directories
+ group- or world-writable. Instead, use 755.
+ * NEWS: Update.
+
2005-10-17 Stepan Kasal <kasal@ucw.cz>
* doc/automake.texi (Program and Library Variables): Typo.
diff --git a/Makefile.in b/Makefile.in
index 68d236d1a..b7aa31831 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -415,7 +415,8 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
diff --git a/NEWS b/NEWS
index bc26dbd28..998b161de 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,8 @@
Bugs fixes in 1.9.6a:
+
+* Longstanding bugs:
+
+ - The distribution is tarred up with mode 755 now by the `dist*' targets.
Bugs fixed in 1.9.6:
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 151f5f0ff..b64b2de46 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -192,11 +192,7 @@ if %?DIST-TARGETS%
endif %?DIST-TARGETS%
##
## This complex find command will try to avoid changing the modes of
-## links into the source tree, in case they're hard-linked. It will
-## also make directories writable by everybody, because some
-## brain-dead tar implementations change ownership and permissions of
-## a directory before extracting the files, thus becoming unable to
-## extract them.
+## links into the source tree, in case they're hard-linked.
##
## Ignore return result from chmod, because it might give an error
## if we chmod a symlink.
@@ -209,7 +205,8 @@ endif %?DIST-TARGETS%
## the file in place in the source tree.
##
if %?TOPDIR_P%
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \