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 /common/mischelp.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 'common/mischelp.c')
| -rw-r--r-- | common/mischelp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/mischelp.c b/common/mischelp.c index ef70c9d83..db0bd0521 100644 --- a/common/mischelp.c +++ b/common/mischelp.c @@ -85,6 +85,9 @@ same_file_p (const char *name1, const char *name2) wname = gpgrt_fname_to_wchar (name1); if (wname) { + /* Note that if the desiredAccess (2nd arg) is zero, we are + * allowed to query certain metadata even if GENERIC_READ + * would have not been granted. */ file1 = CreateFileW (wname, 0, 0, NULL, OPEN_EXISTING, 0, NULL); xfree (wname); } |
