Petr Gajdos
02a733cd83
- modified patches % apache2-mod_proxy_uwsgi-fix-crash.patch (refreshed) - modified sources % apache2-loadmodule.conf % apache2-manual.conf % apache2-script-helpers % apache2@.service % sysconfig.apache2 - deleted patches - deprecated-scripts-arch.patch (not needed) - httpd-2.0.54-envvars.dif (not needed) - httpd-2.1.3alpha-layout.dif (renamed to apache2-system-dirs-layout.patch) - httpd-2.2.0-apxs-a2enmod.dif (not needed) - httpd-2.4.9-bnc690734.patch (renamed to apache2-LimitRequestFieldSize-limits-headers.patch) - httpd-2.4.x-fate317766-config-control-two-protocol-options.diff (renamed to apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch) - httpd-2.x.x-logresolve.patch (renamed to apache2-logresolve-tmp-security.patch) - httpd-apachectl.patch (renamed to apache2-apachectl.patch) - httpd-implicit-pointer-decl.patch (not needed) - httpd-visibility.patch (not needed) - deleted sources - SUSE-NOTICE (outdated) - a2enflag (renamed to apache2-a2enflag) - a2enmod (renamed to apache2-a2enmod) - apache-22-24-upgrade (outdated) OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=624
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
--- httpd-2.4.6.orig/support/logresolve.pl.in
|
|
+++ httpd-2.4.6/support/logresolve.pl.in
|
|
@@ -57,6 +57,7 @@ $|=1;
|
|
|
|
use FileHandle;
|
|
use Socket;
|
|
+use File::Temp;
|
|
|
|
use strict;
|
|
no strict 'refs';
|
|
@@ -71,11 +72,13 @@ my $filename;
|
|
my %hash = ();
|
|
my $parent = $$;
|
|
|
|
+my $tempdir = File::Temp::tempdir("logresolve.pl.sockets.XXXXXX", CLEANUP => 1);
|
|
+
|
|
my @children = ();
|
|
for (my $child = 1; $child <=$CHILDREN; $child++) {
|
|
my $f = fork();
|
|
if (!$f) {
|
|
- $filename = "./.socket.$parent.$child";
|
|
+ $filename = "$tempdir/socket.$parent.$child";
|
|
if (-e $filename) { unlink($filename) || warn "$filename .. $!\n";}
|
|
&child($child);
|
|
exit(0);
|
|
@@ -91,9 +94,9 @@ sub cleanup {
|
|
# die kiddies, die
|
|
kill(15, @children);
|
|
for (my $child = 1; $child <=$CHILDREN; $child++) {
|
|
- if (-e "./.socket.$parent.$child") {
|
|
- unlink("./.socket.$parent.$child")
|
|
- || warn ".socket.$parent.$child $!";
|
|
+ if (-e "$tempdir/socket.$parent.$child") {
|
|
+ unlink("$tempdir/socket.$parent.$child")
|
|
+ || warn "$tempdir/socket.$parent.$child $!";
|
|
}
|
|
}
|
|
}
|
|
@@ -113,7 +116,7 @@ sub parent {
|
|
if (!socket($CHILDSOCK{$child}, AF_UNIX, SOCK_STREAM, $PROTOCOL)) {
|
|
warn "parent socket to child failed $!";
|
|
}
|
|
- $filename = "./.socket.$parent.$child";
|
|
+ $filename = "$tempdir/socket.$parent.$child";
|
|
my $response;
|
|
do {
|
|
$response = connect($CHILDSOCK{$child}, sockaddr_un($filename));
|
|
@@ -176,7 +179,7 @@ sub child {
|
|
# create a socket to communicate with parent
|
|
socket(INBOUND, AF_UNIX, SOCK_STREAM, $PROTOCOL)
|
|
|| die "Error with Socket: !$\n";
|
|
- $filename = "./.socket.$parent.$me";
|
|
+ $filename = "$tempdir/socket.$parent.$me";
|
|
bind(INBOUND, sockaddr_un($filename))
|
|
|| die "Error Binding $filename: $!\n";
|
|
listen(INBOUND, 5) || die "Error Listening: $!\n";
|