summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2013-04-10 22:19:22 +0300
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-04-11 07:23:13 +0000
commite507cf90e57cefbea7904a7583429e752782adcb (patch)
tree780ae1040887eb143346cb14915a39524808f207 /contrib
parentc9c4272b77e79d12c78b5650b0cb7781fad17950 (diff)
TrivialRebase: Make private key argument optional
The argument was used before peer_keys was introduced. Sharing the server's private key is insecure. peer_keys should be used to allow administration from other hosts. Argument was not removed to maintain backward compatibility. Change-Id: I0e9f54154c8c48b496230bb6b07ed3bdfe05d2d4
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/trivial_rebase.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/trivial_rebase.py b/contrib/trivial_rebase.py
index 4728499378..37d894d925 100755
--- a/contrib/trivial_rebase.py
+++ b/contrib/trivial_rebase.py
@@ -148,8 +148,10 @@ class TrivialRebase:
return patch_id_process.communicate()[0]
def SuExec(self, as_user, cmd):
- suexec_cmd = ['ssh', '-l', "Gerrit Code Review", '-p', self.port, self.server, '-i',
- self.private_key_path, 'suexec', '--as', as_user, '--', cmd]
+ suexec_cmd = ['ssh', '-l', "Gerrit Code Review", '-p', self.port, self.server]
+ if self.private_key_path:
+ suexec_cmd += ['-i', self.private_key_path]
+ suexec_cmd += ['suexec', '--as', as_user, '--', cmd]
self.CheckCall(suexec_cmd)
def DiffCommitMessages(self, prev_commit):