summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-11-11 17:39:18 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-11-13 18:33:54 -0500
commit6907cc2eb90a29bda155f4ab59af1da4f735c85b (patch)
tree42a73013d720606e3b582f0850e140421b2cbd8d /src
parent658b20d919d3498111efd5a6e901d3ab19d8e669 (diff)
If for whatever reason the primary UID comes up empty, give the injected subkey a reasonable name instead of the empty string
Diffstat (limited to 'src')
-rw-r--r--src/share/m/subkey_to_ssh_agent2
1 files changed, 1 insertions, 1 deletions
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: