[Bug 2428] realpath command doesn't work

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Jul 15 09:58:23 AEST 2015


https://bugzilla.mindrot.org/show_bug.cgi?id=2428

Darren Tucker <dtucker at zip.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker at zip.com.au

--- Comment #4 from Darren Tucker <dtucker at zip.com.au> ---
The only platform that sets BROKEN_REALPATH is AIX, not Linux, and I
can't remember what the reason for that one was offhand.

The OpenBSD man page says ("All but the last component of pathname must
exist when realpath() is called."

The POSIX spec
(http://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html)
says that it can return ENOENT if "a component of file_name does not
name an existing file".

but it also says:

"IEEE Std 1003.1-2001/Cor 2-2004, item XSH/TC2/D6/110 is applied,
updating the ERRORS section to refer to the file_name argument, rather
than a nonexistent path argument."

so it looks like earlier versions of the spec allowed (or in fact
specified, depending on how you read it) the OpenBSD behaviour.

The filexfer (v3) spec is silent on the question of what to do in the
case of a non-existent file.  Later versions[1] punt on this by adding
an optional flag to select either behaviour, but the default is to not
check  for the existence of the file, so you could argue that this is
the behaviour openssh should have.

[1] https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list