[mod_cgi] issue trace and exit if execve() fails (closes #2302)

(replace SEGFAULT if execve() fails)

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3079 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/heads/lighttpd-1.4.x
Glenn Strauss 7 years ago committed by Stefan Bühler
parent 36a266ec29
commit f23a24a263
  1. 1
      NEWS
  2. 9
      src/mod_cgi.c

@ -11,6 +11,7 @@ NEWS
* [mod_cgi] use MAP_PRIVATE to mmap temporary file (fixes #2715)
* [core] do not send SIGHUP to process group unless server.max-workers is used (fixes #2711)
* [mod_cgi] edge case chdir "/" when docroot "/" (fixes #2460)
* [mod_cgi] issue trace and exit if execve() fails (closes #2302)
- 1.4.39 - 2016-01-02
* [core] fix memset_s call (fixes #2698)

@ -1095,11 +1095,10 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
/* exec the cgi */
execve(args[0], args, env.ptr);
/* log_error_write(srv, __FILE__, __LINE__, "sss", "CGI failed:", strerror(errno), args[0]); */
/* */
SEGFAULT();
break;
/* most log files may have been closed/redirected by this point,
* though stderr might still point to lighttpd.breakage.log */
perror(args[0]);
_exit(1);
}
case -1:
/* error */

Loading…
Cancel
Save