X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fmonkeysphere-host;h=6145c30fb8227395fe4e0ca9bdafac71cea3a0cb;hb=838f52739cc05bfaca19e49bc64c17b435022f1c;hp=5007cac3b6f503d1dc9324740cdc8a4ffc5df04e;hpb=8b806ee99239d48fd3c2920c19f5cac7d54d2e8d;p=monkeysphere.git diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 5007cac..6145c30 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -110,6 +110,11 @@ update_pgp_pub_file() { # all-number (e.g. ssh://666.666), which are technically not allowed # (though some exist on the 'net, apparently) +# FIXME: this will probably misbehave if raw IP addresses are provided, +# either IPv4 or IPv6 using the bracket notation. + +# FIXME: this doesn't address the use of hashed User IDs. + check_service_name() { local name="$1" local errs="" @@ -251,11 +256,12 @@ multi_key() { shift local keys=$@ local i=0 - local fprs=($(list_primary_fingerprints <"$HOST_KEY_FILE")) local key check_no_keys + local fprs=($(list_primary_fingerprints <"$HOST_KEY_FILE")) + if [[ -z "$1" || "$1" == '--all' ]] ; then keys="${fprs[@]}" fi @@ -264,7 +270,7 @@ multi_key() { if (( i++ > 0 )) ; then echo "##############################" fi - eval "$cmd" "$key" + "$cmd" "$key" done } @@ -373,7 +379,7 @@ COMMAND="$1" shift case $COMMAND in - 'import-key'|'i') + 'import-key'|'import'|'i') source "${MHSHAREDIR}/import_key" import_key "$@" ;; @@ -382,7 +388,7 @@ case $COMMAND in multi_key show_key "$@" ;; - 'set-expire'|'extend-key'|'e') + 'set-expire'|'extend-key'|'extend'|'e') source "${MHSHAREDIR}/set_expire" set_expire "$@" ;; @@ -421,7 +427,7 @@ case $COMMAND in update_pgp_pub_file ;; - 'version'|'v') + 'version'|'--version'|'v') version ;;