Bug 1400

Summary: add atomic rename extension to sftp-server
Product: Portable OpenSSH Reporter: Miklos Szeredi <miklos>
Component: sftp-serverAssignee: Damien Miller <djm>
Status: CLOSED FIXED    
Severity: enhancement CC: djm
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1353    
Attachments:
Description Flags
[PATCH] add atomic rename extension to sftp-server
none
Tweaked patch dtucker: ok+

Description Miklos Szeredi 2007-12-11 07:57:59 AEDT
This is needed to be able to support a rename() operation conforming
to POSIX in the SSH filesystem.

With the rename operation defined in the SFTP spec, this is
impossible, since in case the target exists it's not possible to
perform the rename+unlink atomically.

The patch applies on top of the statfs extension patch.
Comment 1 Miklos Szeredi 2007-12-11 08:03:45 AEDT
Created attachment 1394 [details]
[PATCH] add atomic rename extension to sftp-server
Comment 2 Damien Miller 2008-02-24 12:04:54 AEDT
Created attachment 1456 [details]
Tweaked patch

We should advertise the presence of the extension in the FXP_VERSION reply packet. Also, the official OpenSSH domain is "openssh.com", "openssh.org" was taken by a domain squatter and is not trustworthy (it could redirect at any time).
Comment 3 Damien Miller 2008-02-28 07:22:18 AEDT
patch applied - thanks. This will be available in openssh-4.8
Comment 4 Miklos Szeredi 2008-02-28 07:54:58 AEDT
Great, thanks.  This will solve a really long standing issue with sshfs.
Comment 5 Damien Miller 2008-03-31 15:23:01 AEDT
Fix shipped in 4.9/4.9p1 release.