X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-keys/blobdiff_plain/c47f2aba7d705252c660ba1ad0931fbb93122d80..a36c4bb549fd90f332c8d8fca649c7506e4408fc:/cryptop.in diff --git a/cryptop.in b/cryptop.in index 3efb554..4858a53 100755 --- a/cryptop.in +++ b/cryptop.in @@ -26,24 +26,15 @@ set -e : ${ETC=@pkgconfdir@} : ${KEYS=@pkgstatedir@} -: ${KEYSLIB=@pkglibdir@} +: ${KEYSLIB=@pkgdatadir@} export ETC KEYS KEYSLIB . "$KEYSLIB"/keyfunc.sh -usage="usage: $quis COMMAND [ARGUMENTS ...]" +usage="COMMAND [ARGUMENTS ...]" prefix=cryptop -## Fake up caller credentials if not called via userv. -case "${USERV_USER+t}" in - t) ;; - *) USERV_USER=${LOGNAME-${USER-$(id -un)}} USERV_UID=$(id -u) ;; -esac -case "${USERV_GROUP+t}" in - t) ;; - *) USERV_GROUP=$(id -Gn) USERV_GID=$(id -gn) ;; -esac -export USERV_USER USERV_UID USERV_GROUP USERV_GID +runas @user@ cryptop "$@" ## Parse options. while getopts "hv" opt; do