summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-09-13 16:12:25 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-09-13 16:12:25 -0400
commit988ed72a69dde1e5e0a028823fed0536cd926520 (patch)
tree81858111f3219d9500f42345203388e4c0bde018
parentf197988f32461371452947cdfb310c8d9c367447 (diff)
fixing bugs in monkeysphere-server diagnostics.
-rw-r--r--packaging/freebsd/distinfo6
-rwxr-xr-xsrc/monkeysphere-server7
2 files changed, 7 insertions, 6 deletions
diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo
index 1a3b6c5..63bc25e 100644
--- a/packaging/freebsd/distinfo
+++ b/packaging/freebsd/distinfo
@@ -1,3 +1,3 @@
-MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 7ec79824cf814c618b39e9bf33ff65b1
-SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = bce97a2b2f90bc85b81af374cc0d32dfb23c6b2c1f1b2145f8a4d4a5bb00645b
-SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58595
+MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 23be1e51f2046652985ff102018549db
+SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 2caeb5ce39572400f09b66cf5df8d9f6fb7b84b3d0371c532337a29632018340
+SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58689
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index a0dc33f..7401bf5 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -665,7 +665,7 @@ diagnostics() {
echo " - Recommendation: add a line to $sshd_config: 'HostKey ${VARLIB}/ssh_host_rsa_key'"
problemsfound=$(($problemsfound+1))
fi
- if badhostkeys=$(grep -i '^HostKey' "$sshd_config" | grep -q -v "^HostKey[[:space:]]\+${VARLIB}/ssh_host_rsa_key$") ; then
+ if badhostkeys=$(grep -i '^HostKey' "$sshd_config" | grep -v "^HostKey[[:space:]]\+${VARLIB}/ssh_host_rsa_key$") ; then
echo "! $sshd_config refers to some non-monkeysphere host keys:"
echo "$badhostkeys"
echo " - Recommendation: remove the above HostKey lines from $sshd_config"
@@ -689,8 +689,9 @@ diagnostics() {
if ! grep -q "^AuthorizedKeysFile[[:space:]]\+${VARLIB}/authorized_keys/%u$" "$sshd_config"; then
echo "! $sshd_config does not point to monkeysphere authorized keys."
echo " - Recommendation: add a line to $sshd_config: 'AuthorizedKeysFile ${VARLIB}/authorized_keys/%u'"
+ problemsfound=$(($problemsfound+1))
fi
- if badauthorizedkeys=$(grep -i '^AuthorizedKeysFile' "$sshd_config" | grep -q -v "^AuthorizedKeysFile[[:space:]]\+${VARLIB}/authorized_keys/%u$") ; then
+ if badauthorizedkeys=$(grep -i '^AuthorizedKeysFile' "$sshd_config" | grep -v "^AuthorizedKeysFile[[:space:]]\+${VARLIB}/authorized_keys/%u$") ; then
echo "! $sshd_config refers to non-monkeysphere authorized_keys files:"
echo "$badauthorizedkeys"
echo " - Recommendation: remove the above AuthorizedKeysFile lines from $sshd_config"
@@ -698,7 +699,7 @@ diagnostics() {
fi
if [ "$problemsfound" -gt 0 ]; then
- echo "When the above $problemsfound problem"$([ "$problemsfound" -eq 1 ] || echo "s")" are resolved, please re-run:"
+ echo "When the above $problemsfound issue"$(if [ "$problemsfound" -eq 1 ] ; then echo " is" ; else echo "s are" ; fi)" resolved, please re-run:"
echo " monkeysphere-server diagnostics"
fi
}