From 6907cc2eb90a29bda155f4ab59af1da4f735c85b Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 11 Nov 2010 17:39:18 -0500 Subject: If for whatever reason the primary UID comes up empty, give the injected subkey a reasonable name instead of the empty string --- src/share/m/subkey_to_ssh_agent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/m/subkey_to_ssh_agent b/src/share/m/subkey_to_ssh_agent index 79291b1..4bd2234 100644 --- a/src/share/m/subkey_to_ssh_agent +++ b/src/share/m/subkey_to_ssh_agent @@ -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: -- cgit v1.2.3