Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8B1A4200D28 for ; Mon, 23 Oct 2017 17:20:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 89EB11609E0; Mon, 23 Oct 2017 15:20:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D05611609CE for ; Mon, 23 Oct 2017 17:20:03 +0200 (CEST) Received: (qmail 23389 invoked by uid 500); 23 Oct 2017 15:20:03 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 23350 invoked by uid 99); 23 Oct 2017 15:20:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Oct 2017 15:20:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E5A8EDFAE0; Mon, 23 Oct 2017 15:20:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jonathanhurley@apache.org To: commits@ambari.apache.org Message-Id: <9fc705490a2e4e489c6d0a5226039247@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Mon, 23 Oct 2017 15:20:04 -0000 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 Authored: Mon Oct 23 11:19:24 2017 -0400 Committer: Jonathan Hurley 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