diff options
| author | Werner Koch <[email protected]> | 2017-12-18 15:38:02 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2017-12-18 15:42:59 +0000 |
| commit | c817e750283278e7e8317c1b47981e71ddcc9dbf (patch) | |
| tree | 0865a55b588243ac2883c483959ec483c4c2e9ae /common/homedir.c | |
| parent | po: Update Japanese translation. (diff) | |
| parent | gpgconf: Show --compliance in expert mode. (diff) | |
| download | gnupg-c817e750283278e7e8317c1b47981e71ddcc9dbf.tar.gz gnupg-c817e750283278e7e8317c1b47981e71ddcc9dbf.zip | |
Merge branch 'STABLE-BRANCH-2-2' into master
--
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/homedir.c')
| -rw-r--r-- | common/homedir.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/common/homedir.c b/common/homedir.c index 149e1ec62..a598900b9 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -541,7 +541,17 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info) #else /* Unix and stat(2) available. */ - static const char * const bases[] = { "/run", "/var/run", NULL}; + static const char * const bases[] = { +#ifdef USE_RUN_GNUPG_USER_SOCKET + "/run/gnupg", +#endif + "/run", +#ifdef USE_RUN_GNUPG_USER_SOCKET + "/var/run/gnupg", +#endif + "/var/run", + NULL + }; int i; struct stat sb; char prefix[13 + 1 + 20 + 6 + 1]; @@ -559,7 +569,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info) * as a background process with no (desktop) user logged in. Thus * we better don't do that. */ - /* Check whether we have a /run/user dir. */ + /* Check whether we have a /run/[gnupg/]user dir. */ for (i=0; bases[i]; i++) { snprintf (prefix, sizeof prefix, "%s/user/%u", |
