X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-server;h=6cef8974693e60abfccfc4ff97ea350c32d13673;hb=f08f75c3e1d2143d400e32482bd7928e8f5bba4b;hp=a8cc2115e3d752ff54c2d2c0f6c05dc123f02b04;hpb=9f65b455d187cfc86767de355a540f4ea19560b5;p=monkeysphere.git diff --git a/src/monkeysphere-server b/src/monkeysphere-server index a8cc211..6cef897 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -13,12 +13,12 @@ ######################################################################## PGRM=$(basename $0) -SHARE=${MONKEYSPHERE_SHARE:="/usr/share/monkeysphere"} +SHARE=${MONKEYSPHERE_SHARE:-"/usr/share/monkeysphere"} export SHARE . "${SHARE}/common" || exit 1 -VARLIB="/var/lib/monkeysphere" -export VARLIB +SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere" +export SYSDATADIR # UTC date in ISO 8601 format if needed DATE=$(date -u '+%FT%T') @@ -67,7 +67,7 @@ EOF } su_monkeysphere_user() { - su -m "$MONKEYSPHERE_USER" -c "$@" + su "$MONKEYSPHERE_USER" -c "$@" } # function to interact with the host gnupg keyring @@ -571,7 +571,7 @@ diagnostics() { warndate=$(advance_date $warnwindow +%s) if ! id monkeysphere >/dev/null ; then - echo "! No monkeysphere user found! Please create a monkeysphere system user." + echo "! No monkeysphere user found! Please create a monkeysphere system user with bash as its shell." problemsfound=$(($problemsfound+1)) fi @@ -683,6 +683,9 @@ diagnostics() { # FIXME: make sure that at least one identity certifier exists +# FIXME: look at the timestamps on the monkeysphere-generated +# authorized_keys files -- warn if they seem out-of-date. + echo echo "Checking for MonkeySphere-enabled public-key authentication for users ..." # Ensure that User ID authentication is enabled: @@ -911,7 +914,7 @@ unset RAW_AUTHORIZED_KEYS unset MONKEYSPHERE_USER # load configuration file -[ -e ${MONKEYSPHERE_SERVER_CONFIG:="${ETC}/monkeysphere-server.conf"} ] && . "$MONKEYSPHERE_SERVER_CONFIG" +[ -e ${MONKEYSPHERE_SERVER_CONFIG:="${SYSCONFIGDIR}/monkeysphere-server.conf"} ] && . "$MONKEYSPHERE_SERVER_CONFIG" # set empty config variable with ones from the environment, or with # defaults