* kbx/keybox-defs.h (struct keybox_handle): Add update_mode flag.
* kbx/keybox-init.c (_keybox_close_file): Clear update_mode flag.
* kbx/keybox-update.c (keybox_set_flags): Avoid a second file handle
but make use of the update mode.
--
This is mostly useful for gpgsm because it updates some flags in the
keyring quite often. Avoiding extra CreateFile calls may help to
speed up things in case malware^Dantivirus software is slowing down a
Windows system.
The locking pattern also change, thus there is some regression risk
due to this patch.