ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-11947. ambari-agent 2.0.1 overwrites /etc/sudoers.d/ambar-agent if it is exists (aonishuk)
Date Tue, 16 Jun 2015 13:48:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 98c54452d -> 8cf944bbf
  refs/heads/trunk adbfdb805 -> 058983f10


AMBARI-11947.  ambari-agent 2.0.1 overwrites /etc/sudoers.d/ambar-agent if it is exists  (aonishuk)


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

Branch: refs/heads/trunk
Commit: 058983f10ffcd2c87d805c4bd8118a94ee5187d7
Parents: adbfdb8
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Jun 16 16:48:02 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Jun 16 16:48:02 2015 +0300

----------------------------------------------------------------------
 ambari-agent/conf/unix/install-helper.sh |  8 --------
 ambari-agent/etc/sudoers.d/ambari-agent  |  1 -
 ambari-agent/pom.xml                     | 23 -----------------------
 3 files changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/058983f1/ambari-agent/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh
index 5552d3c..48391d5 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -31,7 +31,6 @@ SIMPLEJSON_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_simplejson"
 
 PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
 PYTHON_WRAPER_SOURCE="/var/lib/ambari-agent/ambari-python-wrap"
-SUDOERS_FILE="/etc/sudoers.d/ambari-agent"
 
 do_install(){
   # setting ambari_commons shared resource
@@ -56,13 +55,6 @@ do_install(){
     ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"
   fi
   
-  chmod 440 "$SUDOERS_FILE"
-  
-  grep '^#includedir /etc/sudoers.d$' /etc/sudoers > /dev/null
-  if [ $? -ne 0 ] ; then
-    echo '#includedir /etc/sudoers.d' >> /etc/sudoers
-  fi
-  
   # on nano Ubuntu, when umask=027 those folders are created without 'x' bit for 'others'.
   # which causes failures when hadoop users try to access tmp_dir
   chmod a+x /var/lib/ambari-agent

http://git-wip-us.apache.org/repos/asf/ambari/blob/058983f1/ambari-agent/etc/sudoers.d/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/etc/sudoers.d/ambari-agent b/ambari-agent/etc/sudoers.d/ambari-agent
deleted file mode 100644
index 1663152..0000000
--- a/ambari-agent/etc/sudoers.d/ambari-agent
+++ /dev/null
@@ -1 +0,0 @@
-Defaults:root !requiretty

http://git-wip-us.apache.org/repos/asf/ambari/blob/058983f1/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 12e6719..0dedc8d 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -51,7 +51,6 @@
     <target.cache.dir>${project.build.directory}/cache/</target.cache.dir>
     <resource.keeper.script>${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py</resource.keeper.script>
     <init.d.dir>/etc/rc.d/init.d</init.d.dir>
-    <sudoers.d.dir>/etc/sudoers.d</sudoers.d.dir>
   </properties>
   <build>
     <plugins>
@@ -417,17 +416,6 @@
               </sources>
             </mapping>
             <mapping>
-              <directory>${sudoers.d.dir}</directory>
-              <username>root</username>
-              <groupname>root</groupname>
-              <directoryIncluded>false</directoryIncluded>
-              <sources>
-                <source>
-                  <location>etc/sudoers.d</location>
-                </source>
-              </sources>
-            </mapping>
-            <mapping>
               <directory>/var/lib/${project.artifactId}/data</directory>
               <filemode>755</filemode>
               <username>root</username>
@@ -540,16 +528,6 @@
                   <group>root</group>
                   <filemode>755</filemode>
               </mapper>
-            </data>            
-           <data>
-              <src>etc/sudoers.d/ambari-agent</src>
-              <type>file</type>
-              <mapper>
-                <type>perm</type>
-                <prefix>${sudoers.d.dir}</prefix>
-                  <user>root</user>
-                  <group>root</group>
-              </mapper>
             </data>
             <data>
               <src>${basedir}/target/src/ambari-agent</src>
@@ -765,7 +743,6 @@
             <exclude>src/test/python/ambari_agent/dummy*.txt</exclude>
             <exclude>src/main/python/ambari_agent/imports.txt</exclude>
             <exclude>src/main/python/ambari_agent/apscheduler/**</exclude>
-            <exclude>etc/sudoers.d/ambari-agent</exclude>
             <exclude>**/*.erb</exclude>
             <exclude>**/*.json</exclude>
             <exclude>**/*.pydevproject</exclude>


Mime
View raw message