aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-04-15 14:40:48 +0000
committerWerner Koch <[email protected]>2014-04-22 14:59:06 +0000
commitfdd938a5bbecb5b70f564ae3afb4e17905404bb2 (patch)
treeb9733169518511618d2b9b1a452ee0ae9dfdbea6 /agent/gpg-agent.c
parentcommon: Add functions make_absfilename and make_absfilename_try. (diff)
downloadgnupg-fdd938a5bbecb5b70f564ae3afb4e17905404bb2.tar.gz
gnupg-fdd938a5bbecb5b70f564ae3afb4e17905404bb2.zip
gpg: Pass --homedir to gpg-agent.
* agent/gpg-agent.c (main): Make sure homedir is absolute. * common/asshelp.c (lock_spawning): Create lock file with an absolute name. (start_new_gpg_agent): Use an absolute name for the socket and pass option --homedir to the agent. (start_new_dirmngr): Use an absolute name for the --homedir. -- This patch makes gpg's --homedir option behave again like in older versions. This is done by starting a new agent for each different home directory. Note that this assumes --use-standard-socket is used which is the default for 2.1.
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 5554d3f28..8078cba25 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -885,6 +885,10 @@ main (int argc, char **argv )
if (nogreeting )
greeting = 0;
+ /* Turn the homedir into an absolute one. */
+ opt.homedir = make_absfilename (opt.homedir, NULL);
+
+
if (greeting)
{
es_fprintf (es_stderr, "%s %s; %s\n",