Merge commit 'dkg/master'
authorJameson Graef Rollins <jrollins@phys.columbia.edu>
Mon, 23 Jun 2008 23:33:54 +0000 (19:33 -0400)
committerJameson Graef Rollins <jrollins@phys.columbia.edu>
Mon, 23 Jun 2008 23:33:54 +0000 (19:33 -0400)
src/common
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 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