From: Daniel Kahn Gillmor Date: Thu, 19 Jun 2008 07:33:29 +0000 (-0400) Subject: monkeysphere-server should not bother adding the user-controlled authorized_keys... X-Git-Tag: monkeysphere_0.1-1~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1cfde8b57895ab300f47452d03da20e73f27032d;p=monkeysphere.git monkeysphere-server should not bother adding the user-controlled authorized_keys file if it does not exist. --- diff --git a/src/monkeysphere-server b/src/monkeysphere-server index f222130..96a1070 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -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