diff options
| author | Werner Koch <[email protected]> | 2025-10-02 14:53:27 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-10-21 04:18:26 +0000 |
| commit | 9fd630fb23b741bc41c4d3d9e09198da1b4c6470 (patch) | |
| tree | 8bd34aa4d3b1e38f77a1fdb2b8f6392d2374e600 /kbx/keybox-init.c | |
| parent | w32:common: Take care of possible race on startup under Windows. (diff) | |
| download | gnupg-9fd630fb23b741bc41c4d3d9e09198da1b4c6470.tar.gz gnupg-9fd630fb23b741bc41c4d3d9e09198da1b4c6470.zip | |
common,w32: Always use share mode readwrite for the keybox.
* common/iobuf.c (direct_open) [W32]: Always use a share mode read or
write.
* kbx/keybox-init.c (_keybox_ll_open): Ditto. This requires the
latest gpgrt to work.
--
Cherry pick 2.2 commit:
3971b2528f465dcac0ea75c77840cb22b6a969d3
This change might help with
GnuPG-bug-id: 7829
Diffstat (limited to 'kbx/keybox-init.c')
| -rw-r--r-- | kbx/keybox-init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kbx/keybox-init.c b/kbx/keybox-init.c index 7bd206383..53c716833 100644 --- a/kbx/keybox-init.c +++ b/kbx/keybox-init.c @@ -283,10 +283,10 @@ _keybox_ll_open (estream_t *rfp, const char *fname, unsigned int mode) fp = es_fopen (fname, mode == KEYBOX_LL_OPEN_CREATE - ? "wb,sysopen,sequential" : + ? "wb,sysopen,sequential,share=rw" : mode == KEYBOX_LL_OPEN_UPDATE - ? "r+b,sysopen,sequential" : - "rb,sysopen,sequential"); + ? "r+b,sysopen,sequential,share=rw" : + "rb,sysopen,sequential,share=rw"); if (!fp) return gpg_error_from_syserror (); |
