Repository: ambari
Updated Branches:
  refs/heads/trunk 14e961353 -> 96b074049


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/96b07404
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96b07404
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96b07404

Branch: refs/heads/trunk
Commit: 96b074049a032891c18697b832479e9d25f46784
Parents: 14e9613
Author: Vitaly Brodetskyi <[email protected]>
Authored: Thu Mar 16 22:36:55 2017 +0200
Committer: Vitaly Brodetskyi <[email protected]>
Committed: Thu Mar 16 22:37:43 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/96b07404/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 344c8a8..bbf73da 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
@@ -31,6 +31,7 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+
 /**
  * Logs OpenSsl command exit code with description
  */
@@ -140,6 +141,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/96b07404/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