monkeysphere-server should not bother adding the user-controlled authorized_keys...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 19 Jun 2008 07:33:29 +0000 (03:33 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 19 Jun 2008 07:33:29 +0000 (03:33 -0400)
src/monkeysphere-server

index f222130f81c7fbfacaf2c52bb94a0ddcaa50d7fd..96a1070ea173f917d098cd711cc6f80b6abddf64 100755 (executable)
@@ -111,7 +111,7 @@ EOF
 
     log -n "generating server key... "
     echo "$keyParameters" | gpg --batch --gen-key
-    log "done."
+    loge "done."
     fingerprint_server_key
 }
 
@@ -187,9 +187,11 @@ case $COMMAND in
            if [ "$USER_CONTROLLED_AUTHORIZED_KEYS" != '-' ] ; then
                userHome=$(getent passwd "$uname" | cut -d: -f6)
                userAuthorizedKeys=${USER_CONTROLLED_AUTHORIZED_KEYS/\%h/"$userHome"}
-               log -n "adding user's authorized_keys file... "
-               cat "$userAuthorizedKeys" >> "$AUTHORIZED_KEYS"
-               loge "done."
+               if [ -f "$userAuthorizedKeys" ] ; then
+                   log -n "adding user's authorized_keys file... "
+                   cat "$userAuthorizedKeys" >> "$AUTHORIZED_KEYS"
+                   loge "done."
+               fi
            fi
 
            # move the temp authorized_keys file into place