Revert "HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu"
This reverts commit ac35ee9393
.
This commit is contained in:
parent
79aeddc88f
commit
db41965996
@ -84,12 +84,10 @@ static HdfsFileStatus setOwner(
|
||||
fsd.checkOwner(pc, iip);
|
||||
if (!pc.isSuperUser()) {
|
||||
if (username != null && !pc.getUser().equals(username)) {
|
||||
throw new AccessControlException("User " + pc.getUser()
|
||||
+ " is not a super user (non-super user cannot change owner).");
|
||||
throw new AccessControlException("Non-super user cannot change owner");
|
||||
}
|
||||
if (group != null && !pc.isMemberOfGroup(group)) {
|
||||
throw new AccessControlException(
|
||||
"User " + pc.getUser() + " does not belong to " + group);
|
||||
throw new AccessControlException("User does not belong to " + group);
|
||||
}
|
||||
}
|
||||
unprotectedSetOwner(fsd, iip, username, group);
|
||||
|
Loading…
Reference in New Issue
Block a user