You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Patrick Steinhardt <ps...@pks.im> on 2016/10/27 09:15:18 UTC
[PATCH] gpg-agent: search gpg-agent socket in $GNUPGHOME
Hi,
a recent thread on issues with gpg-agent lead me to take a look
at how the gpg-agent socket is located in subversion. The current
code was lacking support for $GNUPGHOME, which allows a user to
relocate his gnupg configuration directory. As setting this
environment variable would also cause S.gpg-agent to be created
inside of $GNUPGHOME, we might fail to correctly locate the file
in this case.
Attached patch fixes the problem.
[[[
gpg_agent: search in $GNUPGHOME for gpg-agent socket
The socket used to connect to the gpg-agent resides in the GnuPG
home directory, which is by default located at "$HOME/.gnupg".
But in fact, the home directory can be relocated by the user by
setting the environment variable GNUPGHOME, in which case the
gpg-agent socket will live at "$GNUPGHOME/S.gpg-agent".
Subversion does only search the standard home directory, though,
without evaluating $GNUPGHOME.
Fix the issue by using the socket located at
"$GNUPGHOME/S.gpg-agent" instead of using "$HOME/.gnupg" when the
environment variable is set.
* subversion/libsvn_subr/gpg_agent.c
(find_running_gpg_agent): evaluate $GNUPGHOME
]]]
Re: [PATCH] gpg-agent: search gpg-agent socket in $GNUPGHOME
Posted by Patrick Steinhardt <ps...@pks.im>.
Hi Bert,
On Thu, Oct 27, 2016 at 11:54:06AM +0200, Bert Huijben wrote:
> > -----Original Message-----
> > From: Patrick Steinhardt [mailto:ps@pks.im]
> > Sent: donderdag 27 oktober 2016 11:15
> > To: Subversion <de...@subversion.apache.org>
> > Subject: [PATCH] gpg-agent: search gpg-agent socket in $GNUPGHOME
> >
> > Hi,
> >
> > a recent thread on issues with gpg-agent lead me to take a look
> > at how the gpg-agent socket is located in subversion. The current
> > code was lacking support for $GNUPGHOME, which allows a user to
> > relocate his gnupg configuration directory. As setting this
> > environment variable would also cause S.gpg-agent to be created
> > inside of $GNUPGHOME, we might fail to correctly locate the file
> > in this case.
> >
> > Attached patch fixes the problem.
>
> Hi Patrick,
>
> Last week (in r1766327) a slightly different patch was committed to resolve
> this (or a similar problem).
>
> This patch was nominated for backport to 1.9.x, so test input is very
> welcome.
>
> Do you know if we need both patches?
>
> Bert
> >
> > [[[
> > gpg_agent: search in $GNUPGHOME for gpg-agent socket
> >
> > The socket used to connect to the gpg-agent resides in the GnuPG
> > home directory, which is by default located at "$HOME/.gnupg".
> > But in fact, the home directory can be relocated by the user by
> > setting the environment variable GNUPGHOME, in which case the
> > gpg-agent socket will live at "$GNUPGHOME/S.gpg-agent".
> > Subversion does only search the standard home directory, though,
> > without evaluating $GNUPGHOME.
> >
> > Fix the issue by using the socket located at
> > "$GNUPGHOME/S.gpg-agent" instead of using "$HOME/.gnupg" when the
> > environment variable is set.
> >
> > * subversion/libsvn_subr/gpg_agent.c
> > (find_running_gpg_agent): evaluate $GNUPGHOME
> > ]]]
heh, funny. Guess my mirror was out of sync, so I didn't have
this commit yet. The commited fix is actually the same as my fix.
So this patch can be dropped.
Thanks,
Patrick
RE: [PATCH] gpg-agent: search gpg-agent socket in $GNUPGHOME
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Patrick Steinhardt [mailto:ps@pks.im]
> Sent: donderdag 27 oktober 2016 11:15
> To: Subversion <de...@subversion.apache.org>
> Subject: [PATCH] gpg-agent: search gpg-agent socket in $GNUPGHOME
>
> Hi,
>
> a recent thread on issues with gpg-agent lead me to take a look
> at how the gpg-agent socket is located in subversion. The current
> code was lacking support for $GNUPGHOME, which allows a user to
> relocate his gnupg configuration directory. As setting this
> environment variable would also cause S.gpg-agent to be created
> inside of $GNUPGHOME, we might fail to correctly locate the file
> in this case.
>
> Attached patch fixes the problem.
Hi Patrick,
Last week (in r1766327) a slightly different patch was committed to resolve
this (or a similar problem).
This patch was nominated for backport to 1.9.x, so test input is very
welcome.
Do you know if we need both patches?
Bert
>
> [[[
> gpg_agent: search in $GNUPGHOME for gpg-agent socket
>
> The socket used to connect to the gpg-agent resides in the GnuPG
> home directory, which is by default located at "$HOME/.gnupg".
> But in fact, the home directory can be relocated by the user by
> setting the environment variable GNUPGHOME, in which case the
> gpg-agent socket will live at "$GNUPGHOME/S.gpg-agent".
> Subversion does only search the standard home directory, though,
> without evaluating $GNUPGHOME.
>
> Fix the issue by using the socket located at
> "$GNUPGHOME/S.gpg-agent" instead of using "$HOME/.gnupg" when the
> environment variable is set.
>
> * subversion/libsvn_subr/gpg_agent.c
> (find_running_gpg_agent): evaluate $GNUPGHOME
> ]]]