summaryrefslogtreecommitdiff
path: root/src/share/m
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 04:30:47 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 04:30:47 -0500
commit85c1f65ccd66be7f7ca939729f84bfab0603fdab (patch)
tree3ed25c27d0c12fd6ae3297cb73317e429ffbdc99 /src/share/m
parentb73147ef2259d6596554db071e3f934bb5e7cbe5 (diff)
added msmktempfile; got rid of /dev/stdin assumption in ssh_proxycommand for portability
Diffstat (limited to 'src/share/m')
-rw-r--r--src/share/m/ssh_proxycommand8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/share/m/ssh_proxycommand b/src/share/m/ssh_proxycommand
index d7e801e..e07b637 100644
--- a/src/share/m/ssh_proxycommand
+++ b/src/share/m/ssh_proxycommand
@@ -64,11 +64,11 @@ An OpenPGP key matching the ssh key offered by the host was found:
EOF
- # do some crazy "Here Strings" redirection to get the key to
- # ssh-keygen, since it doesn't read from stdin cleanly
- sshFingerprint=$(ssh-keygen -l -f /dev/stdin \
- <<<$(echo "$sshKeyGPG") | \
+ sshKeyGPGFile=$(msmktempfile)
+ printf "%s" "$sshKeyGPG" >"$sshKeyGPGFile"
+ sshFingerprint=$(ssh-keygen -l -f "$sshKeyGPGFile" \
awk '{ print $2 }')
+ rm -f "$sshKeyGPGFile"
# get the sigs for the matching key
gpgSigOut=$(gpg --check-sigs \