If for whatever reason the primary UID comes up empty, give the injected subkey a...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 11 Nov 2010 22:39:18 +0000 (17:39 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 13 Nov 2010 23:33:54 +0000 (18:33 -0500)
src/share/m/subkey_to_ssh_agent

index 79291b11d58f55a4e8745493e2f5d04c30f6007b..4bd22341e3177e2ea8e3106fc375f99c7dc96c23 100644 (file)
@@ -97,7 +97,7 @@ You might want to run 'monkeysphere gen-subkey'."
        primaryuid=$(gpg_user --with-colons --list-key "0x${subkey}!" | grep '^uid:' | head -n1 | cut -f10 -d: | tr -d /)
 
        #kname="[monkeysphere] $primaryuid"
-       kname="$primaryuid"
+       kname="${primaryuid:-Monkeysphere Key 0x${subkey}}"
 
        if [ "$1" = '-d' ]; then
            # we're removing the subkey: