autodist-cgi: support buildlogdir for 'autodist' user in chroot mode

This commit is contained in:
Silvan Calarco 2013-02-02 14:55:06 +01:00
parent ccf4cda924
commit 54379b55d4

View File

@ -153,7 +153,11 @@ _EOF
# Security check
[ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
BUILDLOGDIR="$LOGDIR"
if [ "${AUTOPORT_CHROOT_USER[$i]}" = "autodist" ]; then
BUILDLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$i]}/var/autodist/log/"
else
BUILDLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autodist/log/"
fi
elif [ "${AUTOPORT_NATIVE[$i]}" -o "${AUTOPORT_UPDATE[$i]}" ]; then
BUILDLOGDIR="/var/autodist/log/"
fi