HDFS-9286. HttpFs does not parse ACL syntax correctly for operation REMOVEACLENTRIES. Contributed by Wei-Chiu Chuang.
This commit is contained in:
parent
513ec3de19
commit
124a412a37
|
@ -1025,7 +1025,7 @@ public class FSOperations {
|
|||
*/
|
||||
public FSRemoveAclEntries(String path, String aclSpec) {
|
||||
this.path = new Path(path);
|
||||
this.aclEntries = AclEntry.parseAclSpec(aclSpec, true);
|
||||
this.aclEntries = AclEntry.parseAclSpec(aclSpec, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -738,6 +738,7 @@ public abstract class BaseTestHttpFSWith extends HFSTestCase {
|
|||
}
|
||||
|
||||
final String aclUser1 = "user:foo:rw-";
|
||||
final String rmAclUser1 = "user:foo:";
|
||||
final String aclUser2 = "user:bar:r--";
|
||||
final String aclGroup1 = "group::r--";
|
||||
final String aclSet = "user::rwx," + aclUser1 + ","
|
||||
|
@ -765,7 +766,7 @@ public abstract class BaseTestHttpFSWith extends HFSTestCase {
|
|||
httpfsAclStat = httpfs.getAclStatus(path);
|
||||
assertSameAcls(httpfsAclStat, proxyAclStat);
|
||||
|
||||
httpfs.removeAclEntries(path, AclEntry.parseAclSpec(aclUser1, true));
|
||||
httpfs.removeAclEntries(path, AclEntry.parseAclSpec(rmAclUser1, false));
|
||||
proxyAclStat = proxyFs.getAclStatus(path);
|
||||
httpfsAclStat = httpfs.getAclStatus(path);
|
||||
assertSameAcls(httpfsAclStat, proxyAclStat);
|
||||
|
|
|
@ -501,12 +501,13 @@ public class TestHttpFSServer extends HFSTestCase {
|
|||
@TestHdfs
|
||||
public void testFileAcls() throws Exception {
|
||||
final String aclUser1 = "user:foo:rw-";
|
||||
final String remAclUser1 = "user:foo:";
|
||||
final String aclUser2 = "user:bar:r--";
|
||||
final String aclGroup1 = "group::r--";
|
||||
final String aclSpec = "aclspec=user::rwx," + aclUser1 + ","
|
||||
+ aclGroup1 + ",other::---";
|
||||
final String modAclSpec = "aclspec=" + aclUser2;
|
||||
final String remAclSpec = "aclspec=" + aclUser1;
|
||||
final String remAclSpec = "aclspec=" + remAclUser1;
|
||||
final String dir = "/aclFileTest";
|
||||
final String path = dir + "/test";
|
||||
String statusJson;
|
||||
|
|
|
@ -243,12 +243,13 @@ public class TestHttpFSServerNoACLs extends HTestCase {
|
|||
@TestJetty
|
||||
public void testWithNoAcls() throws Exception {
|
||||
final String aclUser1 = "user:foo:rw-";
|
||||
final String rmAclUser1 = "user:foo:";
|
||||
final String aclUser2 = "user:bar:r--";
|
||||
final String aclGroup1 = "group::r--";
|
||||
final String aclSpec = "aclspec=user::rwx," + aclUser1 + ","
|
||||
+ aclGroup1 + ",other::---";
|
||||
final String modAclSpec = "aclspec=" + aclUser2;
|
||||
final String remAclSpec = "aclspec=" + aclUser1;
|
||||
final String remAclSpec = "aclspec=" + rmAclUser1;
|
||||
final String defUser1 = "default:user:glarch:r-x";
|
||||
final String defSpec1 = "aclspec=" + defUser1;
|
||||
final String dir = "/noACLs";
|
||||
|
@ -278,4 +279,4 @@ public class TestHttpFSServerNoACLs extends HTestCase {
|
|||
|
||||
miniDfs.shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2114,6 +2114,9 @@ Release 2.8.0 - UNRELEASED
|
|||
HDFS-9273. ACLs on root directory may be lost after NN restart.
|
||||
(Xiao Chen via cnauroth)
|
||||
|
||||
HDFS-9286. HttpFs does not parse ACL syntax correctly for operation
|
||||
REMOVEACLENTRIES. (Wei-Chiu Chuang via cnauroth)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
Loading…
Reference in New Issue