Home GnuPG
Diffusion GnuPG 4dfa951a0a63

w32: Move socketdir to LOCAL_APPDATA

Description

w32: Move socketdir to LOCAL_APPDATA

* common/homedir.c (is_gnupg_default_homedir): Use standard_homedir
instead of the constant which makes a difference on Windows.
(_gnupg_socketdir_internal) [W32]: Move the directory to LOCAL_APPDATA.
(gnupg_cachedir): Remove unsued function.
* common/sysutils.c (gnupg_rmdir): New.
* tools/gpgconf.c (main): s/rmdir/gnupg_rmdir/.

That is actually a more correct directory than APPDATA. This fixes
a problem with installations where the APPDATA is non a network drive
and the resulting socket filename is truncated in our socket helper
function (because we use sockaddr also for our local socket
emulation on Windows).

LOCAL_APPDATA is expected to be on the local box and thus in the
majority of cases the resulting socket file name will be short enough.

Backport-from-master: 0802cbb59b21e06e16b4fd8596934c5565e7f659

  • GnuPG-bug-id: T5537
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Aug 11 2021, 11:50 AM
Parents
rG013f2e4672b1: gpgconf,w32: Print more registry diagnostics with --list-dirs.
Branches
Unknown
Tags
Unknown
Tasks
T5537: Use CSIDL_LOCAL_APPDATA for the socketdir