summaryrefslogtreecommitdiff
path: root/net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch')
-rw-r--r--net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch b/net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch
new file mode 100644
index 000000000000..00c93c8c07d9
--- /dev/null
+++ b/net-misc/keychain/files/keychain-2.8.5-empty-ssh-askpass.patch
@@ -0,0 +1,21 @@
+https://salsa.debian.org/debian/keychain/-/blob/debian/master/debian/patches/empty-ssh-askpass.patch
+
+Description: Handle an empty (or unset) SSH_ASKPASS variable
+Bug-Debian: https://bugs.debian.org/325644
+Forwarded: no
+Author: Peter Pentchev <roam@debian.org>
+Author: Tim Connors <twc@aaocbn.aao.gov.au>
+Last-Updated: 2023-01-06
+
+--- a/keychain.sh
++++ b/keychain.sh
+@@ -1420,6 +1420,9 @@
+ IFS="$old_IFS" # restore IFS
+ set +f # re-enable globbing
+
++ if [ -z "$SSH_ASKPASS" ]; then
++ SSH_ASKPASS="$(command -v ssh-askpass || true)"
++ fi
+ if $noguiopt || [ -z "$SSH_ASKPASS" -o -z "$DISPLAY" ]; then
+ unset DISPLAY # DISPLAY="" can cause problems
+ unset SSH_ASKPASS # make sure ssh-add doesn't try SSH_ASKPASS