]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd-use_bin_sh.patch
- -use_bin_sh.patch is back, no side effects for include_shell anymore
[packages/lighttpd.git] / lighttpd-use_bin_sh.patch
CommitLineData
659671c9
ER
1## Use /bin/sh to execute external programs instead of getting
2## the shell from $SHELL (See ticket #388)
3#
4# http://trac.lighttpd.net/trac/ticket/388
5
6--- lighttpd-1.4.12/src/proc_open.c~ 2006-09-19 15:32:30.253386029 +0300
7+++ lighttpd-1.4.12/src/proc_open.c 2006-09-19 15:33:59.405384132 +0300
8@@ -148,17 +148,9 @@
9 STARTUPINFO si;
10 BOOL procok;
11 SECURITY_ATTRIBUTES security;
12- const char *shell = NULL;
13- const char *windir = NULL;
14+ const char *shell = "/bin/sh";
15 buffer *cmdline;
16
17- if (NULL == (shell = getenv(SHELLENV)) &&
18- NULL == (windir = getenv("SystemRoot")) &&
19- NULL == (windir = getenv("windir"))) {
20- fprintf(stderr, "One of %s,%%SystemRoot,%%windir is required", SHELLENV);
21- return -1;
22- }
23-
24 /* we use this to allow the child to inherit handles */
25 memset(&security, 0, sizeof(security));
26 security.nLength = sizeof(security);
27@@ -180,12 +172,7 @@
28 memset(&pi, 0, sizeof(pi));
29
30 cmdline = buffer_init();
31- if (shell) {
32- buffer_append_string(cmdline, shell);
33- } else {
34- buffer_append_string(cmdline, windir);
35- buffer_append_string(cmdline, "\\system32\\cmd.exe");
36- }
37+ buffer_append_string(cmdline, shell);
38 buffer_append_string_len(cmdline, CONST_STR_LEN(" /c "));
39 buffer_append_string(cmdline, command);
40 procok = CreateProcess(NULL, cmdline->ptr, &security, &security, TRUE,
This page took 0.026786 seconds and 4 git commands to generate.