tech-kern archive

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

Re: core statement on fexecve, O_EXEC, and O_SEARCH



On Tue, 4 Dec 2012 15:30:36 +0000
David Holland <dholland-tech%netbsd.org@localhost> wrote:

> On Tue, Dec 04, 2012 at 01:58:13PM +0000, Julian Yon wrote:
>  > > The descriptor is probably already "closed on exec" before the
>  > > syscall tries to use it.
>  > 
>  > Nope. That happens later. I was looking through this code
>  > yesterday as the topic interests me. The namei lookup happens
>  > pretty early on. I haven't solved it, but the problem seems to be
>  > one of context - if you try to execve /proc/self you'll also get
>  > ENOENT instead of the expected EACCES.
> 
> That doesn't make much sense... nor does the procfs_lookup code shed
> any significant amount of light on it.
> 

It's weird, isn't it? I've been staring at the code wondering what I'm
missing. Regardless of the pros & cons of being able to exec a fd, I
can't see how this inconsistency is correct behaviour.

-- 
3072D/F3A66B3A Julian Yon (2012 General Use) <pgp.2012%jry.me@localhost>

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index