tech-kern archive

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

Re: fexecve, round 2

On Mon, 19 Nov 2012 08:38:11 +0000
David Laight <> wrote:

> On Mon, Nov 19, 2012 at 08:08:58AM +0000, Emmanuel Dreyfus wrote:
> > 
> > If you have r-x permission, you open with O_RDONLY and you do not
> > need O_SEARCH/O_EXEC. 
> > 
> > If you have --x permission, you open with O_SEARCH/O_EXEC
> I think the standard implied that O_EXEC gave you read and execute
> permissions. So you can't use it to open files that are --x.

No, Emmanuel is right: "[...] use the O_EXEC flag when opening fd. In
this case, the application will not be able to perform a checksum test
since it will not be able to read the contents of the file." You can
open with --x but (correctly) you can't read from the file.


3072D/F3A66B3A Julian Yon (2012 General Use) <>

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index