View Issue Details

IDProjectCategoryView StatusLast Update
00008251003.1(2013)/Issue7+TC1Base Definitions and Headerspublic2019-06-10 08:54
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted As Marked 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Section4.12
Page Number112
Line Number3050
Interp Status---
Final Accepted Textsee 0000825:0002138
Summary0000825: Pathname resolution and empty symbolic links
DescriptionIn January 2013 there was a discussion on the mailing list about
how existing systems perform pathname resolution when they encounter
an empty symbolic link. It was established that existing practice is
either for pathname resolution to fail or for the empty symbolic link
to be treated as if it contained ".", whereas the letter of the
standard requires treating the part of the pathname after the empty
symbolic link as an absolute pathname, which would be a very odd
thing to do and as far as we know nobody does that.

The proposed change allows both of the existing behaviours.

Also, in a couple of places the description of pathname resolution
mentions setting errno; this should only apply to functions, and the
text should not mention errno explicitly since some functions such
as posix_spawn() return an error number instead of setting errno.
Desired ActionAt page 112 line 3050 section 4.12 change:

    In all other cases, the system shall prefix the remaining
    pathname, if any, with the contents of the symbolic link. If the
    combined length exceeds {PATH_MAX}, and the implementation
    considers this to be an error, errno shall be set to
    [ENAMETOOLONG] and an error indication shall be returned.

to:

    In all other cases, the system shall prefix the remaining
    pathname, if any, with the contents of the symbolic link, unless
    the symbolic link is empty in which case it is unspecified
    whether pathname resolution proceeds as if the symbolic link
    had contained the special filename dot, or pathname resolution
    fails with functions reporting an [ENOENT] error and utilities
    writing an equivalent diagnostic message. In the cases where
    prefixing occurs, if the combined length exceeds {PATH_MAX}, and
    the implementation considers this to be an error, pathname
    resolution shall fail with functions reporting an [ENAMETOOLONG]
    error and utilities writing an equivalent diagnostic message.

At page 112 line 3056 section 4.12 change:

    If the system detects a loop in the pathname resolution process,
    it shall set errno to [ELOOP] and return an error indication.

to:

    If the system detects a loop in the pathname resolution process,
    pathname resolution shall fail with functions reporting an [ELOOP]
    error and utilities writing an equivalent diagnostic message.
Tagstc2-2008

Relationships

related to 0000649 Closedajosey 1003.1(2008)/Issue 7 pathname resolution of symlink to empty string 

Activities

geoffclare

2014-02-12 14:42

manager   bugnote:0002137

Seems I overlooked 0000649 when I submitted this. (Thanks Eric for adding the relationship.)

So the empty symlink issue is already being addressed, but the errno issue still remains.

geoffclare

2014-02-12 15:36

manager   bugnote:0002138

New proposal:

At page 112 line 3050 section 4.12, after applying 0000649 change:

    In all other cases, the system shall prefix the remaining
    pathname, if any, with the contents of the symbolic link.
    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. If the combined length exceeds
    {PATH_MAX}, and the implementation considers this to be an error,
    errno shall be set to [ENAMETOOLONG] and an error indication
    shall be returned.

to:

    In all other cases, the system shall prefix the remaining
    pathname, if any, with the contents of the symbolic link, except
    that if the contents of the symbolic link is the empty string,
    then either pathname resolution shall fail with functions
    reporting an [ENOENT] error and utilities writing an equivalent
    diagnostic message, or the pathname of the directory containing
    the symbolic link shall be used in place of the contents of the
    symbolic link. In the cases where prefixing occurs, if the
    combined length exceeds {PATH_MAX}, and the implementation
    considers this to be an error, pathname resolution shall fail
    with functions reporting an [ENAMETOOLONG] error and utilities
    writing an equivalent diagnostic message.

At page 112 line 3056 section 4.12 change:

    If the system detects a loop in the pathname resolution process,
    it shall set errno to [ELOOP] and return an error indication.

to:

    If the system detects a loop in the pathname resolution process,
    pathname resolution shall fail with functions reporting an [ELOOP]
    error and utilities writing an equivalent diagnostic message.

Issue History

Date Modified Username Field Change
2014-02-12 11:26 geoffclare New Issue
2014-02-12 11:26 geoffclare Name => Geoff Clare
2014-02-12 11:26 geoffclare Organization => The Open Group
2014-02-12 11:26 geoffclare Section => 4.12
2014-02-12 11:26 geoffclare Page Number => 112
2014-02-12 11:26 geoffclare Line Number => 3050
2014-02-12 11:26 geoffclare Interp Status => ---
2014-02-12 13:15 eblake Relationship added related to 0000649
2014-02-12 14:42 geoffclare Note Added: 0002137
2014-02-12 15:36 geoffclare Note Added: 0002138
2014-03-20 15:46 eblake Final Accepted Text => see 0000825:0002138
2014-03-20 15:46 eblake Status New => Resolved
2014-03-20 15:46 eblake Resolution Open => Accepted As Marked
2014-03-20 15:47 eblake Tag Attached: tc2-2008
2019-06-10 08:54 agadmin Status Resolved => Closed