Re: [PATCH 2/2] git: continue alias lookup on EACCES errors

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

 



On Wed, Mar 28, 2012 at 11:31:10AM -0700, Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>> Example: when I try
>>
>>  :; mkdir $HOME/cannotread
>>  :; chmod -x $HOME/cannotread
>>  :; echo nonsense >$HOME/bin/cat
>>  :; chmod -x $HOME/bin/cat
>>  :; PATH=$HOME/cannotread:$HOME/bin:/usr/local/bin:/usr/bin:/bin
>>  :; cat /etc/fstab
>>
>> the shell uses /bin/cat without complaint.
>
> Yeah, but I think that the case Peff is worried about is:
>
>         $ >~/bin/nosuch
>         $ nosuch
>         nosuch: Permission denied

Just remembering the EACCES and reporting it when no alias exists
would take care of that, no?  In other words, this seems analogous
to the example of a non-executable "cat" that is reported if no
other cat exists but does not prevent /bin/cat from being run.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]