On 06/28/2016 10:00 AM, Reuti wrote: >> I mention this because the 'ssh-agent' man page has a bug: it suggests: >> >> eval `ssh-agent -s` >> >> which BREAKS if any of the environment variables thus output contain >> whitespace. It should be: >> >> eval "`ssh-agent -s`" > > I don't see this, You mean instead of "SSH_AUTH_SOC" it's named "SSH AUTH > SOC" which wouldn't be allowed? What would break exactly as there are already > multiple lines output?
$ mkdir '/tmp/with spaces' $ TMPDIR='/tmp/with spaces/' ssh-agent -s SSH_AUTH_SOCK=/tmp/with spaces//ssh-kJTBa5h6m7pC/agent.20407; export SSH_AUTH_SOCK; SSH_AGENT_PID=20408; export SSH_AGENT_PID; echo Agent pid 20408; Whoops - running `ssh-agent -s` without enclosing it in quotes tries to invoke 'spaces//ssh-kJTBa5h6m7pC/agent.20407' (which likely doesn't exist), and leaves SSH_AUTH_SOCK set to the empty string when all is said and done (since it was exported, but the only value it was assigned, '/tmp/with', was temporary only for the duration of the incorrect command execution attempt). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
