freebsd-ports/www/apache22/files/patch-support__apxs.in
Jun Kuriyama 4766daabfe - Upgrade to 2.2.16.
Security:	CVE-2010-1452 (mod_{cache,dev} remote DoS),
		CVE-2010-2068 (mod_{proxy_{ajp,http},reqtimeout} related on some platforms)
2010-07-26 01:28:40 +00:00

27 lines
1.3 KiB
Text

--- support/apxs.in.orig 2010-07-26 08:42:53.271215110 +0900
+++ support/apxs.in 2010-07-26 08:43:37.927545200 +0900
@@ -612,7 +612,13 @@
}
} else {
# replace already existing LoadModule line
- $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
+ # Custom FreeBSD mod
+ if ($opt_A) {
+ $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1|s;
+ }
+ else {
+ $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
+ }
}
$lmd =~ m|LoadModule\s+(.+?)_module.*|;
notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
@@ -621,8 +627,7 @@
if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
print FP $content;
close(FP);
- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
+ system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
"rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
} else {
notice("unable to open configuration file");