coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dircolors man page should mention proper quoting


From: Eric Blake
Subject: Re: dircolors man page should mention proper quoting
Date: Tue, 28 Jun 2016 10:10:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 06/28/2016 10:06 AM, Eric Blake wrote:
> 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

As it is, ssh-agent is broken for not outputting:

SSH_AUTH_SOCK='/tmp/with spaces//...'

but my point remains that if ssh-agent were fixed, it is the difference
between executing this with an unquoted eval:

SSH_AUTH_SOCK="'/tmp with'" spaces//...

vs. the intended version:

SSH_AUTH_SOCK='/tmp/with spaces//...'

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]