From c9cf025fadfe043f0f2f679e10d1207d8a158bb6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:01:31 +0200 Subject: Adding debian version 2.4.57-2. Signed-off-by: Daniel Baumann --- debian/tests/chroot | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 debian/tests/chroot (limited to 'debian/tests/chroot') diff --git a/debian/tests/chroot b/debian/tests/chroot new file mode 100644 index 0000000..9961198 --- /dev/null +++ b/debian/tests/chroot @@ -0,0 +1,39 @@ +#!/bin/sh +set -ex + +# Check that ChrootDir works correctly. Written in response to LP: #1251939. +# +# Author: Robie Basak +# +# This test requires: +# * wget +# * The dpkg-dev package for the dpkg-architecture command +# +# This is a "breaks-testbed" dep8 test. +# +# This test sets up a minimal environment to exercise ChrootDir. Do not use +# it as an example of how to set up Apache in a secure chroot environment. + +sed -i 's_DocumentRoot.*$_DocumentRoot /_' /etc/apache2/sites-available/000-default.conf + +LIBGCC_S_PATH=`gcc --print-file-name=libgcc_s.so.1` +cat > /etc/apache2/conf-available/chroot.conf < + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + +EOT +a2enconf chroot + +echo "Hello, world!" > /var/www/hello.txt + +service apache2 restart + +result=`wget -qO- http://localhost/hello.txt` +if [ "$result" != "Hello, world!" ]; then + echo "Unexpected result from wget" >&2 + exit 1 +fi -- cgit v1.2.3