Revert "HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu"

This reverts commit f4300ea12a.
This commit is contained in:
Kihwal Lee 2016-10-27 14:10:07 -05:00
parent f4300ea12a
commit 6c11a11918
1 changed files with 2 additions and 4 deletions

View File

@ -83,12 +83,10 @@ public class FSDirAttrOp {
fsd.checkOwner(pc, iip); fsd.checkOwner(pc, iip);
if (!pc.isSuperUser()) { if (!pc.isSuperUser()) {
if (username != null && !pc.getUser().equals(username)) { if (username != null && !pc.getUser().equals(username)) {
throw new AccessControlException("User " + pc.getUser() throw new AccessControlException("Non-super user cannot change owner");
+ " is not a super user (non-super user cannot change owner).");
} }
if (group != null && !pc.isMemberOfGroup(group)) { if (group != null && !pc.isMemberOfGroup(group)) {
throw new AccessControlException( throw new AccessControlException("User does not belong to " + group);
"User " + pc.getUser() + " does not belong to " + group);
} }
} }
unprotectedSetOwner(fsd, iip, username, group); unprotectedSetOwner(fsd, iip, username, group);