[Bug 2129] New: [PATCH] sftp chroot regression

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jul 25 07:34:39 EST 2013


            Bug ID: 2129
           Summary: [PATCH] sftp chroot regression
           Product: Portable OpenSSH
           Version: 6.2p1
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P5
         Component: sftp
          Assignee: unassigned-bugs at mindrot.org
          Reporter: delphij at freebsd.org

Created attachment 2319
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2319&action=edit
patch to address sftp chroot symlink issue

I'd like to report a possible regression in sftp(1).  In earlier
OpenSSH versions, when doing 'symlink' over sftp, the system will
create a symbolic link with relative path, and now it creates a
symbolic link with absolute path.  When doing chroot, this would make
an unusable symbolic link.

The behavior change was introduced in OpenBSD src/usr.bin/ssh/sftp.c,v
1.132 and based on my understanding of the commit log, this is not

How to reproduce:

# sftp dtest
sftp> symlink ./l1 22
sftp> ^D

# ssh dtest "ls -l 22"
lrwxr-xr-x  1 delphij  delphij  23 Jun 21 17:28 22@ -> /home/delphij/l1

What's expected:

lrwxr-xr-x  1 delphij  delphij  4 Jun 21 17:25 22@ -> ./l1

The attached patch should fix this.

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

More information about the openssh-bugs mailing list