From 54379b55d45910e9085f2c33ce998c2072dd916f Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 2 Feb 2013 14:55:06 +0100 Subject: [PATCH] autodist-cgi: support buildlogdir for 'autodist' user in chroot mode --- autodist-cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autodist-cgi b/autodist-cgi index 11ee60f..147ecc6 100755 --- a/autodist-cgi +++ b/autodist-cgi @@ -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