Bug 2159

Summary: Implement SSH2_FXF_APPEND
Product: Portable OpenSSH Reporter: Ross Lagerwall <rosslagerwall>
Component: sftp-serverAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm
Priority: P5    
Version: 6.2p1   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 2130    
Attachments:
Description Flags
Patch to implement the feature none

Description Ross Lagerwall 2013-10-15 07:51:09 AEDT
Created attachment 2353 [details]
Patch to implement the feature

Hi,

I submitted this a few weeks ago to the mailing list but got no response so I resent it and am putting it here so it doesn't get lost.

This patch implements SSH2_FXF_APPEND in the sftp server.  It is a
fairly trivial patch and applies against the proper OpenSSH and the
Portable edition.  I would argue that it is important for OpenSSH to
implement SSH2_FXF_APPEND since it is in the spec and clients who expect
it to work find that their files are overwritten rather than appended
to.

Some relevant links:
http://marc.info/?l=openssh-unix-dev&m=138053388830753&w=2
http://marc.info/?l=openssh-unix-dev&m=123798287811788
http://marc.info/?l=openssh-unix-dev&m=111093206900604
https://bugzilla.gnome.org/show_bug.cgi?id=608910

Thanks
Comment 1 Damien Miller 2013-10-15 10:12:01 AEDT
looks reasonable.
Comment 2 Ross Lagerwall 2013-11-03 00:55:48 AEDT
As far as I can tell this has been commited.

Closing as fixed.
Comment 3 Damien Miller 2013-11-04 10:09:26 AEDT
No, this hasn't been committed yet. Please don't close the bug until it is.
Comment 4 Ross Lagerwall 2013-11-04 16:55:54 AEDT
(In reply to Damien Miller from comment #3)
> No, this hasn't been committed yet. Please don't close the bug until
> it is.

Sorry. I thought it was committed because it seems to have committed in revision 101 over here: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sftp-server.c.diff?r1=1.100;r2=1.101

The commit message for that seems to be unrelated though:
"""
refactor client config code a little:

add multistate option partsing to readconf.c, similar to servconf.c's
existing code.

move checking of options that accept "none" as an argument to readconf.c

add a lowercase() function and use it instead of explicit tolower() in
loops

part of a larger diff that was ok markus@
"""
Comment 5 Damien Miller 2014-01-08 13:17:09 AEDT
ha, you're correct. I'd sent the patch out for review, but must have forgotten it was in my tree when committing something unrelated.
Comment 6 Damien Miller 2016-08-02 10:42:30 AEST
Close all resolved bugs after 7.3p1 release