X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d0b5b8bcb412f9f169f2320623bd516afb34413b..eb7da20197f802b1a85127f9949d1c7d94633fee:/IkiWiki/Wrapper.pm diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 4fe2d8111..769540d29 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -49,7 +49,7 @@ sub gen_wrapper () { push @envsave, qw{REMOTE_ADDR QUERY_STRING REQUEST_METHOD REQUEST_URI CONTENT_TYPE CONTENT_LENGTH GATEWAY_INTERFACE HTTP_COOKIE REMOTE_USER HTTPS REDIRECT_STATUS - HTTP_HOST SERVER_PORT HTTPS + HTTP_HOST SERVER_PORT HTTPS HTTP_ACCEPT REDIRECT_URL} if $config{cgi}; my $envsave=""; foreach my $var (@envsave) { @@ -95,7 +95,7 @@ EOF # IKIWIKI_CGILOCK_FD so unlockwiki can close it. $pre_exec=<<"EOF"; lockfd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666); - if (lockfd != -1 && flock(lockfd, LOCK_EX) == 0) { + if (lockfd != -1 && lockf(lockfd, F_LOCK, 0) == 0) { char *fd_s=malloc(8); sprintf(fd_s, "%i", lockfd); setenv("IKIWIKI_CGILOCK_FD", fd_s, 1); @@ -214,7 +214,7 @@ $set_background_command EOF my @cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc'; - push @cc, possibly_foolish_untaint($ENV{CFLAGS}) if exists $ENV{CFLAGS}; + push @cc, split(' ', possibly_foolish_untaint($ENV{CFLAGS})) if exists $ENV{CFLAGS}; if (system(@cc, "$wrapper.c", "-o", "$wrapper.new") != 0) { #translators: The parameter is a C filename. error(sprintf(gettext("failed to compile %s"), "$wrapper.c"));