[Bug 2428] New: realpath command doesn't work

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Jul 15 00:25:45 AEST 2015


            Bug ID: 2428
           Summary: realpath command doesn't work
           Product: Portable OpenSSH
           Version: 6.9p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Build system
          Assignee: unassigned-bugs at mindrot.org
          Reporter: david.kahles96 at gmail.com

Created attachment 2665
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2665&action=edit
The configure command after running 'autoreconf -fi'

I use libssh to access a server via sftp, but the issue is not related
to libssh according to the logs.

How to reproduce:
"/home/david/test" exists, but "/home/david/test/test" doesn't exist.
When I canonicalize "/home/david/test/test" using the SSH_FXP_REALPATH
command it doesn't work and reports "no such file".
I did also compile OpenSSH from git, see the attached files.

Expected result:
Canonicalizing "/home/david/test/test" works, according to [1]

Further investigation showed that the libc realpath function is linked,
and not the included OpenBSD one. The included realpath function works
fine, but the libc one doesn't. As far as I understand the build
system, the OpenBSD realpath function should not be used on linux, but
the libc realpath function seems not to work.
Or is the realpath function not supposed to work if the file doesn't

System: Up-to-date Archlinux
GCC 5.1.0
make 4.1
glibc 2.21

[1]: http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt, page
17: "...canonicalize any given path name..."

You are receiving this mail because:
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list