浏览代码

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

This reverts commit d6dfc76dfee4489b2a55cfb8562970c3212b15b5.
Kihwal Lee 8 年之前
父节点
当前提交
5b0d32b4aa

+ 2 - 4
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java

@@ -83,12 +83,10 @@ public class FSDirAttrOp {
       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);