From: Micah Anderson Date: Sat, 15 Nov 2008 23:55:42 +0000 (-0500) Subject: change from using a filename that is a just a space to an actual temporary file X-Git-Tag: monkeysphere_0.22-1~13^2~3^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4983d24c8e79729deaa02602b742eace6d09f86;p=monkeysphere.git change from using a filename that is a just a space to an actual temporary file --- diff --git a/src/monkeysphere-server b/src/monkeysphere-server index e78903b..5edaa4f 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -134,10 +134,10 @@ show_server_key() { # dumping to a file named ' ' so that the ssh-keygen output # doesn't claim any potentially bogus hostname(s): - tmpkey=$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX) || failure "Could not create temporary directory!" - gpg_authentication "--export $fingerprint" | openpgp2ssh "$fingerprint" 2>/dev/null > "$tmpkey/ " + tmpkey=$(mktemp ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX) || failure "Could not create temporary directory!" + gpg_authentication "--export $fingerprint" | openpgp2ssh "$fingerprint" 2>/dev/null > "$tmpkey" echo -n "ssh fingerprint: " - (cd "$tmpkey" && ssh-keygen -l -f ' ' | awk '{ print $2 }') + ssh-keygen -l -f $tmpkey | awk '{ print $1, $2, $4 }' rm -rf "$tmpkey" echo -n "OpenPGP fingerprint: " echo "$fingerprint"