1 diff -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
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;
12 @@ -1078,3 +1079,22 @@
14 cmdopts->cmdenv = NULL;
17 +const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg)
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";
29 +const char *get_suexec_cmd(server_rec * s)
31 + fcgid_server_conf *config =
32 + ap_get_module_config(s->module_config, &fcgid_module);
33 + return config->suexec_cmd;
35 diff -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
41 int proc_lifetime_set;
47 const char *wrapper, const char *extension, const char* virtual);
48 fcgid_cmd_conf *get_wrapper_info(const char *cgipath, request_rec * r);
50 +const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg);
51 +const char *get_suexec_cmd(server_rec * s);
53 const char *set_authenticator_info(cmd_parms * cmd, void *config,
55 const char *set_authenticator_authoritative(cmd_parms * cmd,
56 diff -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
60 } fcgid_namedpipe_handle;
62 static int g_process_counter = 0;
63 +static const char *g_suexec_cmd = NULL;
65 static apr_status_t ap_unix_create_privileged_process(apr_proc_t *newproc,
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);
83 + g_suexec_cmd = get_suexec_cmd(procinfo->main_server);
86 Create UNIX domain socket before spawn
88 diff -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
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,
97 + "Path to FastCGI SuEXEC command"),
98 AP_INIT_TAKE1("FcgidZombieScanInterval", set_zombie_scan_interval, NULL,
100 "scan interval for zombie process"),
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,
107 + "Deprecated - Use 'FcgidCgiSuexec' instead"),
108 AP_INIT_TAKE1("IdleScanInterval", set_idle_scan_interval, NULL,
110 "Deprecated - Use 'FcgidIdleScanInterval' instead"),