Files
heimdal/lib
Nicolas Williams d31dd9e00b hx509: make file store writes atomic
Now we'll use mkostemp() and rename() into place to make
hx509_certs_store() atomic for FILE/DER-FILE/PEM-FILE stores.

This is not ideal, as it can leave temp files in place if a process
crashes in between the mkostemp() and the rename into place.

On Linux we'll eventually make use of O_TMPFILE and linkat().  The idea
will be to first create an anonymous, zero-link file in the directory
that will contain the file at the end, write the file, then linkat() the
file into place as a .new file, then rename() the .new into place.  That
will limit the amount of junk that may be left behind to just one file.
(If the linkat() fails, then unlink() the .new and try again.  If the
rename() fails that just means the caller raced with another and the
operation is complete.)

We should really make a lib/roken interface that does this.
2019-10-08 20:58:04 -05:00
..
2019-10-07 21:32:00 -05:00
2019-10-03 13:09:18 -05:00
2018-12-28 01:09:38 -06:00
2017-03-10 15:47:43 -05:00
2016-11-08 15:48:40 -05:00
2019-10-03 13:09:18 -05:00
2019-01-02 13:56:04 -05:00
2017-03-19 18:55:51 -04:00
2016-12-15 12:15:56 -06:00
2016-12-15 12:23:09 -06:00