summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-06-23 19:57:20 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-06-23 19:57:20 -0400
commitc6ba2bb28cf594f2a613b989fe7cd71d9550633a (patch)
tree365c09829fb589f28e880eaeb81875e62f70ff86
parent2d56609494170affe821c54eea714de08c4db9c1 (diff)
parent9f64c356556520185325d20a8293ffa839c712bf (diff)
Merge commit 'jrollins/master'
-rw-r--r--src/common6
-rwxr-xr-xsrc/monkeysphere1
-rwxr-xr-xsrc/monkeysphere-server2
-rwxr-xr-xsrc/monkeysphere-ssh-proxycommand13
4 files changed, 15 insertions, 7 deletions
diff --git a/src/common b/src/common
index 9fd156b..5bb0b79 100644
--- a/src/common
+++ b/src/common
@@ -445,6 +445,9 @@ update_known_hosts() {
# least one host
returnCode=0
+ # set the trap to remove any lockfiles on exit
+ trap "lockfile-remove $KNOWN_HOSTS" EXIT
+
# create a lockfile on known_hosts
lockfile-create "$KNOWN_HOSTS"
@@ -526,6 +529,9 @@ update_authorized_keys() {
# at least one user ID
returnCode=0
+ # set the trap to remove any lockfiles on exit
+ trap "lockfile-remove $AUTHORIZED_KEYS" EXIT
+
# create a lockfile on authorized_keys
lockfile-create "$AUTHORIZED_KEYS"
diff --git a/src/monkeysphere b/src/monkeysphere
index 1368a80..11254e7 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -26,7 +26,6 @@ GREP_OPTIONS=
# default return code
ERR=0
-export ERR
########################################################################
# FUNCTIONS
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index e099a74..369555c 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -21,7 +21,7 @@ DATE=$(date -u '+%FT%T')
# unset some environment variables that could screw things up
GREP_OPTIONS=
-# assuming other problems don't crop up, we'll return 0 as success
+# default return code
ERR=0
########################################################################
diff --git a/src/monkeysphere-ssh-proxycommand b/src/monkeysphere-ssh-proxycommand
index f4d4b0d..6dcb723 100755
--- a/src/monkeysphere-ssh-proxycommand
+++ b/src/monkeysphere-ssh-proxycommand
@@ -31,6 +31,8 @@ fi
HOST="$1"
PORT="$2"
+MS_HOME=${MS_HOME:-"${HOME}/.config/monkeysphere"}
+
if [ -z "$HOST" ] ; then
log "host must be specified."
usage
@@ -58,11 +60,12 @@ else
# FIXME: this only works for default known_hosts location
hostKey=$(ssh-keygen -F "$HOST")
if [ "$hostKey" ] ; then
- # if the check keyserver variable is NOT set to true...
- if [ "$CHECK_KEYSERVER" != 'true' ] ; then
- # schedule a keyserver check for host at a later time
- echo "monkeysphere update-known_hosts $HOST" | at noon
- fi
+ # do not check the keyserver
+ # FIXME: more nuanced checking should be done here to properly
+ # take into consideration hosts that join monkeysphere by
+ # converting an existing and known ssh key
+ CHECK_KEYSERVER="false"
+
# if the host key is not found in the known_hosts file...
else
# check the keyserver