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 a4c4f168f..24c4ff717 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1042,6 +1042,9 @@ process_rename(void)
1042 /* Race-free rename of regular files */ 1042 /* Race-free rename of regular files */
1043 if (link(oldpath, newpath) == -1) { 1043 if (link(oldpath, newpath) == -1) {
1044 if (errno == EOPNOTSUPP 1044 if (errno == EOPNOTSUPP
1045#ifdef EXDEV
1046 || errno == EXDEV
1047#endif
1045#ifdef LINK_OPNOTSUPP_ERRNO 1048#ifdef LINK_OPNOTSUPP_ERRNO
1046 || errno == LINK_OPNOTSUPP_ERRNO 1049 || errno == LINK_OPNOTSUPP_ERRNO
1047#endif 1050#endif