X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-server;h=6798fab185da534060695843f09efbe12a676c3e;hb=531e08b2394fb7935fdd128f52445e5191c8ca6b;hp=b96a65986a7f516f5f5747f07da266c178fb6446;hpb=1343ffb414e74917b4e6f9eed05df035d25be4aa;p=monkeysphere.git diff --git a/src/monkeysphere-server b/src/monkeysphere-server index b96a659..6798fab 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -67,7 +67,7 @@ EOF } su_monkeysphere_user() { - su --preserve-environment "$MONKEYSPHERE_USER" -- -c "$@" + su -m "$MONKEYSPHERE_USER" -c "$@" } # function to interact with the host gnupg keyring @@ -267,7 +267,7 @@ gen_key() { revoker= # get options - TEMP=$(getopt -o e:l:r -l expire:,length:,revoker: -n "$PGRM" -- "$@") + TEMP=$(PATH="/usr/local/bin:$PATH" getopt -o e:l:r -l expire:,length:,revoker: -n "$PGRM" -- "$@") || failure "getopt failed! Does your getopt support GNU-style long options?" if [ $? != 0 ] ; then exit 1 @@ -299,7 +299,7 @@ gen_key() { esac done - hostName=${1:-$(hostname --fqdn)} + hostName=${1:-$(hostname -f)} userID="ssh://${hostName}" # check for presense of key with user ID @@ -642,7 +642,7 @@ diagnostics() { if [ ! -s "${VARLIB}/ssh_host_rsa_key" ] ; then echo "! The host key as prepared for SSH (${VARLIB}/ssh_host_rsa_key) is missing or empty." else - if [ $(stat -c '%a' "${VARLIB}/ssh_host_rsa_key") != 600 ] ; then + if [ $(ls -l "${VARLIB}/ssh_host_rsa_key" | cut -f1 -d\ ) != '-rw-------' ] ; then echo "! Permissions seem wrong for ${VARLIB}/ssh_host_rsa_key -- should be 0600." fi @@ -699,7 +699,7 @@ add_certifier() { depth=1 # get options - TEMP=$(getopt -o n:t:d: -l domain:,trust:,depth: -n "$PGRM" -- "$@") + TEMP=$(PATH="/usr/local/bin:$PATH" getopt -o n:t:d: -l domain:,trust:,depth: -n "$PGRM" -- "$@") || failure "getopt failed! Does your getopt support GNU-style long options?" if [ $? != 0 ] ; then exit 1