View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000292 | 1003.1(2008)/Issue 7 | System Interfaces | public | 2010-07-22 19:41 | 2013-04-16 13:06 |
Reporter | eblake | Assigned To | ajosey | ||
Priority | normal | Severity | Objection | Type | Omission |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Eric Blake | ||||
Organization | Red Hat | ||||
User Reference | ebb.o_directory | ||||
Section | open | ||||
Page Number | 1380 | ||||
Line Number | 45209 | ||||
Interp Status | Approved | ||||
Final Accepted Text | 0000292:0000488 | ||||
Summary | 0000292: semantics of O_DIRECTORY on symlinks | ||||
Description | The standard requires that opendir() behave as if O_DIRECTORY were in use (XSH line 27476), if opendir() obtains a file descriptor. Common practice is that opendir("symlink-to-directory") succeeds. However, the description of O_DIRECTORY (XSH line 45209), "If path does not name a directory, fail and set errno to [ENOTDIR]", is ambiguous, and could be read as stating that open("symlink-to-directory",O_DIRECTORY|O_RDONLY) must fail because it is a symbolic link, thus preventing the use of opendir() on symlinks-to-directories. This proposal does not alter the fact that one can still use open(name,O_DIRECTORY|O_NOFOLLOW|O_RDONLY) to ensure that name is a directory rather than a symlink-to-directory, while making it obvious that O_DIRECTORY does not, by itself, imply O_NOFOLLOW. | ||||
Desired Action | Change line 45209 to: O_DIRECTORY If path does not name a directory or a symbolic link to a directory, fail and set errno to [ENOTDIR]. At line 45333, change "or O_DIRECTORY was specified and the path argument does not name a directory." to "or O_DIRECTORY was specified and the path argument does not resolve to a directory." | ||||
Tags | tc1-2008 |
|
Interpretation response ------------------------ The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: ------------- The standard is clear regarding symbolic links, however there is an overlap between the ENOENT and ENOTDIR error conditions. The intention is that an ENOENT error should result when the pathname does not resolve. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- Change line 45209 to: O_DIRECTORY If path resolves to a non-directory file, fail and set errno to [ENOTDIR]. At line 45333, change "or O_DIRECTORY was specified and the path argument does not name a directory." to "or O_DIRECTORY was specified and the path argument resolves to a non-directory file." |
|
Comments/objections on the proposed interpretation are due by 31 Aug 2010 |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-07-22 19:41 | eblake | New Issue | |
2010-07-22 19:41 | eblake | Status | New => Under Review |
2010-07-22 19:41 | eblake | Assigned To | => ajosey |
2010-07-22 19:41 | eblake | Name | => Eric Blake |
2010-07-22 19:41 | eblake | Organization | => Red Hat |
2010-07-22 19:41 | eblake | User Reference | => ebb.o_directory |
2010-07-22 19:41 | eblake | Section | => open |
2010-07-22 19:41 | eblake | Page Number | => 1380 |
2010-07-22 19:41 | eblake | Line Number | => 45209 |
2010-07-29 16:26 | geoffclare | Interp Status | => Pending |
2010-07-29 16:26 | geoffclare | Note Added: 0000488 | |
2010-07-29 16:26 | geoffclare | Status | Under Review => Interpretation Required |
2010-07-29 16:26 | geoffclare | Resolution | Open => Accepted As Marked |
2010-07-29 16:27 | geoffclare | Final Accepted Text | => 0000292:0000488 |
2010-07-30 09:30 | ajosey | Interp Status | Pending => Proposed |
2010-07-30 09:30 | ajosey | Note Added: 0000510 | |
2010-09-03 06:24 | ajosey | Interp Status | Proposed => Approved |
2010-09-24 16:14 | geoffclare | Tag Attached: tc1-2008 | |
2013-04-16 13:06 | ajosey | Status | Interpretation Required => Closed |