hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject hadoop git commit: HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Rakesh R.
Date Wed, 26 Apr 2017 22:59:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 54bbdb4c0 -> ac12063ee


HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Rakesh R.

(cherry picked from commit 1c5708f6ded6ba9fc007eed93c1f65ba44451241)
(cherry picked from commit c895f0893621fd6196c42ed46b97cb99cc2e9bee)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ac12063e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ac12063e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ac12063e

Branch: refs/heads/branch-2.7
Commit: ac12063eeb2fec1e686ee4f9f992b229dbca8f6f
Parents: 54bbdb4
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Tue Nov 1 10:49:43 2016 +0530
Committer: Zhe Zhang <zhz@apache.org>
Committed: Wed Apr 26 15:59:21 2017 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                    | 3 +++
 .../org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java    | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ac12063e/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 33544e0..07c2666 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -241,6 +241,9 @@ Release 2.7.4 - UNRELEASED
     HDFS-11615. FSNamesystemLock metrics can be inaccurate due to millisecond precision.
     (Erik Krogen via zhz)
 
+    HDFS-10455. Logging the username when deny the setOwner operation.
+    (Tianyi Xu and Rakesh R via Brahma Reddy Battula)
+
 Release 2.7.3 - 2016-08-25
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ac12063e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
index e35b1fb..8b4793c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
@@ -78,10 +78,12 @@ public class FSDirAttrOp {
       fsd.checkOwner(pc, iip);
       if (!pc.isSuperUser()) {
         if (username != null && !pc.getUser().equals(username)) {
-          throw new AccessControlException("Non-super user cannot change owner");
+          throw new AccessControlException("User " + username
+              + " is not a super user (non-super user cannot change owner).");
         }
         if (group != null && !pc.containsGroup(group)) {
-          throw new AccessControlException("User does not belong to " + group);
+          throw new AccessControlException(
+              "User " + username + " does not belong to " + group);
         }
       }
       unprotectedSetOwner(fsd, src, username, group);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message