瀏覽代碼

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 年之前
父節點
當前提交
d501c22ae4
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/mapred/org/apache/hadoop/filecache/TrackerDistributedCacheManager.java

+ 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
         // 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);
     localFs.setPermission(destination, permission);
 
 
     LOG.info(String.format("Cached %s as %s",
     LOG.info(String.format("Cached %s as %s",