trying to make m gen-subkey more responsive in the face of errors, and clearer to...
[monkeysphere.git] / src / share / common
index 5a118172d72774b7ae341269b9ef6bd17f864774..c8d44f656c58136be011a0bd80c5af077adeaedb 100644 (file)
@@ -304,6 +304,8 @@ passphrase_prompt() {
     local PASS
 
     if [ "$DISPLAY" ] && which "${SSH_ASKPASS:-ssh-askpass}" >/dev/null; then
+       printf 'Launching "%s"\n' "${SSH_ASKPASS:-ssh-askpass}" | log info
+       printf '(with prompt "%s")\n' "$prompt" | log debug
        "${SSH_ASKPASS:-ssh-askpass}" "$prompt" > "$fifo"
     else
        read -s -p "$prompt" PASS
@@ -467,7 +469,11 @@ ssh2known_hosts() {
     local port
     local key
 
-    host=${1%%:*}
+    # FIXME this does not properly deal with IPv6 hosts using the
+    # standard port (because it's unclear whether their final
+    # colon-delimited address section is a port number or an address
+    # string)
+    host=${1%:*}
     port=${1##*:}
     key="$2"