HDFS-3581. FSPermissionChecker#checkPermission sticky bit check missing range check. Contributed by Eli Collins
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1356971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8188c1cb41
commit
359b4efd19
|
@ -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)
|
||||
|
|
|
@ -128,9 +128,9 @@ class FSPermissionChecker {
|
|||
checkTraverse(inodes, ancestorIndex);
|
||||
|
||||
if (parentAccess != null && parentAccess.implies(FsAction.WRITE)
|
||||
&& inodes[inodes.length - 1] != null)
|
||||
&& 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);
|
||||
}
|
||||
|
|
|
@ -259,8 +259,8 @@ public class TestWebHdfsFileSystemContract extends FileSystemContractBaseTest {
|
|||
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 {
|
||||
|
|
Loading…
Reference in New Issue