summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2018-02-23 16:37:01 +0100
committerDaiki Ueno <dueno@src.gnome.org>2018-03-04 10:25:00 +0100
commit8db2b978e485d7349a46c734dd51fc30196da01a (patch)
tree7e25f93c865ef46bf4615db7744b4b111bbe3d97 /configure.ac
parent43f9d81d9a0b3279bb3d7e0a8dc495169b69ddb0 (diff)
downloadgnome-keyring-8db2b978e485d7349a46c734dd51fc30196da01a.tar.gz
ssh-agent: Use stock ssh-agent
This patch removes our own implementation of ssh-agent and switches to using the ssh-agent program provided by OpenSSH. We can't simply drop the ssh-agent functionality from gnome-keyring, as it enables the following: * Automatic loading and unlocking of keys * Prompting in the UI Instead we wrap the ssh-agent program as a subprocess and augment the protocol as we need. Co-authored-by: Daiki Ueno <dueno@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=775981
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e705c469..ff8c7b61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -347,14 +347,23 @@ AC_ARG_ENABLE([ssh-agent],
AC_HELP_STRING([--disable-ssh-agent],
[Don't include SSH agent in gnome-keyring]))
+AC_PATH_PROG([SSH_AGENT], [ssh-agent], [false])
+AC_DEFINE_UNQUOTED(SSH_AGENT, "$SSH_AGENT", [The path to ssh-agent])
+
+AC_PATH_PROG([SSH_ADD], [ssh-add], [false])
+AC_DEFINE_UNQUOTED(SSH_ADD, "$SSH_ADD", [The path to ssh-add])
+
if test "$enable_ssh_agent" != "no"; then
- AC_DEFINE(WITH_SSH, 1, [Whether to build SSH agent or not])
- ssh_status="yes"
-else
- ssh_status="no"
+ if test "$SSH_AGENT" = "false" -o "$SSH_ADD" = "false"; then
+ enable_ssh_agent=no
+ else
+ enable_ssh_agent=yes
+ AC_DEFINE(WITH_SSH, 1, [Whether to build SSH agent or not])
+ fi
fi
AM_CONDITIONAL(WITH_SSH, test "$enable_ssh_agent" != "no")
+ssh_status="$enable_ssh_agent"
# --------------------------------------------------------------------
# libgcrypt