summaryrefslogtreecommitdiff
path: root/src/share/ma
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/ma')
-rw-r--r--src/share/ma/add_certifier16
-rw-r--r--src/share/ma/diagnostics2
-rw-r--r--src/share/ma/remove_certifier2
-rw-r--r--src/share/ma/update_users5
4 files changed, 18 insertions, 7 deletions
diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier
index f2cadf2..6f85ecf 100644
--- a/src/share/ma/add_certifier
+++ b/src/share/ma/add_certifier
@@ -120,14 +120,24 @@ else
# get the full fingerprint of new certifier key
log debug "getting fingerprint of certifier key..."
fingerprint=$(gpg_sphere "--list-key --with-colons --with-fingerprint 0x${keyID}!" \
- | grep '^fpr:' | grep "$keyID" | cut -d: -f10)
+ | grep '^fpr:' | cut -d: -f10)
+
+ # test that there is only a single fingerprint
+ if (( $(echo "$fingerprint" | wc -l) != 1 )) ; then
+ cat <<EOF
+More than one fingerprint found:
+$fingerprint
+Please use a more specific key ID.
+EOF
+ failure
+ fi
log info "key found:"
gpg_sphere "--fingerprint 0x${fingerprint}!"
if [ "$PROMPT" = "true" ] ; then
- echo "Are you sure you want to add the above key as a"
- read -p "certifier of users on this system? (Y/n) " OK; OK=${OK:-Y}
+ echo "Are you sure you want to add the above key as a certifier"
+ read -p "of users on this system? (Y/n) " OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "Identity certifier not added."
fi
diff --git a/src/share/ma/diagnostics b/src/share/ma/diagnostics
index ce463b2..8fc4b31 100644
--- a/src/share/ma/diagnostics
+++ b/src/share/ma/diagnostics
@@ -105,7 +105,7 @@ echo
echo "Checking for Identity Certifiers..."
if ! monkeysphere-authentication list-identity-certifiers | egrep -q '^[A-F0-9]{40}:' then
echo "! No Identity Certifiers found!"
- echo " - Recommendation: once you know who should be able to certify identities for
+ echo " - Recommendation: once you know who should be able to certify the identities of
connecting users, you should add their key, with:
monkeysphere-authentication add-identity-certifier"
problemsfound=$(($problemsfound+1))
diff --git a/src/share/ma/remove_certifier b/src/share/ma/remove_certifier
index a9a1451..6c90358 100644
--- a/src/share/ma/remove_certifier
+++ b/src/share/ma/remove_certifier
@@ -27,7 +27,7 @@ fi
gpg_core --list-key --fingerprint "0x${keyID}!" || failure
if [ "$PROMPT" = "true" ] ; then
- read -p "Really remove the identity certifier above? (Y/n) " OK; OK=${OK:-Y}
+ read -p "Really remove the above listed identity certifier? (Y/n) " OK; OK=${OK:-Y}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "Identity certifier not removed."
fi
diff --git a/src/share/ma/update_users b/src/share/ma/update_users
index 092d108..bfefc31 100644
--- a/src/share/ma/update_users
+++ b/src/share/ma/update_users
@@ -93,8 +93,8 @@ for uname in $unames ; do
# process authorized_user_ids file, as monkeysphere user
su_monkeysphere_user \
- ". ${SYSSHAREDIR}/common; process_authorized_user_ids $TMP_AUTHORIZED_USER_IDS"
- RETURN="$?"
+ ". ${SYSSHAREDIR}/common; process_authorized_user_ids $TMP_AUTHORIZED_USER_IDS" \
+ || RETURN="$?"
else
log debug "not processing authorized_user_ids."
fi
@@ -154,4 +154,5 @@ for uname in $unames ; do
rm -rf "$TMPLOC"
done
+return $RETURN
}