From 86441f0defe41f1412cfaa66ab1d09e9dc9cf765 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 9 Oct 2011 19:00:24 -0400 Subject: [PATCH] Check for SSH_AUTH_SOCK and not SSH_AGENT_PID. Fixes gpg-agent's SSH support. --- doc/pwmc.1.in | 2 +- src/pwmc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/pwmc.1.in b/doc/pwmc.1.in index 64c3b3e1..eb7a05d8 100644 --- a/doc/pwmc.1.in +++ b/doc/pwmc.1.in @@ -53,7 +53,7 @@ Don't lock the data file upon opening it. .TP .I "\--no-ssh-agent" -Normally, when the SSH_AGENT_PID environment variable is set, pwmc will get +Normally, when the SSH_AUTH_SOCK environment variable is set, pwmc will get authentication details from the ssh agent. When this option is specified or when the environment variable is unset, a private key must be specified on the command line with the diff --git a/src/pwmc.c b/src/pwmc.c index 7c5ba3e0..0f485486 100644 --- a/src/pwmc.c +++ b/src/pwmc.c @@ -122,7 +122,7 @@ static void usage(const char *pn, int status) " a url string to connect to (see below)\n" #ifdef WITH_TCP " --no-ssh-agent\n" - " disable SSH agent (enabled when SSH_AGENT_PID is set)\n" + " disable SSH agent use (enabled when SSH_AUTH_SOCK is set)\n" " --identity, -i \n" " the ssh identity file to use for authentication\n" " --knownhosts, -k \n" @@ -1290,7 +1290,7 @@ int main(int argc, char *argv[]) if (rc) goto done; - if (!getenv("SSH_AGENT_PID")) + if (!getenv("SSH_AUTH_SOCK")) use_ssh_agent = 0; rc = pwmd_setopt(pwm, PWMD_OPTION_SSH_AGENT, use_ssh_agent); -- 2.11.4.GIT