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

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

 



Jeff King wrote:
> On Wed, Mar 28, 2012 at 04:18:51PM -0400, Jeff King wrote:

>> +int sane_execvp(const char *file, char * const argv[])
>> +{
>> +	int ret = execvp(file, argv);
>> +	if (ret < 0 && errno == EACCES && !file_in_path_is_nonexecutable(file))
>> +		errno = ENOENT;
>> +	return ret;
>> +}
>
> Hmm, this should check for (*file == '/') to handle absolute paths
> properly.

Or rather for "strchr(file, '/')", because "path/to/cmd" does not mean to
append that string to each term of $PATH.
--
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]