diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-06-19 03:33:29 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-06-19 03:33:29 -0400 |
commit | 1cfde8b57895ab300f47452d03da20e73f27032d (patch) | |
tree | aeebf71651e7ae5c54de2c80a25d319ebe4e1850 | |
parent | a5066c3a37a84bf47e1e1d6ff8ad755ad5fa9414 (diff) |
monkeysphere-server should not bother adding the user-controlled authorized_keys file if it does not exist.
-rwxr-xr-x | src/monkeysphere-server | 10 |
1 files changed, 6 insertions, 4 deletions
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 |