|Anonymous | Login | Signup for a new account||2017-10-23 20:40 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0000817||[1003.1(2013)/Issue7+TC1] System Interfaces||Objection||Error||2014-01-20 15:55||2014-03-13 16:09|
|Organization||The Open Group|
|Final Accepted Text|
|Summary||0000817: O_SEARCH condition for *at() functions worded incorrectly|
All of the *at() functions contain requirements related to whether a
directory file descriptor passed to the function "was opened with
O_SEARCH". This is not the right condition when duplication or
inheritance of file descriptors is considered. For example, if
an fd is opened with O_SEARCH and then duplicated with dup(), the
new fd returned by dup() does not meet the letter of the condition
even though it has O_SEARCH as the access mode.
The associated EACCES errors are also affected (and in the case of
link() and mkdir() the EACCES error is missing).
At page 565 line 19587 section access
page 660 line 22358 section chmod
page 664 line 22527 section chown
page 954 line 32215 section fstatat
page 976 line 32925 section futimens
page 1228 line 40805 section link
page 1301 line 43040 section mkdir
page 1307 line 43242 section mkfifo
page 1313 line 43434 section mknod
page 1394 line 46074 section open
page 1764 line 56779 section readlink
page 1798 line 57932 section rename
page 2073 line 66152 section symlink
page 2174 line 69186 section unlink
If the file descriptor was opened without O_SEARCH, the function shall check whether directory searches are permitted using the current permissions of the directory underlying the file descriptor. If the file descriptor was opened with O_SEARCH, the function shall not perform the check.to:
If the access mode of the open file description associated with the file descriptor is not O_SEARCH, the function shall check whether directory searches are permitted using the current permissions of the directory underlying the file descriptor. If the access mode is O_SEARCH, the function shall not perform the check.
At page 566 line 19616 section access
page 661 line 22388 section chmod
page 665 line 22562 section chown
page 955 line 32247 section fstatat
page 977 line 32973 section futimens
page 1308 line 43272 section mkfifo
page 1312 line 43399 section mknod
page 1395 line 46134 section open
page 1765 line 56805 section readlink
page 2074 line 66185 section symlink
page 2175 line 69227 section unlink
fd was not opened with O_SEARCH and ...to:
The access mode of the open file description associated with fd is not O_SEARCH and ...
After page 1229 line 40853 section link add:
[EACCES]The access mode of the open file description associated with fd1 or fd2 is not O_SEARCH and the permissions of the directory underlying fd1 or fd2 respectively do not permit directory searches.
After page 1302 line 43066 section mkdir add:
[EACCES]The access mode of the open file description associated with fd is not O_SEARCH and the permissions of the directory underlying fd do not permit directory searches.
At page 1799 line 57990 section rename change:
oldfd or newfd was not opened with O_SEARCH and ...to:
The access mode of the open file description associated with oldfd or newfd is not O_SEARCH and ...
|I agree with this as being clearer in intent, but I think where the new phrasing has "is not O_SEARCH", the phrase "does not include the O_SEARCH flag" better expresses that the file description may have other O_* flags set too. Similarly, "includes O_SEARCH" instead of "is O_SEARCH". Just bare is or is not implies it's the only flag allowed to be set when testing against underlying permissions.|
Re: Note: 0002109, when a file descriptor is opened the access mode is set to O_EXEC, O_RDONLY, O_RDWR, O_SEARCH, or O_WRONLY. The other O_* macros that can be ORed into the oflag value passed to open() do not have any effect on the access mode (i.e. they have no bits in common with the O_ACCMODE mask).
Therefore "the access mode is O_SEARCH" is the correct wording, and "the access mode includes O_SEARCH" does not make sense.
|2014-01-20 15:55||geoffclare||New Issue|
|2014-01-20 15:55||geoffclare||Name||=> Geoff Clare|
|2014-01-20 15:55||geoffclare||Organization||=> The Open Group|
|2014-01-20 15:55||geoffclare||Section||=> access,...,unlink|
|2014-01-20 15:55||geoffclare||Page Number||=> 565,...,2175|
|2014-01-20 15:55||geoffclare||Line Number||=> 19587,...,69227|
|2014-01-20 15:55||geoffclare||Interp Status||=> ---|
|2014-01-20 19:22||shware_systems||Note Added: 0002109|
|2014-01-21 09:52||geoffclare||Note Added: 0002110|
|2014-03-13 16:06||Don Cragun||Status||New => Resolved|
|2014-03-13 16:06||Don Cragun||Resolution||Open => Accepted|
|2014-03-13 16:07||Don Cragun||Tag Attached: tc2-2008|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|