Re: [libvirt] [PATCH] rpc: fix escaping of shell path for netcat binary

2019-09-30 Thread Eric Blake
On 9/30/19 7:34 AM, Daniel P. Berrangé wrote: Consider having a nc binary in the path with a space in its name, for example '/tmp/fo o/nc' This results in libvirt running SSH with the following arg value "'if ''/tmp/fo o/nc'' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1;

[libvirt] [PATCH] rpc: fix escaping of shell path for netcat binary

2019-09-30 Thread Daniel P . Berrangé
Consider having a nc binary in the path with a space in its name, for example '/tmp/fo o/nc' This results in libvirt running SSH with the following arg value "'if ''/tmp/fo o/nc'' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then ARG=-q0; else ARG=;fi;''/tmp/fo o/nc'' $ARG