bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-06 21:37 UTC
[Bug 1535] New: rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Summary: rename doesn't fall back to rename syscall upon ENOSYS of link syscall Product: Portable OpenSSH Version: 5.1p1 Platform: ix86 OS/Version: Linux Status: NEW Keywords: patch Severity: normal Priority: P3 Component: sftp-server AssignedTo: unassigned-bugs at mindrot.org ReportedBy: johan.kielbaey at gmail.com Currently renaming of a file is implemented via a link() and unlink() syscall with the possibility to fall back to the rename() syscall in certain conditions (ENOTSUPP etc). In case the errorcode returned by link() is ENOSYS this is not the case. The attached patch implements a fallback to rename in case of ENOSYS. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-06 21:38 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 --- Comment #1 from Johan Kielbaey <johan.kielbaey at gmail.com> 2008-11-07 08:38:43 --- Created an attachment (id=1578) --> (http://bugzilla.mindrot.org/attachment.cgi?id=1578) Patch fall back to rename() upon ENOSYS errorcode. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-06 21:40 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Johan Kielbaey <johan.kielbaey at gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johan.kielbaey at gmail.com -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-06 22:22 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dtucker at zip.com.au --- Comment #2 from Darren Tucker <dtucker at zip.com.au> 2008-11-07 09:22:16 --- Sounds reasonable, but under what conditions does link return ENOSYS? It's not documented in link(2) as a possible errno. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Dec-07 22:36 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org Blocks| |1481 --- Comment #3 from Damien Miller <djm at mindrot.org> 2008-12-08 09:36:37 --- We'd like this for openssh-5.2, but Darren's question needs an answer before we can commit it. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Dec-09 00:39 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 --- Comment #4 from Darren Tucker <dtucker at zip.com.au> 2008-12-09 11:39:57 --- (In reply to comment #3)> We'd like this for openssh-5.2, but Darren's question needs an answer > before we can commit it.Actually that was covered over on openssh-unix-dev: it's sshfs that returns ENOSYS. http://marc.info/?l=openssh-unix-dev&m=122602218711487 -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Dec-09 12:28 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 --- Comment #5 from Johan Kielbaey <johan.kielbaey at gmail.com> 2008-12-09 23:28:14 --- (In reply to comment #4) It was also brought to my attention on the mailinglist that the syscall link() shouldn't return ENOSYS. According to the link(2) the implementation of link in sshfs should return EPERM to indicate that creation of links is not supported. However the error check in sftp-server doesn't check EPERM either. So actually the proper solution would be to fix this in sshfs and to add a fix in sftp-server to also check for EPERM. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Dec-09 23:07 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 --- Comment #6 from Darren Tucker <dtucker at zip.com.au> 2008-12-10 10:07:37 --- (In reply to comment #5)> (In reply to comment #4) > It was also brought to my attention on the mailinglist that the syscall > link() shouldn't return ENOSYS. According to the link(2) the > implementation of link in sshfs should return EPERM to indicate that > creation of links is not supported. However the error check in > sftp-server doesn't check EPERM either.Actually it does (on Linux, anyway): if (link(oldpath, newpath) == -1) { if (errno == EOPNOTSUPP #ifdef EXDEV || errno == EXDEV #endif #ifdef LINK_OPNOTSUPP_ERRNO || errno == LINK_OPNOTSUPP_ERRNO #endif ) { where on Linux, LINK_OPNOTSUPP_ERRNO is defined thusly: AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM, [Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP.]) -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2009-Feb-23 02:34 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|1481 |1560 -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2009-Aug-28 00:44 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #7 from Damien Miller <djm at mindrot.org> 2009-08-28 10:44:39 EST --- patch applied - this will be in openssh-5.3 -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2009-Oct-06 04:02 UTC
[Bug 1535] rename doesn't fall back to rename syscall upon ENOSYS of link syscall
https://bugzilla.mindrot.org/show_bug.cgi?id=1535 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Damien Miller <djm at mindrot.org> 2009-10-06 15:01:59 EST --- Mass move of RESOLVED bugs to CLOSED now that 5.3 is out. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
Apparently Analagous Threads
- Bug+bugfix in sftp-server : failed to rename file on sshfs mount
- [Bug 1300] rename doesn't work on Linux vfat
- vi : unable to copy text to other file
- DO NOT REPLY [Bug 5304] New: failed to set times (symlinks)
- [PATCH]: Fix syscall return code when ptrace or audit is active