You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/08/21 16:45:00 UTC

ambari git commit: AMBARI-12853 Manual registration of non root ambari agent with two way ssl authentication failed (dsen)

Repository: ambari
Updated Branches:
  refs/heads/trunk 485bd8af0 -> a696f9ffd


AMBARI-12853 Manual registration of non root ambari agent with two way ssl authentication failed (dsen)


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

Branch: refs/heads/trunk
Commit: a696f9ffda285f5711a77a40605f478731f1c1f3
Parents: 485bd8a
Author: Dmytro Sen <ds...@apache.org>
Authored: Fri Aug 21 17:44:51 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Fri Aug 21 17:44:51 2015 +0300

----------------------------------------------------------------------
 ambari-agent/conf/unix/ambari-agent | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a696f9ff/ambari-agent/conf/unix/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent
index f665934..9659014 100755
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -55,7 +55,12 @@ if [ "$?" != "0" ] && [ "$EUID" -ne 0 ] ; then
  exit 0
 fi
 
+keysdir=$(awk -F "=" '/keysdir/ {print $2}' /etc/ambari-agent/conf/ambari-agent.ini)
+
 change_files_permissions() {
+    if [ ! -z "$keysdir" ]; then
+        ambari-sudo.sh chown -R $current_user "$keysdir"
+    fi
 	ambari-sudo.sh chown -R $current_user "/var/run/ambari-agent/"
 	ambari-sudo.sh chown -R $current_user "/var/log/ambari-agent/"
 	ambari-sudo.sh chown -R $current_user "/var/lib/ambari-agent/data/"