diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.c mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.c --- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.c 2010-11-04 12:43:30.000000000 +0100 +++ mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.c 2010-12-27 11:20:47.928883235 +0100 @@ -104,6 +104,7 @@ config->busy_timeout = DEFAULT_BUSY_TIMEOUT; config->idle_timeout = DEFAULT_IDLE_TIMEOUT; config->proc_lifetime = DEFAULT_PROC_LIFETIME; + config->suexec_cmd = SUEXEC_BIN; return config; } @@ -1078,3 +1079,22 @@ cmdopts->cmdenv = NULL; } + +const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg) +{ + server_rec *s = cmd->server; + fcgid_server_conf *config = + ap_get_module_config(s->module_config, &fcgid_module); + config->suexec_cmd = ap_server_root_relative(cmd->pool, arg); + if (!config->suexec_cmd) + return "Invalid SuEXEC command"; + + return NULL; +} + +const char *get_suexec_cmd(server_rec * s) +{ + fcgid_server_conf *config = + ap_get_module_config(s->module_config, &fcgid_module); + return config->suexec_cmd; +} diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.h mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.h --- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_conf.h 2010-11-04 13:14:15.000000000 +0100 +++ mod_fcgid-2.3.6/modules/fcgid/fcgid_conf.h 2010-12-27 11:22:07.160243449 +0100 @@ -98,6 +98,7 @@ int idle_timeout_set; int proc_lifetime; int proc_lifetime_set; + char *suexec_cmd; } fcgid_server_conf; typedef struct { @@ -225,6 +226,9 @@ const char *wrapper, const char *extension, const char* virtual); fcgid_cmd_conf *get_wrapper_info(const char *cgipath, request_rec * r); +const char *set_suexec_cmd(cmd_parms * cmd, void *dummy, const char *arg); +const char *get_suexec_cmd(server_rec * s); + const char *set_authenticator_info(cmd_parms * cmd, void *config, const char *arg); const char *set_authenticator_authoritative(cmd_parms * cmd, 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 --- mod_fcgid-2.3.6.orig//modules/fcgid/fcgid_proc_unix.c 2010-06-14 21:39:40.000000000 +0200 +++ mod_fcgid-2.3.6/modules/fcgid/fcgid_proc_unix.c 2010-12-27 11:32:29.586735705 +0100 @@ -61,6 +61,7 @@ } fcgid_namedpipe_handle; static int g_process_counter = 0; +static const char *g_suexec_cmd = NULL; static apr_status_t ap_unix_create_privileged_process(apr_proc_t *newproc, const char *progname, @@ -107,8 +108,8 @@ } /* allocate space for 4 new args, the input args, and a null terminator */ newargs = apr_palloc(p, sizeof(char *) * (i + 4)); - newprogname = SUEXEC_BIN; - newargs[0] = SUEXEC_BIN; + newprogname = g_suexec_cmd; + newargs[0] = g_suexec_cmd; newargs[1] = execuser; newargs[2] = execgroup; newargs[3] = apr_pstrdup(p, argv0); @@ -222,6 +223,9 @@ } wargv[argc] = NULL; + if (!g_suexec_cmd) + g_suexec_cmd = get_suexec_cmd(procinfo->main_server); + /* Create UNIX domain socket before spawn */ diff -ur mod_fcgid-2.3.6.orig//modules/fcgid/mod_fcgid.c mod_fcgid-2.3.6/modules/fcgid/mod_fcgid.c --- mod_fcgid-2.3.6.orig//modules/fcgid/mod_fcgid.c 2010-10-29 01:53:29.000000000 +0200 +++ mod_fcgid-2.3.6/modules/fcgid/mod_fcgid.c 2010-12-27 11:36:41.468977537 +0100 @@ -892,6 +892,9 @@ AP_INIT_TAKE123("FcgidWrapper", set_wrapper_config, NULL, RSRC_CONF | ACCESS_CONF | OR_FILEINFO, "The CGI wrapper file an optional URL suffix and an optional flag"), + AP_INIT_TAKE1("FcgidCgiSuexec", set_suexec_cmd, NULL, + RSRC_CONF, + "Path to FastCGI SuEXEC command"), AP_INIT_TAKE1("FcgidZombieScanInterval", set_zombie_scan_interval, NULL, RSRC_CONF, "scan interval for zombie process"), @@ -941,6 +944,9 @@ AP_INIT_TAKE123("FCGIWrapper", set_wrapper_config, NULL, RSRC_CONF | ACCESS_CONF | OR_FILEINFO, "Deprecated - Use 'FcgidWrapper' instead"), + AP_INIT_TAKE1("FastCgiSuexec", set_suexec_cmd, NULL, + RSRC_CONF, + "Deprecated - Use 'FcgidCgiSuexec' instead"), AP_INIT_TAKE1("IdleScanInterval", set_idle_scan_interval, NULL, RSRC_CONF, "Deprecated - Use 'FcgidIdleScanInterval' instead"),