Browse Source

commit 80bbabd85ae472bd8eeb2d8d56788265159210e5
Author: Owen O'Malley <omalley@apache.org>
Date: Sat Sep 18 22:20:35 2010 -0700

make cache archives not world writable


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077702 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 years ago
parent
commit
d501c22ae4

+ 4 - 1
src/mapred/org/apache/hadoop/filecache/TrackerDistributedCacheManager.java

@@ -506,7 +506,10 @@ public class TrackerDistributedCacheManager {
         // and copy the file into the dir as it is
       }
     }
-    // set proper permissions for the localized directory
+    // set proper permissions for the localized copy
+    if (isArchive) {
+      localFs.setPermission(parchive, permission);
+    }
     localFs.setPermission(destination, permission);
 
     LOG.info(String.format("Cached %s as %s",