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 DBC792004C8 for ; Mon, 9 May 2016 22:01:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DA3551609A8; Mon, 9 May 2016 20:01:51 +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 301F816099C for ; Mon, 9 May 2016 22:01:51 +0200 (CEST) Received: (qmail 52735 invoked by uid 500); 9 May 2016 20:01:50 -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 52725 invoked by uid 99); 9 May 2016 20:01:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 20:01:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0E76F1804AF for ; Mon, 9 May 2016 20:01:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 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=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3_h0y1ga_FBr for ; Mon, 9 May 2016 20:01:47 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 67FE05F475 for ; Mon, 9 May 2016 20:01:47 +0000 (UTC) Received: (qmail 52714 invoked by uid 99); 9 May 2016 20:01:46 -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, 09 May 2016 20:01:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A880FDFF30; Mon, 9 May 2016 20:01:46 +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: X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-717: Use password as fed by the user Date: Mon, 9 May 2016 20:01:46 +0000 (UTC) archived-at: Mon, 09 May 2016 20:01:52 -0000 Repository: incubator-hawq Updated Branches: refs/heads/master 03a3e2069 -> 57b33b49c 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/57b33b49 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/57b33b49 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/57b33b49 Branch: refs/heads/master Commit: 57b33b49c777c77a7e31381cb06965a4d09ec11a Parents: 03a3e20 Author: Bhuvnesh Chaudhary Authored: Mon May 9 13:01:59 2016 -0700 Committer: Bhuvnesh Chaudhary Committed: Mon May 9 13:01:59 2016 -0700 ---------------------------------------------------------------------- tools/bin/hawq | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/57b33b49/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 = ''