From: Carlos Aguado Sanchez <[email protected]>
Signed-off-by: Carlos Aguado Sanchez <[email protected]> Signed-off-by: Valentin Haenel <[email protected]> --- contrib/gl-check-user | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 contrib/gl-check-user diff --git a/contrib/gl-check-user b/contrib/gl-check-user new file mode 100755 index 0000000000..2f9a331e00 --- /dev/null +++ b/contrib/gl-check-user @@ -0,0 +1,18 @@ +#!/bin/sh +# Wrapper around gitolite to perform +# repository authentication from a +# CGI environment +prog="/usr/local/bin/gitolite" + +# Repository to check access against +# Strip the trailing .git if one is +# present +export REPO=${1%%.git} +export REMOTE_USER=${2} +export PERM=${3-"R"} +# HTTPD will not set some essential +# variables expexted by gitolite +# Set them here (EUID expected final) +export HOME=`getent passwd $(id -n -u) | cut -d":" -f 6` + +exec $prog access -q ${REPO} ${REMOTE_USER} ${PERM} -- 1.7.9.5 _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
