tech-kern archive

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

Re: fexecve, round 2



On Mon, Nov 19, 2012 at 03:13:02PM +0000, Emmanuel Dreyfus wrote:
> On Mon, Nov 19, 2012 at 02:39:36PM +0000, Julian Yon wrote:
> > 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.
> 
> And it means the standard mandates that one can execute without
> read access. Weird.

What's weird about that?

% cp /bin/ls /tmp
% chmod 100 /tmp/ls
% ls -l /tmp/ls
---x------  1 tls  users  24521 Nov 19 11:24 /tmp/ls
% /tmp/ls -l /tmp/ls
---x------  1 tls  users  24521 Nov 19 11:24 /tmp/ls
%



Home | Main Index | Thread Index | Old Index