change from using a filename that is a just a space to an actual temporary file
authorMicah Anderson <micah@riseup.net>
Sat, 15 Nov 2008 23:55:42 +0000 (18:55 -0500)
committerMicah Anderson <micah@riseup.net>
Sat, 15 Nov 2008 23:55:42 +0000 (18:55 -0500)
src/monkeysphere-server

index e78903b8e1d6cce2725e7c04a881cff3ae027a79..5edaa4f2c9448dfabd74c535b536381641fea176 100755 (executable)
@@ -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"