r38106 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38105‎ | r38106 | r38107 >
Date:18:45, 27 July 2008
Author:river
Status:old
Tags:
Comment:
set PHP_FCGI_MAX_REQUESTS to a reasonable value
Modified paths:
  • /trunk/switchboard/swexec.c (modified) (history)

Diff [purge]

Index: trunk/switchboard/swexec.c
@@ -125,7 +125,7 @@
126126
127127 static void clean_env(void)
128128 {
129 - char pathbuf[512];
 129+ char envbuf[512];
130130 char **cleanenv;
131131 char **ep;
132132 int cidx = 0;
@@ -147,9 +147,12 @@
148148 exit(120);
149149 }
150150
151 - sprintf(pathbuf, "PATH=%s", SB_SAFE_PATH);
152 - cleanenv[cidx] = strdup(pathbuf);
 151+ sprintf(envbuf, "PATH=%s", SB_SAFE_PATH);
 152+ cleanenv[cidx] = strdup(envbuf);
153153 cidx++;
 154+ sprintf(envbuf, "PHP_FCGI_MAX_REQUESTS=5000");
 155+ cleanenv[cidx] = strdup(envbuf);
 156+ cidx++;
154157
155158 for (ep = envp; *ep && cidx < SB_ENVBUF-1; ep++) {
156159 for (idx = 0; safe_env_lst[idx]; idx++) {

Status & tagging log