webbuild-function, autodist-cgi: also fix buildlogdir for autodist user in chroot mode
This commit is contained in:
parent
0a7f28e6e3
commit
8235cba011
@ -153,7 +153,7 @@ _EOF
|
|||||||
# Security check
|
# Security check
|
||||||
[ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue
|
[ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue
|
||||||
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
||||||
BUILDLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autodist/log/"
|
BUILDLOGDIR="$LOGDIR"
|
||||||
elif [ "${AUTOPORT_NATIVE[$i]}" -o "${AUTOPORT_UPDATE[$i]}" ]; then
|
elif [ "${AUTOPORT_NATIVE[$i]}" -o "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||||
BUILDLOGDIR="/var/autodist/log/"
|
BUILDLOGDIR="/var/autodist/log/"
|
||||||
fi
|
fi
|
||||||
|
@ -279,7 +279,12 @@ function environment_autoport_logdir() {
|
|||||||
function environment_logdir() {
|
function environment_logdir() {
|
||||||
local env=$1
|
local env=$1
|
||||||
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
|
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
|
||||||
|
# FIXME: be able to detect real home without using chroot
|
||||||
|
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
||||||
|
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/log/"
|
||||||
|
else
|
||||||
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/"
|
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/"
|
||||||
|
fi
|
||||||
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
|
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
|
||||||
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
|
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
|
||||||
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user