[PATCH]: ssh: Avoid paths beginning with "//"

Mark Bradshaw bradshaw at staff.crosswalk.com
Fri Aug 10 01:08:36 EST 2001


We patched a few bugs in the sftp implementation last month that dealt with
path concatenation created paths beginning with "//", which caused problems
on Windows machines.  Unfortunately, a few slipped by in ssh as well that
I'd like to get patched.  

Ssh runs into the same problem when dealing with known_hosts files.  When
the home directory for a user is set to "/", it attempts to use "//.ssh" as
its location to store the known_hosts files, key pairs, etc.  This doesn't
adversely affect unix installations, but causes windows grief.  For further
info on this problem reference Corinna Vinschen's post on July 25.

As far as I can tell only two locations need to be patched to correct this.
Ssh.c needs to be patched where it attempts to located and possible create
the .ssh directory, and tildexpand.c needs to be patched so that it
correctly expands the home directory of the user when it's set to root.

I've attached the diffs.

Mark

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs.txt
Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010809/9790aed5/attachment.txt 


More information about the openssh-unix-dev mailing list