aboutsummaryrefslogtreecommitdiffstats
path: root/common/homedir.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-03-27 14:14:20 +0000
committerJustus Winter <[email protected]>2017-03-27 14:21:02 +0000
commitcaf00915532e6e8e509738962964edcd14fb0654 (patch)
tree479d77f4bdabb69ada8a5a7a46c3c0dfdb8dae6c /common/homedir.c
parentg10: Support specifying SERIALNO for --card-status. (diff)
downloadgnupg-caf00915532e6e8e509738962964edcd14fb0654.tar.gz
gnupg-caf00915532e6e8e509738962964edcd14fb0654.zip
common: Fix connecting to the agent.
* common/homedir.c (_gnupg_socketdir_internal): Fix error handling. -- Prior to 26086b36 the non-existance of the socket directory was considered an error if a non-default home directory is used. Since 26086b36 we now create the directory on demand, but the function still returned the fallback path. This made the agent bind the socket in the socket directory, and the client trying to connect to the socket in the home directory. Fixes-commit: 26086b362ff47d21b1abefaf674a6464bf0a8921 Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'common/homedir.c')
-rw-r--r--common/homedir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/homedir.c b/common/homedir.c
index ee4438c1c..fce6d44be 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -586,6 +586,8 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info)
else
*r_info |= 64; /* Subdir does not exist. */
}
+ else
+ goto leave; /* Success! */
}
else
*r_info |= 64; /* Subdir does not exist. */