summaryrefslogtreecommitdiff
path: root/Porting/makerel
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2010-09-13 21:32:50 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2010-09-13 21:32:50 +0100
commit690165debe9e5428b4d2b06af2a8db2855f070ac (patch)
tree5c8cf9a6503ac9cb97a56888fcd840c0af7b4e49 /Porting/makerel
parent7dbca55b2b3f033818571019319aee7933e331d1 (diff)
downloadperl-690165debe9e5428b4d2b06af2a8db2855f070ac.tar.gz
Make the setting of write-bits safer in Porting\makerel
When rolling a release on Windows it is useful to use the Cygwin tools, but the chmod command doesn't honour the user's umask when operating outside of the Cygwin bash shell. For example, with a umask of 0022 and a file having permissions 0400, one would expect "chmod +w" to change the file's permissions to 0600. It does inside the Cygwin bash shell, but inside the standard Windows command prompt it changes the file permissions to 0622 instead. The problem is avoided by using "chmod u+w" instead to be sure that we only set the write-bit for the owner user. Note that the PAUSE indexer now detects uploads containining world writable files or directories and will not index them. In such cases, it generates new tarballs with "-withoutworldwritables" injected into the names and indexes those instead of the original uploads. We do not want this happening to perl distributions!
Diffstat (limited to 'Porting/makerel')
-rwxr-xr-xPorting/makerel2
1 files changed, 1 insertions, 1 deletions
diff --git a/Porting/makerel b/Porting/makerel
index 4d31c70750..2f845487a0 100755
--- a/Porting/makerel
+++ b/Porting/makerel
@@ -161,7 +161,7 @@ my @writables = qw(
utils/Makefile
uconfig.h
);
-system("chmod +w @writables") == 0
+system("chmod u+w @writables") == 0
or die "system: $!";
chdir ".." or die $!;