You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/keychain/files/keychain-2.8.0-posix-sh.patch

36 lines
1.2 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

From 6052ce29af20d237f6fe6f044e9f4110e053c763 Mon Sep 17 00:00:00 2001
From: vaeth <martin@mvath.de>
Date: Sat, 21 Mar 2015 20:14:13 +0100
Subject: [PATCH] Re-introduce POSIX compatibility
By making the openssh 6.8 format match slightly more verbose, one can make it POSIX compatible again and remove the bashism "shopt". This way, the script works (again) if /bin/sh is a symlink to dash.
---
keychain.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/keychain.sh b/keychain.sh
index 6dae912..1ab79ba 100755
--- a/keychain.sh
+++ b/keychain.sh
@@ -56,8 +56,6 @@ unset ssh_confirm
unset GREP_OPTIONS
realpath_bin="`command -v realpath`"
-shopt -s extglob
-
BLUE=""
CYAN=""
CYANN=""
@@ -683,7 +681,7 @@ extract_fingerprints() {
# 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
;;
- *\ @(SHA256|MD5):[0-9a-zA-Z\+\/=]*)
+ *\ SHA256:[0-9a-zA-Z\+\/=]*|*\ MD5:[0-9a-zA-Z\+\/=]*)
# The new OpenSSH 6.8+ format,
# 1024 SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE /home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
--
2.3.5