[PATCH] [BZ #18433] Check file access/existence before forking.

Navid Rahimi rahimi.nv@gmail.com
Thu Sep 10 15:06:00 GMT 2015



On 09/10/2015 07:31 PM, Szabolcs Nagy wrote:
> On 10/09/15 15:47, Navid Rahimi wrote:
>> [BZ #18433]
>> * sysdeps/posix/spawni.c (__spawni):
>> Check file access before forking.
>> ---
>
>> +++ b/sysdeps/posix/spawni.c
>> @@ -90,6 +90,9 @@ __spawni (pid_t *pid, const char *file,
>>      size_t len;
>>      size_t pathlen;
>>
>> +  if(__access (file, X_OK) != 0)
>> +    return errno;
>> +
>
> this does not guarantee the success of __execve (file, argv, envp).
>

I think our main objection here is to avoid forking when there is no 
file.There is so many other variable for checking if execve is going to 
success or not.



More information about the Libc-alpha mailing list