diff options
Diffstat (limited to 'subversion/libsvn_subr/gpg_agent.c')
-rw-r--r-- | subversion/libsvn_subr/gpg_agent.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/subversion/libsvn_subr/gpg_agent.c b/subversion/libsvn_subr/gpg_agent.c index 4dbf1184e4e5..96021c52ec85 100644 --- a/subversion/libsvn_subr/gpg_agent.c +++ b/subversion/libsvn_subr/gpg_agent.c @@ -76,6 +76,7 @@ #include "svn_user.h" #include "svn_dirent_uri.h" +#include "auth.h" #include "private/svn_auth_private.h" #include "svn_private_config.h" @@ -107,7 +108,7 @@ escape_blanks(char *str) * to other password caching mechanisms. */ static svn_error_t * get_cache_id(const char **cache_id_p, const char *realmstring, - apr_pool_t *scratch_pool, apr_pool_t *result_pool) + apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *cache_id = NULL; svn_checksum_t *digest = NULL; @@ -208,7 +209,7 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) /* This implements the method of finding the socket as described in * the gpg-agent man page under the --use-standard-socket option. - * The manage page misleadingly says the standard socket is + * The manage page misleadingly says the standard socket is * "named 'S.gpg-agent' located in the home directory." The standard * socket path is actually in the .gnupg directory in the home directory, * i.e. ~/.gnupg/S.gpg-agent */ @@ -218,7 +219,7 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) apr_array_header_t *socket_details; /* For reference GPG_AGENT_INFO consists of 3 : separated fields. - * The path to the socket, the pid of the gpg-agent process and + * The path to the socket, the pid of the gpg-agent process and * finally the version of the protocol the agent talks. */ socket_details = svn_cstring_split(gpg_agent_info, ":", TRUE, pool); @@ -231,8 +232,9 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) if (!homedir) return SVN_NO_ERROR; + homedir = svn_dirent_canonicalize(homedir, pool); socket_name = svn_dirent_join_many(pool, homedir, ".gnupg", - "S.gpg-agent", NULL); + "S.gpg-agent", SVN_VA_NULL); } if (socket_name != NULL) @@ -629,7 +631,7 @@ static const svn_auth_provider_t gpg_agent_simple_provider = { /* Public API */ void -svn_auth_get_gpg_agent_simple_provider(svn_auth_provider_object_t **provider, +svn_auth__get_gpg_agent_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool) { svn_auth_provider_object_t *po = apr_pcalloc(pool, sizeof(*po)); |