bugzilla-daemon at mindrot.org
2005-Feb-02 21:55 UTC
[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 at mindrot.org ReportedBy: Paul.Green at 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.
bugzilla-daemon at mindrot.org
2005-Feb-02 22:00 UTC
[Bug 978] The supplied realpath function mangles pathnames.
http://bugzilla.mindrot.org/show_bug.cgi?id=978 Paul.Green at stratus.com changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.9p1 |3.7.1p2 ------- Additional Comments From Paul.Green at 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.
bugzilla-daemon at mindrot.org
2005-Feb-02 22:32 UTC
[Bug 978] The supplied realpath function mangles pathnames.
http://bugzilla.mindrot.org/show_bug.cgi?id=978 ------- Additional Comments From djm at 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.
bugzilla-daemon at mindrot.org
2005-Feb-04 03:54 UTC
[Bug 978] The supplied realpath function mangles pathnames.
http://bugzilla.mindrot.org/show_bug.cgi?id=978 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From dtucker at 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.
Possibly Parallel Threads
- [Bug 697] ending slash is not used
- Does RSpec interfere with Pathname#dirname or Pathname#realpath ?
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- [Apt-rpm] I: [PATCH] 0.5.4cnc9: rsync method support
- What's the thing? FreeBSD Security AdvisoryFreeBSD-SA-03:08.realpath (fwd)