Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000825 [1003.1(2013)/Issue7+TC1] Base Definitions and Headers Objection Error 2014-02-12 11:26 2014-03-20 15:46
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name Geoff Clare
Organization The Open Group
User Reference
Section 4.12
Page Number 112
Line Number 3050
Interp Status ---
Final Accepted Text see Note: 0002138
Summary 0000825: Pathname resolution and empty symbolic links
Description In 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 Action At 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.
Tags tc2-2008
Attached Files

- Relationships
related to 0000649Interpretation Requiredajosey 1003.1(2008)/Issue 7 pathname resolution of symlink to empty string 

-  Notes
(0002137)
geoffclare (manager)
2014-02-12 14:42

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.
(0002138)
geoffclare (manager)
2014-02-12 15:36

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 Note: 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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker