Merge commit 'jrollins/master'
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 23 Jun 2008 23:57:20 +0000 (19:57 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 23 Jun 2008 23:57:20 +0000 (19:57 -0400)
src/common
src/monkeysphere
src/monkeysphere-server
src/monkeysphere-ssh-proxycommand

index 9fd156b862b3a47d1a2ea89daabbc26dbfa09511..5bb0b79fac779d08348721f2d3e5d6df0f29ed5a 100644 (file)
@@ -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"
 
index 1368a802dc6a4562f94cf986d71973a7067e6be3..11254e7e570deac44d57ee00442400e2780d52e5 100755 (executable)
@@ -26,7 +26,6 @@ GREP_OPTIONS=
 
 # default return code
 ERR=0
-export ERR
 
 ########################################################################
 # FUNCTIONS
index e099a74a86fdbf7e1f59ea63230dfc30b0bc961e..369555cd64387aebc4e18c7a0abcafd926b214d8 100755 (executable)
@@ -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
 
 ########################################################################
index f4d4b0d9affb8835ae812e22c9fa58f5388c3fbf..6dcb723e244a6d32d5f114dc02a6f336fcae2a58 100755 (executable)
@@ -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