Pawel Jakub Dawidek c8e781f6e0 Revert r240931, as the previous comment was actually in sync with POSIX.
I have to note that POSIX is simply stupid in how it describes O_EXEC/fexecve
and friends. Yes, not only inconsistent, but stupid.

In the open(2) description, O_RDONLY flag is described as:

	O_RDONLY	Open for reading only.

Taken from:

	http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

Note "for reading only". Not "for reading or executing"!

In the fexecve(2) description you can find:

	The fexecve() function shall fail if:

	[EBADF]
		The fd argument is not a valid file descriptor open for executing.

Taken from:

	http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html

As you can see the function shall fail if the file was not open with O_EXEC!

And yet, if you look closer you can find this mess in the exec.html:

	Since execute permission is checked by fexecve(), the file description
	fd need not have been opened with the O_EXEC flag.

Yes, O_EXEC flag doesn't have to be specified after all. You can open a file
with O_RDONLY and you still be able to fexecve(2) it.
2012-09-27 16:43:23 +00:00
..
2012-05-31 19:32:37 +00:00
2012-08-16 13:01:56 +00:00
2012-08-17 02:47:16 +00:00
2012-08-28 19:30:29 +00:00
2011-04-13 11:28:46 +00:00
2012-08-22 20:01:57 +00:00
2010-11-25 20:05:11 +00:00
2012-03-28 20:58:30 +00:00
2012-08-11 23:48:39 +00:00
2011-07-10 00:53:04 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
2012-02-01 14:34:52 +00:00
2012-01-26 16:35:09 +00:00
2012-06-11 18:47:26 +00:00
2012-09-14 21:28:56 +00:00
2012-08-08 00:20:30 +00:00
2012-08-17 02:47:16 +00:00
2012-01-02 12:12:10 +00:00
2012-08-15 22:12:01 +00:00