From: Daniel Kahn Gillmor Date: Sat, 31 Jan 2009 22:47:25 +0000 (-0500) Subject: merging changes from micah X-Git-Tag: monkeysphere_0.23~160^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b05c5750ef56d4573ad251b6193da83a30d9a39;p=monkeysphere.git merging changes from micah --- 4b05c5750ef56d4573ad251b6193da83a30d9a39 diff --cc src/monkeysphere-host index 9eed3ac,3caa63d..bf58616 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@@ -105,16 -115,17 +105,6 @@@ gpg_host() return "$returnCode" } - # check if user is root - is_root() { - [ $(id -u 2>/dev/null) = '0' ] - } -# function to interact with the authentication gnupg keyring -# FIXME: this function requires basically accepts only a single -# argument because of problems with quote expansion. this needs to be -# fixed/improved. -gpg_authentication() { - GNUPGHOME="$GNUPGHOME_AUTHENTICATION" - export GNUPGHOME -- - # check that user is root, for functions that require root access - check_user() { - is_root || failure "You must be root to run this command." - su_monkeysphere_user "gpg $@" --} -- # output just key fingerprint fingerprint_server_key() { # set the pipefail option so functions fails if can't read sec key @@@ -781,8 -1118,11 +763,7 @@@ case $COMMAND i revoke_key "$@" ;; - 'show-key'|'show'|'s') - show_server_key - ;; - 'publish-key'|'publish'|'p') - check_user check_host_keyring publish_server_key ;;