Control: tags 767341 + patch

Hi Christoph--

On Thu 2014-10-30 07:06:47 -0400, Christoph Egger wrote:

> setting SSH_AGENT_PID and SSH_AUTH_SOCKET to ~/.gnupg/S.gpg-agent.ssh if
> it exists should be enough fwiw. It even then supports ed25519 keys (wrt
> #764702)

I don't want to auto-enable that for everyone, because gpg's ssh-agent
support doesn't match the workflow for openssh's ssh-agent support and
not everyone likes the different workflow (i personally prefer
ssh-agent's workflow, for example).

That said, i do want to make this work for folks who do prefer gpg-agent's
ssh-agent workflow, so thanks for bringing this up.

I'm not convinced that setting SSH_AGENT_PID actually matters in
practice, so i think we could get away with just setting
SSH_AUTH_SOCKET.

Does the attached patch work for you?  If so, i'll roll up a new
version with the patch.

        --dkg

diff --git a/debian/gnupg-agent.xsession b/debian/gnupg-agent.xsession
index a063df9..3c87419 100644
--- a/debian/gnupg-agent.xsession
+++ b/debian/gnupg-agent.xsession
@@ -12,4 +12,8 @@ if grep -qs '^[[:space:]]*use-agent' "$GNUPGHOME/gpg.conf" "$GNUPGHOME/options"
    fi
    GPG_AGENT_INFO=${HOME}/.gnupg/S.gpg-agent:0:1
    export GPG_AGENT_INFO
+   if grep -qs '^[[:space:]]*enable-ssh-support' "$GNUPGHOME/gpg-agent.conf"; then
+       SSH_AUTH_SOCKET=${HOME}/.gnupg/S.gpg-agent.ssh
+       export SSH_AUTH_SOCKET
+   fi
 fi

Attachment: pgp55fncuuAq6.pgp
Description: PGP signature

Reply via email to