In the ssh_host class used during autotest install, there is a remote
command run using find, chmod and xargs. In the case that find returns
files with spaces, xargs barfs. The attach patch includes proper
quoting and placement of the input from find to xargs by utilizing the
-i argument and "{}" in the chmod command.
From: Ryan Harper <ryanh@us.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1424 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index 8277a36..c683d67 100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -572,8 +572,8 @@
utils.scp_remote_escape(dest))
self.__copy_files(processed_source, remote_dest)
- self.run('find "%s" -type d | xargs -r chmod o+rx' % dest)
- self.run('find "%s" -type f | xargs -r chmod o+r' % dest)
+ self.run('find "%s" -type d | xargs -i -r chmod o+rx "{}"' % dest)
+ self.run('find "%s" -type f | xargs -i -r chmod o+r "{}"' % dest)
def get_tmp_dir(self):
"""