]> git.pld-linux.org Git - packages/apache-mod_fcgid.git/blame - apache-mod_fcgid-suexec-path.patch
- updated to 2.3.9
[packages/apache-mod_fcgid.git] / apache-mod_fcgid-suexec-path.patch
CommitLineData
6bc2b7ef 1diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.c mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.c
2--- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.c 2010-11-04 12:43:30.000000000 +0100
3+++ mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.c 2010-12-27 11:20:47.928883235 +0100
4@@ -104,6 +104,7 @@
5 config->busy_timeout = DEFAULT_BUSY_TIMEOUT;
6 config->idle_timeout = DEFAULT_IDLE_TIMEOUT;
7 config->proc_lifetime = DEFAULT_PROC_LIFETIME;
8+ config->suexec_cmd = SUEXEC_BIN;
7e04924f 9
6bc2b7ef 10 return config;
7e04924f 11 }
6bc2b7ef 12@@ -1078,3 +1079,22 @@
7e04924f 13
6bc2b7ef 14 cmdopts->cmdenv = NULL;
7e04924f 15 }
16+
17+const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg)
18+{
19+ server_rec *s = cmd->server;
20+ fcgid_server_conf *config =
21+ ap_get_module_config(s->module_config, &fcgid_module);
22+ config->suexec_cmd = ap_server_root_relative(cmd->pool, arg);
23+ if (!config->suexec_cmd)
24+ return "Invalid SuEXEC command";
25+
26+ return NULL;
27+}
28+
29+const char *get_suexec_cmd(server_rec * s)
30+{
31+ fcgid_server_conf *config =
32+ ap_get_module_config(s->module_config, &fcgid_module);
33+ return config->suexec_cmd;
34+}
6bc2b7ef 35diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.h mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.h
36--- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.h 2010-11-04 13:14:15.000000000 +0100
37+++ mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.h 2010-12-27 11:22:07.160243449 +0100
38@@ -98,6 +98,7 @@
39 int idle_timeout_set;
40 int proc_lifetime;
41 int proc_lifetime_set;
42+ char *suexec_cmd;
7e04924f 43 } fcgid_server_conf;
44
45 typedef struct {
6bc2b7ef 46@@ -225,6 +226,9 @@
47 const char *wrapper, const char *extension, const char* virtual);
48 fcgid_cmd_conf *get_wrapper_info(const char *cgipath, request_rec * r);
7e04924f 49
50+const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg);
51+const char *get_suexec_cmd(server_rec * s);
52+
53 const char *set_authenticator_info(cmd_parms * cmd, void *config,
6bc2b7ef 54 const char *arg);
7e04924f 55 const char *set_authenticator_authoritative(cmd_parms * cmd,
6bc2b7ef 56diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_proc_unix.c mod_fcgid-2.3.6/modules/fcgid/fcgid_proc_unix.c
57--- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_proc_unix.c 2010-06-14 21:39:40.000000000 +0200
58+++ mod_fcgid-2.3.6/modules/fcgid/fcgid_proc_unix.c 2010-12-27 11:32:29.586735705 +0100
59@@ -61,6 +61,7 @@
60 } fcgid_namedpipe_handle;
61
62 static int g_process_counter = 0;
63+static const char *g_suexec_cmd = NULL;
64
65 static apr_status_t ap_unix_create_privileged_process(apr_proc_t *newproc,
66 const char *progname,
67@@ -107,8 +108,8 @@
68 }
69 /* allocate space for 4 new args, the input args, and a null terminator */
70 newargs = apr_palloc(p, sizeof(char *) * (i + 4));
71- newprogname = SUEXEC_BIN;
72- newargs[0] = SUEXEC_BIN;
73+ newprogname = g_suexec_cmd;
74+ newargs[0] = g_suexec_cmd;
75 newargs[1] = execuser;
76 newargs[2] = execgroup;
77 newargs[3] = apr_pstrdup(p, argv0);
78@@ -222,6 +223,9 @@
79 }
80 wargv[argc] = NULL;
81
82+ if (!g_suexec_cmd)
83+ g_suexec_cmd = get_suexec_cmd(procinfo->main_server);
84+
bbb889fd
JR
85 /*
86 Create UNIX domain socket before spawn
6bc2b7ef 87 */
88diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/mod_fcgid.c mod_fcgid-2.3.6/modules/fcgid/mod_fcgid.c
89--- mod_fcgid-2.3.6.orig//modules/fcgid/mod_fcgid.c 2010-10-29 01:53:29.000000000 +0200
90+++ mod_fcgid-2.3.6/modules/fcgid/mod_fcgid.c 2010-12-27 11:36:41.468977537 +0100
91@@ -892,6 +892,9 @@
92 AP_INIT_TAKE123("FcgidWrapper", set_wrapper_config, NULL,
93 RSRC_CONF | ACCESS_CONF | OR_FILEINFO,
94 "The CGI wrapper file an optional URL suffix and an optional flag"),
95+ AP_INIT_TAKE1("FcgidCgiSuexec", set_suexec_cmd, NULL,
96+ RSRC_CONF,
97+ "Path to FastCGI SuEXEC command"),
98 AP_INIT_TAKE1("FcgidZombieScanInterval", set_zombie_scan_interval, NULL,
99 RSRC_CONF,
100 "scan interval for zombie process"),
101@@ -941,6 +944,9 @@
102 AP_INIT_TAKE123("FCGIWrapper", set_wrapper_config, NULL,
103 RSRC_CONF | ACCESS_CONF | OR_FILEINFO,
104 "Deprecated - Use 'FcgidWrapper' instead"),
105+ AP_INIT_TAKE1("FastCgiSuexec", set_suexec_cmd, NULL,
106+ RSRC_CONF,
107+ "Deprecated - Use 'FcgidCgiSuexec' instead"),
108 AP_INIT_TAKE1("IdleScanInterval", set_idle_scan_interval, NULL,
109 RSRC_CONF,
110 "Deprecated - Use 'FcgidIdleScanInterval' instead"),
This page took 0.064067 seconds and 4 git commands to generate.