From: Martin Zobel-Helas Date: Sun, 17 Jun 2012 10:41:45 +0000 (+0200) Subject: LoadModule and LoadFile are not permited X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1a2cc46934663795de56cc28eee9b5351edead75;p=dsa-metapackages.git LoadModule and LoadFile are not permited Signed-off-by: Martin Zobel-Helas --- diff --git a/apache2-vhost-update b/apache2-vhost-update index 5bddf71..24d59c8 100755 --- a/apache2-vhost-update +++ b/apache2-vhost-update @@ -122,6 +122,20 @@ if grep -i include "$DESTINATION/$site" > /dev/null; then exit 1 fi +if grep -i LoadModule "$DESTINATION/$site" > /dev/null; then + echo "New site may have LoadModule statements - rejecting." >&2 + rm -f "$DESTINATION/$site" + co "$DESTINATION/$site" + exit 1 +fi + +if grep -i LoadFile "$DESTINATION/$site" > /dev/null; then + echo "New site may have LoadFile statements - rejecting." >&2 + rm -f "$DESTINATION/$site" + co "$DESTINATION/$site" + exit 1 +fi + /usr/sbin/apache2ctl configtest if [ "$?" != "0" ]; then echo "configtest returned errors; reverting." >&2