Re: [PATCH] add sftp-server option to force temp files

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 2/20/22 13:30, Nico Kadel-Garcia wrote:
> On Sun, Feb 20, 2022 at 11:08 AM Nathan Wagner <nw@xxxxxxxxxxxxxxx> wrote:
>>
>> The following patch will add a -T option to sftp-server.c that forces
>> use of a temp file for uploads to the server.  It takes an argument that
>> has 'XXXXXX' added to the end and used as a template string for
>> mkstemp(3).
> 
> Wouldn't rsync over SSH be better for this sort of feature
> aggregation? The potential chroot caged setups for sftp may have their
> uses, but the more complex you make this sort of behavior, the more
> vulnerable you become to alarming failures such as leaving behind
> temporary file debris as the artifact of a failed transfer, especially
> in edge cases like transferring large files and the transmission being
> interrupted or running out of disk space.

On Linux, one can use O_TMPFILE to ensure that the file is created
atomically.  That isn’t portable, though.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

Attachment: OpenPGP_0xB288B55FFF9C22C1.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux