hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1356971 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
Date Tue, 03 Jul 2012 21:43:26 GMT
Author: eli
Date: Tue Jul  3 21:43:25 2012
New Revision: 1356971

URL: http://svn.apache.org/viewvc?rev=1356971&view=rev
Log:
HDFS-3581. FSPermissionChecker#checkPermission sticky bit check missing range check. Contributed
by Eli Collins

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1356971&r1=1356970&r2=1356971&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Tue Jul  3 21:43:25 2012
@@ -399,6 +399,9 @@ Branch-2 ( Unreleased changes )
 
     HDFS-3574. Fix small race and do some cleanup in GetImageServlet (todd)
 
+    HDFS-3581. FSPermissionChecker#checkPermission sticky bit check
+    missing range check. (eli)
+
   BREAKDOWN OF HDFS-3042 SUBTASKS
 
     HDFS-2185. HDFS portion of ZK-based FailoverController (todd)

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java?rev=1356971&r1=1356970&r2=1356971&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
Tue Jul  3 21:43:25 2012
@@ -127,10 +127,10 @@ class FSPermissionChecker {
           ancestorIndex--);
       checkTraverse(inodes, ancestorIndex);
 
-      if(parentAccess != null && parentAccess.implies(FsAction.WRITE)
-          && inodes[inodes.length - 1] != null)
+      if (parentAccess != null && parentAccess.implies(FsAction.WRITE)
+          && inodes.length > 1 && inodes[inodes.length - 1] != null) {
         checkStickyBit(inodes[inodes.length - 2], inodes[inodes.length - 1]);
-
+      }
       if (ancestorAccess != null && inodes.length > 1) {
         check(inodes, ancestorIndex, ancestorAccess);
       }

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java?rev=1356971&r1=1356970&r2=1356971&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
Tue Jul  3 21:43:25 2012
@@ -259,8 +259,8 @@ public class TestWebHdfsFileSystemContra
     assertTrue(status != null);
     assertEquals(0777, status.getPermission().toShort());
 
-    //delete root - disabled due to a sticky bit bug 
-    //assertFalse(fs.delete(root, true));
+    //delete root
+    assertFalse(fs.delete(root, true));
 
     //create file using root path 
     try {



Mime
View raw message