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

Nathan Wagner nw at hydaspes.if.org
Tue Feb 22 03:06:39 AEDT 2022


On Sun, Feb 20, 2022 at 11:27:26PM +0100, Thorsten Glaser wrote:
> On Sun, 20 Feb 2022, Nathan Wagner wrote:
> 
> > intended name.  The bad temp file is a lot easier to identify and
> > remove.
> 
> Maybe make it possible to add a ~ after the XXXXXXXXXXes?
> mkstemps(3), that is.

The mkstemp(3) interface requires that the last six characters of the
passed template string be 'X'.  There are non-posix functions that allow
for a suffix, but I wanted to keep the code as portable as seemed
reasonable.

-- 
nw


More information about the openssh-unix-dev mailing list