ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: Revert "AMBARI-22016 - changeToSecureUid.sh might collide with existing user if it is not a local user (Aman Poonia via jonathanhurley)"
Date Mon, 23 Oct 2017 15:20:02 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 c0c2ca545 -> d69094ded


Revert "AMBARI-22016 - changeToSecureUid.sh might collide with existing user if it is not
a local user (Aman Poonia via jonathanhurley)"

This reverts commit c0c2ca5457f0a0275c16cc6c56e8eeca20886887.


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

Branch: refs/heads/branch-2.6
Commit: d69094ded829805a496326f65592e4f786987842
Parents: c0c2ca5
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Mon Oct 23 11:19:24 2017 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Mon Oct 23 11:19:44 2017 -0400

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d69094de/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
index e735ea7..a6b8b77 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh
@@ -26,7 +26,7 @@ newUid=$3
 function find_available_uid() {
  for ((i=1001; i<=2000; i++))
  do
-   getent passwd $i | cut -d: -f4
+   grep -q $i /etc/passwd
    if [ "$?" -ne 0 ]
    then
     newUid=$i


Mime
View raw message