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 10D7C200AE3 for ; Thu, 5 May 2016 02:10:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0F61D1609FF; Thu, 5 May 2016 00:10:47 +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 598FC1609FC for ; Thu, 5 May 2016 02:10:46 +0200 (CEST) Received: (qmail 36632 invoked by uid 500); 5 May 2016 00:10:45 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 36623 invoked by uid 99); 5 May 2016 00:10:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 00:10:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 29C1DC058A for ; Thu, 5 May 2016 00:10:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.299 X-Spam-Level: X-Spam-Status: No, score=-5.299 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.079] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id JmIXLRq9Yi5V for ; Thu, 5 May 2016 00:10:42 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 09FB05FBC4 for ; Thu, 5 May 2016 00:10:41 +0000 (UTC) Received: (qmail 36593 invoked by uid 99); 5 May 2016 00:10:40 -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; Thu, 05 May 2016 00:10:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B95FFDFBDE; Thu, 5 May 2016 00:10:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhuvnesh2703@apache.org To: commits@hawq.incubator.apache.org Message-Id: <6e59338651d546e5ac8ff4d7b496f79e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-717: Use password as fed by the user Date: Thu, 5 May 2016 00:10:40 +0000 (UTC) archived-at: Thu, 05 May 2016 00:10:47 -0000 Repository: incubator-hawq Updated Branches: refs/heads/HAWQ-717 [created] 8e1384cc6 HAWQ-717: Use password as fed by the user Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/8e1384cc Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/8e1384cc Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/8e1384cc Branch: refs/heads/HAWQ-717 Commit: 8e1384cc6d0016356776e87de1f4e48d06c7c8c4 Parents: 192cff1 Author: Bhuvnesh Chaudhary Authored: Wed May 4 17:10:39 2016 -0700 Committer: Bhuvnesh Chaudhary Committed: Wed May 4 17:10:39 2016 -0700 ---------------------------------------------------------------------- tools/bin/hawq | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e1384cc/tools/bin/hawq ---------------------------------------------------------------------- diff --git a/tools/bin/hawq b/tools/bin/hawq index be628be..637553b 100755 --- a/tools/bin/hawq +++ b/tools/bin/hawq @@ -18,6 +18,7 @@ try: import os + import json import sys import subprocess from hawqpylib.HAWQ_HELP import * @@ -82,7 +83,13 @@ def main(): if len(sys.argv) > 2: hawq_command = sys.argv[1] second_arg = sys.argv[2] - sub_args = " ".join(sys.argv[2:]) + sub_args_list = sys.argv[2:] + # Password can have special characters like semicolon (;), quotes(", ') etc, convert input password to a string + if hawq_command == 'ssh-exkeys' and '-p' in sub_args_list: + password_index = sub_args_list.index('-p') + 1 + if len(sub_args_list) > password_index: + sub_arg_list[password_index] = json.dumps(sub_args_list[password_index]) + sub_args = " ".join(sub_args_list) elif len(sys.argv) > 1: hawq_command = sys.argv[1] second_arg = ''