You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/09/08 10:36:48 UTC

[1/2] ambari git commit: AMBARI-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user to run ambari as can be picked up (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 617619928 -> 0cbe4da80
  refs/heads/trunk 45c172f3b -> bfba14cbd


AMBARI-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user to run ambari as can be picked up (aonishuk)


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

Branch: refs/heads/trunk
Commit: bfba14cbd06efb0d41029575118ce6ea0ae06b21
Parents: 45c172f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Sep 8 11:36:36 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Sep 8 11:36:36 2015 +0300

----------------------------------------------------------------------
 ambari-agent/etc/init.d/ambari-agent | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bfba14cb/ambari-agent/etc/init.d/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/etc/init.d/ambari-agent b/ambari-agent/etc/init.d/ambari-agent
index 01fc45c..b2c3109 100644
--- a/ambari-agent/etc/init.d/ambari-agent
+++ b/ambari-agent/etc/init.d/ambari-agent
@@ -19,7 +19,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' | awk -F '=' '{ print $2}'`
+run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' | grep -v '^;\|^#' | awk -F '=' '{ print $2}'`
 
 if [ "$EUID" != `id -u $run_as_user` ] ; then
   command_prefx="su - $run_as_user -c"


[2/2] ambari git commit: AMBARI-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user to run ambari as can be picked up (aonishuk)

Posted by ao...@apache.org.
AMBARI-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user to run ambari as can be picked up (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 0cbe4da800555d440933cb6eabedd5628c222a0a
Parents: 6176199
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Sep 8 11:36:39 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Sep 8 11:36:39 2015 +0300

----------------------------------------------------------------------
 ambari-agent/etc/init.d/ambari-agent | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cbe4da8/ambari-agent/etc/init.d/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/etc/init.d/ambari-agent b/ambari-agent/etc/init.d/ambari-agent
index 01fc45c..b2c3109 100644
--- a/ambari-agent/etc/init.d/ambari-agent
+++ b/ambari-agent/etc/init.d/ambari-agent
@@ -19,7 +19,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' | awk -F '=' '{ print $2}'`
+run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' | grep -v '^;\|^#' | awk -F '=' '{ print $2}'`
 
 if [ "$EUID" != `id -u $run_as_user` ] ; then
   command_prefx="su - $run_as_user -c"