summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-06-19 16:57:09 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-06-19 16:57:09 -0400
commitf511119f57f076147acb2b5dccae597b34df6c8d (patch)
tree537cddfa0de9c83052ae75c2a4647d9f550c1fe5 /src
parent15637a9ab9b4fe7ea537988f5cc145d35948d783 (diff)
Remove {update,remove}-userids functions, since we decided they
weren't worth it. Updated man pages as well.
Diffstat (limited to 'src')
-rw-r--r--src/common50
-rwxr-xr-xsrc/monkeysphere24
-rwxr-xr-xsrc/monkeysphere-server59
3 files changed, 1 insertions, 132 deletions
diff --git a/src/common b/src/common
index 89efc46..00ee7b0 100644
--- a/src/common
+++ b/src/common
@@ -369,56 +369,6 @@ process_user_id() {
done
}
-# update the cache for userid, and prompt to add file to
-# authorized_user_ids file if the userid is found in gpg
-# and not already in file.
-update_userid() {
- local userID
-
- userID="$1"
- authorizedUserIDs="$2"
-
- log "processing userid: '$userID'"
-
- # process the user ID to pull it from keyserver
- process_user_id "$userID" | grep -q "^0 "
-
- # check if user ID is in the authorized_user_ids file
- if ! grep -q "^${userID}\$" "$authorizedUserIDs" ; then
- read -p "user ID not currently authorized. authorize? [Y|n]: " OK; OK=${OK:=Y}
- if [ ${OK/y/Y} = 'Y' ] ; then
- # add if specified
- log -n " adding user ID to authorized_user_ids file... "
- echo "$userID" >> "$authorizedUserIDs"
- loge "done."
- else
- # else do nothing
- log " authorized_user_ids file untouched."
- fi
- fi
-}
-
-# remove a userid from the authorized_user_ids file
-remove_userid() {
- local userID
-
- userID="$1"
- authorizedUserIDs="$2"
-
- log "processing userid: '$userID'"
-
- # check if user ID is in the authorized_user_ids file
- if ! grep -q "^${userID}\$" "$authorizedUserIDs" ; then
- log " user ID not currently authorized."
- return 1
- fi
-
- # remove user ID from file
- log -n " removing user ID '$userID'... "
- remove_line "$authorizedUserIDs" "^${userID}$"
- loge "done."
-}
-
# process a host in known_host file
process_host_known_hosts() {
local host
diff --git a/src/monkeysphere b/src/monkeysphere
index a9c9d58..a433701 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -35,8 +35,6 @@ MonkeySphere client tool.
subcommands:
update-known_hosts (k) [HOST]... update known_hosts file
- update-userids (u) [USERID]... add/update user IDs
- remove-userids (r) [USERID]... remove user IDs
update-authorized_keys (a) update authorized_keys file
gen-subkey (g) KEYID generate an 'a' capable subkey
help (h,?) this help
@@ -159,28 +157,6 @@ case $COMMAND in
fi
;;
- 'update-userids'|'update-userid'|'u')
- if [ -z "$1" ] ; then
- failure "you must specify at least one userid."
- fi
- for userID ; do
- update_userid "$userID" "$AUTHORIZED_USER_IDS"
- done
- log "Run the following to update your monkeysphere authorized_keys file:"
- log "$PGRM update-authorized_keys"
- ;;
-
- 'remove-userids'|'remove-userid'|'r')
- if [ -z "$1" ] ; then
- failure "you must specify at least one userid."
- fi
- for userID ; do
- remove_userid "$userID" "$AUTHORIZED_USER_IDS"
- done
- log "Run the following to update your monkeysphere authorized_keys file:"
- log "$PGRM update-authorized_keys"
- ;;
-
'update-authorized_keys'|'update-authorized-keys'|'a')
MODE='authorized_keys'
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index bfd5db8..154c146 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -31,14 +31,11 @@ usage: $PGRM <subcommand> [args]
MonkeySphere server admin tool.
subcommands:
+ update-users (s) [USER]... update users authorized_keys files
gen-key (g) [HOSTNAME] generate gpg key for the server
show-fingerprint (f) show server's host key fingerprint
publish-key (p) publish server key to keyserver
trust-keys (t) KEYID... mark keyids as trusted
-
- update-users (s) [USER]... update users authorized_keys files
- update-user-userids (u) USER UID... add/update user IDs for a user
- remove-user-userids (r) USER UID... remove user IDs for a user
help (h,?) this help
EOF
@@ -231,60 +228,6 @@ case $COMMAND in
done
;;
- 'update-user-userids'|'update-user-userid'|'u')
- uname="$1"
- shift
- if [ -z "$uname" ] ; then
- failure "You must specify user."
- fi
- if [ -z "$1" ] ; then
- failure "You must specify at least one user ID."
- fi
-
- # set authorized_user_ids variable,
- # translate ssh-style path variables
- authorizedUserIDs=$(translate_ssh_variables "$uname" "$AUTHORIZED_USER_IDS")
-
- # make sure user's authorized_user_ids file exists
- touch "$authorizedUserIDs"
-
- # process the user IDs
- for userID ; do
- update_userid "$userID" "$authorizedUserIDs"
- done
-
- log "Run the following to update user's authorized_keys file:"
- log "$PGRM update-users $uname"
- ;;
-
- 'remove-user-userids'|'remove-user-userid'|'r')
- uname="$1"
- shift
- if [ -z "$uname" ] ; then
- failure "You must specify user."
- fi
- if [ -z "$1" ] ; then
- failure "You must specify at least one user ID."
- fi
-
- # set authorized_user_ids variable,
- # translate ssh-style path variables
- authorizedUserIDs=$(translate_ssh_variables "$uname" "$AUTHORIZED_USER_IDS")
-
- # make sure user's authorized_user_ids file exists
- if [ ! -f "$authorizedUserIDs" ] ; then
- failure "authorized_user_ids file '$authorizedUserIDs' does not exist."
- fi
-
- # process the user IDs
- for userID ; do
- remove_userid "$userID" "$authorizedUserIDs"
- done
-
- log "Run the following to update user's authorized_keys file:"
- log "$PGRM update-users $uname"
- ;;
-
'help'|'h'|'?')
usage
;;