From 6f9c0342f33f52a2bda98d3709fbefd678bd46d9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 13 May 2012 06:06:11 +0200 Subject: IRC. --- open_issues/o_exec.mdwn | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 open_issues/o_exec.mdwn (limited to 'open_issues/o_exec.mdwn') diff --git a/open_issues/o_exec.mdwn b/open_issues/o_exec.mdwn new file mode 100644 index 00000000..3f77a0f2 --- /dev/null +++ b/open_issues/o_exec.mdwn @@ -0,0 +1,54 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title="O_EXEC"]] + +[[!tag open_issue_glibc open_issue_hurd]] + + +# IRC, freenode, #hurd, 2012-04-24 + + interesting, glibc on every OS except hurd (so including linux + too) does not define O_EXEC + can somebody please help me understand a POSIX behaviour? + it's about fexecve: + http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html + basically, it seems to me (reading the "errors" and "application + usage" sections) that O_EXEC for open() the fd is not mandatory, and if + not used fexecve will check for file permission at call time? + because currently libdiskfs and libnetfs require the fd to be + open with O_EXEC + "Since execute permission is checked by fexecve(), the file + description fd need not have been opened with the O_EXEC flag" + this one makes it clear checking for O_EXEC is wrong + it looks like O_EXEC is only needed when you want to have files + for which only the execution permission is set + but not the read one + (i don't understand the "and write" part though) + "exec will fail if the mode of the file associated with fd does + not grant execute permission to the calling process at the time fexecve() + is called." + this one strengthens the impression you have, that fexecve indeed + checks file permissions at the time it's called + pinotree: hope it helps + so it implies the following: + O_RDONLY → exec works if the file is readable + exec works if the file is readable and/or executable (although + without read permissions you can't check it) + (well, fexecve) + O_EXEC → exec requires that the permission of the file at + fexecve() time have +x + i'd say ye so far + yes + so we need to fix lib{disk,net}fs then + seems so + enlighting, merci braunr + de rien + :) -- cgit v1.2.3