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
This commit is contained in:
committed by
Gerrit Code Review
parent
c9c4272b77
commit
e507cf90e5
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user