diff options
author | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-06-19 18:09:41 -0400 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-06-19 18:09:41 -0400 |
commit | 7019354a75ca19ffd2e10f2e2b3dc89b480156bd (patch) | |
tree | 0acbae5dad6595840642330691796cd40cf6f8a9 /src/monkeysphere-server | |
parent | f511119f57f076147acb2b5dccae597b34df6c8d (diff) |
Better handling of unknown users in server update-users. Updated TODO file.
Diffstat (limited to 'src/monkeysphere-server')
-rwxr-xr-x | src/monkeysphere-server | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/monkeysphere-server b/src/monkeysphere-server index 154c146..a9a9aed 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -162,6 +162,12 @@ case $COMMAND in for uname in $unames ; do MODE="authorized_keys" + # check all specified users exist + if ! getent passwd | cut -d: -f1 | grep -q "^${uname}$" ; then + error "----- unknown user '$uname' -----" + continue + fi + # set authorized_user_ids variable, # translate ssh-style path variables authorizedUserIDs=$(translate_ssh_variables "$uname" "$AUTHORIZED_USER_IDS") @@ -201,8 +207,6 @@ case $COMMAND in log "authorized_keys file updated." done - - log "----- done. -----" ;; 'gen-key'|'g') @@ -237,3 +241,5 @@ case $COMMAND in Type '$PGRM help' for usage." ;; esac + +exit "$ERR" |