Quote --rsh command options for rsync in syncrhonize module (#35976)

Currently the --rsh command arg being passed to rsync is not quoted,
but we're adding arguments to the ssh command and that causes rsync
to attempt to accept them as it's own, which is not the desired
outcome.

Fixes #35717

Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
Adam Miller 2018-03-27 19:26:00 -05:00 committed by jctanner
parent 9350b5ec22
commit ab9b4479a1

View file

@ -481,7 +481,7 @@ def main():
ssh_cmd_str = ' '.join(shlex_quote(arg) for arg in ssh_cmd)
if ssh_args:
ssh_cmd_str += ' %s' % ssh_args
cmd.append('--rsh=%s' % ssh_cmd_str)
cmd.append('--rsh=\'%s\'' % ssh_cmd_str)
if rsync_path:
cmd.append('--rsync-path=%s' % rsync_path)