lanzaboote/rust/tool
Alois Wohlschlager 90a1adac54
tool: fix atomic write
Atomic write works by first writing a temporary file, then syncing that
temporary file to ensure it is fully on disk before the program can
continue, and in the last step renaming the temporary file to the
target. The middle step was missing, which is likely to lead to a
truncated target file being present after power loss. Add this step.

Furthermore, even with this fix, atomicity is not fully guaranteed,
because FAT32 can become corrupted after power loss due to its design
shortcomings. Even though we cannot really do anything about this case,
adjust the comment to at least acknowledge the situation.
2023-10-04 07:29:35 +02:00
..
shared tool: make stubs input-addressed 2023-10-03 22:08:10 +02:00
systemd tool: fix atomic write 2023-10-04 07:29:35 +02:00
Cargo.lock tool: make kernels and initrds content-addressed 2023-10-03 22:08:03 +02:00
Cargo.toml tool: use workspace values in Cargo.toml 2023-09-14 12:35:42 +02:00