Home GnuPG
Diffusion GnuPG ab2e64e4b490

gpg: Defer renaming at exit, so that it can remove on failure.

Description

gpg: Defer renaming at exit, so that it can remove on failure.

* g10/main.h (gnupg_register_partial_file): New.
(gnupg_process_partial_file): New.
* g10/misc.c (gnupg_register_partial_file): New.
(gnupg_process_partial_file): New.
* g10/plaintext.c (pfg_close_file): Add log_info when remove.
Register the file rename.
* g10/gpg.c (g10_exit): Call gnupg_process_partial_file.
  • GnuPG-bug-id: T7873
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details