mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-10 19:01:14 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user