chiark / gitweb /
Programs invoke themselves via `userv' if necessary.
[distorted-keys] / cryptop.in
index 3efb554c693b38f3f124639fc8a604a8393c528a..064b5955cf270a7a390c0e549cf59b664b8145e4 100755 (executable)
@@ -34,16 +34,7 @@ export ETC KEYS KEYSLIB
 usage="usage: $quis 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