hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhuvnesh2...@apache.org
Subject incubator-hawq git commit: HAWQ-717: Use password as fed by the user
Date Thu, 05 May 2016 00:10:40 GMT
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 <bchaudhary@pivotal.io>
Authored: Wed May 4 17:10:39 2016 -0700
Committer: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
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 = ''


Mime
View raw message