bugzilla-daemon at mindrot.org
2007-Mar-18  00:08 UTC
[Bug 1300] rename doesn't work on Linux vfat
http://bugzilla.mindrot.org/show_bug.cgi?id=1300
           Summary: rename doesn't work on Linux vfat
           Product: Portable OpenSSH
           Version: 3.8p1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sftp-server
        AssignedTo: bitbucket at mindrot.org
        ReportedBy: tilman.vogel at web.de
Looking for a solution to the above problem, I saw in CVSWeb that in
current versions of OpenSSH, there is code in process_rename() in
sftp-server.c which checks if links are available on the target
filesystem. 
It does so by checking the errno given by link() against EOPNOTSUPP. 
The problem is: At least on Linux 2.6.x with glibc 2.3.5, link()
returns EPERM in this case as is also documented in my copy of "man 2
link":
...
      EPERM  oldpath is a directory.
       EPERM  The filesystem containing oldpath and newpath does not
support the creation of hard links.
...
Thus the lack of link support is not detected and rename will not fall
back to the stat/rename code. process_rename() fails even though it
doesn't have to.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2007-Mar-18  00:23 UTC
[Bug 1300] rename doesn't work on Linux vfat
http://bugzilla.mindrot.org/show_bug.cgi?id=1300 ------- Comment #1 from dtucker at zip.com.au 2007-03-18 11:23 ------- The code tests for LINK_OPNOTSUPP_ERRNO which is defined to be EPERM on Linux (in the Linux-specific block of configure). What happened when you actually tried it? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2007-Mar-18  00:27 UTC
[Bug 1300] rename doesn't work on Linux vfat
http://bugzilla.mindrot.org/show_bug.cgi?id=1300 ------- Comment #2 from dtucker at zip.com.au 2007-03-18 11:27 ------- (In reply to comment #1)> The code tests for LINK_OPNOTSUPP_ERRNO which is defined to be EPERM on > Linux (in the Linux-specific block of configure).BTW that code has been there since version 3.9. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2007-Mar-18  00:42 UTC
[Bug 1300] rename doesn't work on Linux vfat
http://bugzilla.mindrot.org/show_bug.cgi?id=1300
tilman.vogel at web.de changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
------- Comment #3 from tilman.vogel at web.de  2007-03-18 11:42 -------
(In reply to comment #2)> (In reply to comment #1)
> > The code tests for LINK_OPNOTSUPP_ERRNO which is defined to be EPERM
on
> > Linux (in the Linux-specific block of configure).
> 
> BTW that code has been there since version 3.9.
Ok, then sorry for bothering! I was trying to patch that piece of code
into a 3.8p1 package for a Nokia 770 where obviously
LINK_OPNOTSUPP_ERRNO won't be defined by configure. I'll just add that
to the configure script too. Thanks!
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.