c45180b4b7
httpd(8) by adding chroot(2) support, disabled by default as expected with this module. Otherwise no user would be able to run his tests without the effort of setting up a chroot(2) environment with Perl and everything else, and obviously also running them as root. To enable chroot set the APACHE_TEST_CHROOT environment variable or start the tests with `./t/TEST -chroot 1'. I'm also taking over maintainership. Tested by and looks good to landry@
25 lines
755 B
Plaintext
25 lines
755 B
Plaintext
$OpenBSD: patch-lib_Apache_TestServer_pm,v 1.1 2008/04/30 19:25:23 simon Exp $
|
|
--- lib/Apache/TestServer.pm.orig Wed Nov 14 07:44:36 2007
|
|
+++ lib/Apache/TestServer.pm Thu Apr 17 23:08:12 2008
|
|
@@ -164,14 +164,19 @@ sub start_cmd {
|
|
my $config = $self->{config};
|
|
my $vars = $config->{vars};
|
|
my $httpd = $vars->{httpd};
|
|
+ my $chroot = '';
|
|
|
|
my $one_process = $self->{run}->{opts}->{'one-process'}
|
|
? $self->version_of(\%one_process)
|
|
: '';
|
|
|
|
+ if ($self->{rev} == 1 && !$vars->{chroot}) {
|
|
+ $chroot = '-u'
|
|
+ }
|
|
+
|
|
#XXX: threaded mpm does not respond to SIGTERM with -D ONE_PROCESS
|
|
|
|
- return "$httpd $one_process $args";
|
|
+ return "$httpd $chroot $one_process $args";
|
|
}
|
|
|
|
sub default_gdbinit {
|