summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-07-04 14:10:19 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-07-04 14:10:19 +1000
commitf7fa706e70cc3d005acca995d022d65227185dcd (patch)
tree141cf4000a1c35588bef2ff9775a95db831af44b /sftp-server.c
parent2784f1fcc3b6c41cdeb8e7d850044c5ee61cbbcd (diff)
- (dtucker) [sftp-server.c] Bug #1447: fall back to racy rename if link
returns EXDEV. Patch from Mike Garrison, ok djm@
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sftp-server.c b/sftp-server.c
index a4c4f168..24c4ff71 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1042,6 +1042,9 @@ process_rename(void)
/* Race-free rename of regular files */
if (link(oldpath, newpath) == -1) {
if (errno == EOPNOTSUPP
+#ifdef EXDEV
+ || errno == EXDEV
+#endif
#ifdef LINK_OPNOTSUPP_ERRNO
|| errno == LINK_OPNOTSUPP_ERRNO
#endif