summaryrefslogtreecommitdiff
path: root/src/monkeysphere-host
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2009-01-31 18:34:06 -0500
committerJameson Graef Rollins <jrollins@finestructure.net>2009-01-31 18:34:06 -0500
commit93527967c043c99c708e209502292cf276877bf9 (patch)
tree9a90f939b9bf9e4692fc35232b537a1cfd371321 /src/monkeysphere-host
parentc7abef25b0cb36c04d12619659b7f0ad1b410c9a (diff)
parentc700e9b0dcede303ed1f160ba51f564fd314d2e3 (diff)
Merge commit 'dkg/master'
Diffstat (limited to 'src/monkeysphere-host')
-rwxr-xr-xsrc/monkeysphere-host16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/monkeysphere-host b/src/monkeysphere-host
index 31f031e..1f68256 100755
--- a/src/monkeysphere-host
+++ b/src/monkeysphere-host
@@ -97,16 +97,6 @@ gpg_host() {
return "$returnCode"
}
-# check if user is root
-is_root() {
- [ $(id -u 2>/dev/null) = '0' ]
-}
-
-# check that user is root, for functions that require root access
-check_user() {
- is_root || failure "You must be root to run this command."
-}
-
# output just key fingerprint
fingerprint_server_key() {
# set the pipefail option so functions fails if can't read sec key
@@ -202,37 +192,31 @@ case $COMMAND in
;;
'extend-key'|'e')
- check_user
check_host_keyring
extend_key "$@"
;;
'add-hostname'|'add-name'|'n+')
- check_user
check_host_keyring
add_hostname "$@"
;;
'revoke-hostname'|'revoke-name'|'n-')
- check_user
check_host_keyring
revoke_hostname "$@"
;;
'add-revoker'|'o')
- check_user
check_host_keyring
add_revoker "$@"
;;
'revoke-key'|'r')
- check_user
check_host_keyring
revoke_key "$@"
;;
'publish-key'|'publish'|'p')
- check_user
check_host_keyring
publish_server_key
;;