View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000649 | 1003.1(2008)/Issue 7 | Base Definitions and Headers | public | 2013-01-24 15:38 | 2019-06-10 08:55 |
Reporter | eblake | Assigned To | ajosey | ||
Priority | normal | Severity | Objection | Type | Error |
Status | Closed | Resolution | Accepted | ||
Name | Eric Blake | ||||
Organization | Red Hat | ||||
User Reference | ebb.pathname_resolution2 | ||||
Section | 4.12 Pathname Resolution | ||||
Page Number | 112 | ||||
Line Number | 3026 | ||||
Interp Status | Approved | ||||
Final Accepted Text | See 0000649:0001453. | ||||
Summary | 0000649: pathname resolution of symlink to empty string | ||||
Description | 0000541 clarified what happens for a symlink containing just slashes, but failed to mention what happens when resolving a symlink containing the empty string. There are two common implementations: Solaris treats the symlink as relative (since it did not begin with a slash), and performs the concatenation of the directory containing the symlink, the symlink contents, and the remainder of the pathname to be resolved, which effectively treats the empty symlink the same as if it had been the string ".". Meanwhile, several BSD flavors claim that since "" cannot be a valid file name, any attempt to resolve an empty symlink will fail with ENOENT in the same manner. Both interpretations make sense, however, both disagree with a strict reading of the current specification, which says that the contents of the symlink are concatenated solely with the remainder of the pathname, and then the resulting string is then inspected to see if it is a relative name, but if there is any remaining pathname, this would always imply an absolute path name resulted. That is, 'symlink("", "empty") && stat("empty/dev",&st)' would result in the same behavior as 'stat("/dev",&st)'. | ||||
Desired Action | At line 3026 [XBD 4.12 Pathname Resolution], after: In all other cases, the system shall prefix the remaining pathname, if any, with the contents of the symbolic link. add: If the contents of the symbolic link is the empty string, then either errno shall be set to [ENOENT] and an error indication shall be returned, or the pathname of the directory containing the symbolic link shall be used in place of the contents of the symbolic link. [Editor's note - this is the same location as the insertion mentioned in 0000541; the two additions can be made in either order.] | ||||
Tags | tc2-2008 |
|
Interpretation response ------------------------ The standard states that in pathname resolution that an empty string in a symbolic link should treat the remainder of the pathname after an empty symlink is interpolated into the pathname should be treated as an absolute pathname, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ------------- No known implementations behave this way and it is not the desired behavior. There are two common practices here and both are allowed by the suggested new wording. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- Make the changes suggested in the Desired Action. |
|
Interpretation Proposed 29 Mar 2013 |
|
Interpretation approved 3 May 2013 |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-01-24 15:38 | eblake | New Issue | |
2013-01-24 15:38 | eblake | Status | New => Under Review |
2013-01-24 15:38 | eblake | Assigned To | => ajosey |
2013-01-24 15:38 | eblake | Name | => Eric Blake |
2013-01-24 15:38 | eblake | Organization | => Red Hat |
2013-01-24 15:38 | eblake | User Reference | => ebb.pathname_resolution2 |
2013-01-24 15:38 | eblake | Section | => 4.12 Pathname Resolution |
2013-01-24 15:38 | eblake | Page Number | => 112 |
2013-01-24 15:38 | eblake | Line Number | => 3026 |
2013-01-24 15:38 | eblake | Interp Status | => --- |
2013-01-24 15:38 | eblake | Relationship added | related to 0000541 |
2013-01-24 16:52 | Don Cragun | Interp Status | --- => Pending |
2013-01-24 16:52 | Don Cragun | Note Added: 0001453 | |
2013-01-24 16:52 | Don Cragun | Status | Under Review => Interpretation Required |
2013-01-24 16:52 | Don Cragun | Resolution | Open => Accepted |
2013-01-24 16:53 | Don Cragun | Final Accepted Text | => See 0000649:0001453. |
2013-01-24 16:54 | Don Cragun | Note Edited: 0001453 | |
2013-01-24 16:54 | Don Cragun | Tag Attached: tc2-2008 | |
2013-03-29 08:04 | ajosey | Interp Status | Pending => Proposed |
2013-03-29 08:04 | ajosey | Note Added: 0001515 | |
2013-05-03 12:20 | ajosey | Interp Status | Proposed => Approved |
2013-05-03 12:20 | ajosey | Note Added: 0001581 | |
2014-02-12 13:15 | eblake | Relationship added | related to 0000825 |
2019-06-10 08:55 | agadmin | Status | Interpretation Required => Closed |