From 690165debe9e5428b4d2b06af2a8db2855f070ac Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Mon, 13 Sep 2010 21:32:50 +0100 Subject: 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! --- Porting/makerel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Porting/makerel') 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 $!; -- cgit v1.2.1