You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by br...@apache.org on 2016/10/27 14:54:13 UTC

[1/3] hadoop git commit: HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu

Repository: hadoop
Updated Branches:
  refs/heads/branch-2 5e760c89a -> f4300ea12
  refs/heads/branch-2.8 26cf988c3 -> d6dfc76df
  refs/heads/trunk 0c837db8a -> ac35ee939


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


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

Branch: refs/heads/trunk
Commit: ac35ee9393e0afce9fede1d2052e7bf4032312fd
Parents: 0c837db
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Thu Oct 27 20:20:56 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Thu Oct 27 20:20:56 2016 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ac35ee93/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 417ce01..488c600 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
@@ -84,10 +84,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 " + pc.getUser()
+              + " is not a super user (non-super user cannot change owner).");
         }
         if (group != null && !pc.isMemberOfGroup(group)) {
-          throw new AccessControlException("User does not belong to " + group);
+          throw new AccessControlException(
+              "User " + pc.getUser() + " does not belong to " + group);
         }
       }
       unprotectedSetOwner(fsd, iip, username, group);


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


[3/3] hadoop git commit: HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu

Posted by br...@apache.org.
HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu

(cherry picked from commit ac35ee9393e0afce9fede1d2052e7bf4032312fd)


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

Branch: refs/heads/branch-2.8
Commit: d6dfc76dfee4489b2a55cfb8562970c3212b15b5
Parents: 26cf988
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Thu Oct 27 20:20:56 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Thu Oct 27 20:23:07 2016 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d6dfc76d/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 6c3f6ab..04bfbb7 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
@@ -83,10 +83,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 " + pc.getUser()
+              + " is not a super user (non-super user cannot change owner).");
         }
         if (group != null && !pc.isMemberOfGroup(group)) {
-          throw new AccessControlException("User does not belong to " + group);
+          throw new AccessControlException(
+              "User " + pc.getUser() + " does not belong to " + group);
         }
       }
       unprotectedSetOwner(fsd, iip, username, group);


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


[2/3] hadoop git commit: HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu

Posted by br...@apache.org.
HDFS-10455. Logging the username when deny the setOwner operation. Contributed by Tianyin Xiu

(cherry picked from commit ac35ee9393e0afce9fede1d2052e7bf4032312fd)


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

Branch: refs/heads/branch-2
Commit: f4300ea12af356c5d0fcc379b892ac918bafbc18
Parents: 5e760c8
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Thu Oct 27 20:20:56 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Thu Oct 27 20:22:08 2016 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f4300ea1/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 6c3f6ab..04bfbb7 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
@@ -83,10 +83,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 " + pc.getUser()
+              + " is not a super user (non-super user cannot change owner).");
         }
         if (group != null && !pc.isMemberOfGroup(group)) {
-          throw new AccessControlException("User does not belong to " + group);
+          throw new AccessControlException(
+              "User " + pc.getUser() + " does not belong to " + group);
         }
       }
       unprotectedSetOwner(fsd, iip, username, group);


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