Mailing List Archive

[Bug 978] The supplied realpath function mangles pathnames.
http://bugzilla.mindrot.org/show_bug.cgi?id=978

Summary: The supplied realpath function mangles pathnames.
Product: Portable OpenSSH
Version: 3.9p1
Platform: Other
OS/Version: other
Status: NEW
Severity: minor
Priority: P3
Component: Miscellaneous
AssignedTo: openssh-bugs@mindrot.org
ReportedBy: Paul.Green@stratus.com


When the realpath function supplied with Portable OpenSSH is used, one quickly
discovers that it mangles the pathnames. The code that combines the 'real'
directory name with the name of the last component has a special-case to
handle a directory name consisting of only '/'. Sadly, when it comes time to
use the 'needslash' variable, the test is backwards. When it needs a slash,
it doesn't put one in, and vice versa. needslash==1 is supposed to mean that
a slash is needed but the code tests for needslash==0. I guess I must have
one of the few operating systems (the Stratus VOS POSIX environment) that
doesn't supply a working version of realpath, and so rely upon this version.
I found this bug in 3.7.1p2 but it is still present in 3.9p1. I've tested the
fix and it works great. Found by using PuTTY psftp client get request to a
system with the broken code; it only worked on files in the root ('/')
directory; a file in a lower-level directory failed; the echoed pathname was
always missing the final slash.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 978] The supplied realpath function mangles pathnames. [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=978


Paul.Green@stratus.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Version|3.9p1 |3.7.1p2




------- Additional Comments From Paul.Green@stratus.com 2005-02-03 09:00 -------
Oh heck. I see you fixed this bug in 3.9p1; perhaps even earlier. Sorry for
the noise.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 978] The supplied realpath function mangles pathnames. [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=978





------- Additional Comments From djm@mindrot.org 2005-02-03 09:32 -------
The realpath function was recently updates again (after 3.9p1), so you may want
to test one of the development snapshots from
http://www.openssh.com/portable.html#cvs



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 978] The supplied realpath function mangles pathnames. [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=978


dtucker@zip.com.au changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME




------- Additional Comments From dtucker@zip.com.au 2005-02-04 14:54 -------
Please reopen if there is any issues with realpath() in -current.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.