Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2560d58e1 -> 03276d20a


AMBARI-20453. Part2.Minor refactoring and clean up in 
ambari-server.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: 03276d20a97786bb0eff0ae5a2e7997fd5b0f6d8
Parents: 2560d58
Author: Vitaly Brodetskyi <[email protected]>
Authored: Thu Mar 16 22:25:01 2017 +0200
Committer: Vitaly Brodetskyi <[email protected]>
Committed: Thu Mar 16 22:25:01 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/utils/ShellCommandUtil.java  | 6 ++++++
 .../org/apache/ambari/server/security/CertGenerationTest.java  | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/03276d20/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
index 961fa22..9fe82d3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
@@ -140,6 +140,12 @@ public class ShellCommandUtil {
   public static final String MASK_OWNER_ONLY_RW = "600";
 
   /**
+   * Permission mask 700 allows only owner to read, modify and execute file.
+   * Other users (except root) can't read/modify/execute file
+   */
+  public static final String MASK_OWNER_ONLY_RWX = "700";
+
+  /**
    * Permission mask 777 allows everybody to read/modify/execute file
    */
   public static final String MASK_EVERYBODY_RWX = "777";

http://git-wip-us.apache.org/repos/asf/ambari/blob/03276d20/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
index 860372b..4e0549d 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
@@ -208,7 +208,7 @@ public class CertGenerationTest {
     if (ShellCommandUtil.LINUX) {
       String permissions = ShellCommandUtil.
         getUnixFilePermissions(passFile.getAbsolutePath());
-      Assert.assertEquals(ShellCommandUtil.MASK_OWNER_ONLY_RW, permissions);
+      Assert.assertEquals(ShellCommandUtil.MASK_OWNER_ONLY_RWX, permissions);
     }
 
   }

Reply via email to