packages: apache-mod_fcgid/apache-mod_fcgid-suexec-path.patch (NEW) - patch...
hawk
hawk at pld-linux.org
Fri Jun 5 15:31:46 CEST 2009
Author: hawk Date: Fri Jun 5 13:31:46 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- patch to allow setting path to suexec binary, found at
http://www.mail-archive.com/mod-fcgid-users@lists.sourceforge.net/msg00150.html
---- Files affected:
packages/apache-mod_fcgid:
apache-mod_fcgid-suexec-path.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/apache-mod_fcgid/apache-mod_fcgid-suexec-path.patch
diff -u /dev/null packages/apache-mod_fcgid/apache-mod_fcgid-suexec-path.patch:1.1
--- /dev/null Fri Jun 5 15:31:46 2009
+++ packages/apache-mod_fcgid/apache-mod_fcgid-suexec-path.patch Fri Jun 5 15:31:41 2009
@@ -0,0 +1,98 @@
+diff -ur mod_fcgid.2.2.orig/arch/unix/fcgid_proc_unix.c mod_fcgid.2.2/arch/unix/fcgid_proc_unix.c
+--- mod_fcgid.2.2.orig/arch/unix/fcgid_proc_unix.c 2007-07-31 11:09:19.000000000 +0200
++++ mod_fcgid.2.2/arch/unix/fcgid_proc_unix.c 2009-06-05 15:01:05.000000000 +0200
+@@ -30,6 +30,7 @@
+ static int g_process_counter = 0;
+ static apr_pool_t *g_inode_cginame_map = NULL;
+ static const char *g_socket_dir = NULL;
++static const char *g_suexec_cmd = NULL;
+
+ static apr_status_t ap_unix_create_privileged_process(apr_proc_t * newproc,
+ const char *progname,
+@@ -79,8 +80,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);
+@@ -179,6 +180,8 @@
+ procinfo->main_server->process->pconf);
+ }
+
++ if (!g_suexec_cmd)
++ g_suexec_cmd = get_suexec_cmd(procinfo->main_server);
+ if (!g_socket_dir)
+ g_socket_dir = get_socketpath(procinfo->main_server);
+ if (!g_inode_cginame_map || !g_socket_dir) {
+diff -ur mod_fcgid.2.2.orig/fcgid_conf.c mod_fcgid.2.2/fcgid_conf.c
+--- mod_fcgid.2.2.orig/fcgid_conf.c 2007-07-31 11:09:20.000000000 +0200
++++ mod_fcgid.2.2/fcgid_conf.c 2009-06-05 15:03:19.000000000 +0200
+@@ -61,6 +61,7 @@
+ config->max_requests_per_process = DEFAULT_MAX_REQUESTS_PER_PROCESS;
+ config->max_request_len = DEFAULT_MAX_REQUEST_LEN;
+ config->max_mem_request_len = DEFAULT_MAX_MEM_REQUEST_LEN;
++ config->suexec_cmd = SUEXEC_BIN;
+ }
+
+ void *create_fcgid_server_config(apr_pool_t * p, server_rec * s)
+@@ -846,3 +847,22 @@
+
+ return 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.2.orig/fcgid_conf.h mod_fcgid.2.2/fcgid_conf.h
+--- mod_fcgid.2.2.orig/fcgid_conf.h 2007-07-31 11:09:22.000000000 +0200
++++ mod_fcgid.2.2/fcgid_conf.h 2009-06-05 15:03:51.000000000 +0200
+@@ -43,6 +43,7 @@
+ int ipc_comm_timeout;
+ int busy_timeout;
+ int php_fix_pathinfo_enable;
++ char *suexec_cmd;
+ } fcgid_server_conf;
+
+ typedef struct {
+@@ -160,6 +161,9 @@
+ const char *wrapper, const char *extension);
+ fcgid_wrapper_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.2.orig/mod_fcgid.c mod_fcgid.2.2/mod_fcgid.c
+--- mod_fcgid.2.2.orig/mod_fcgid.c 2007-07-31 11:09:22.000000000 +0200
++++ mod_fcgid.2.2/mod_fcgid.c 2009-06-05 15:06:51.000000000 +0200
+@@ -594,6 +594,8 @@
+ AP_INIT_TAKE12("FCGIWrapper", set_wrapper_config, NULL,
+ RSRC_CONF | ACCESS_CONF | OR_FILEINFO,
+ "The CGI wrapper setting"),
++ AP_INIT_TAKE1("FastCgiSuexec", set_suexec_cmd, NULL, RSRC_CONF,
++ "Path to FastCGI SuEXEC command"),
+ AP_INIT_TAKE1("PHP_Fix_Pathinfo_Enable",
+ set_php_fix_pathinfo_enable,
+ NULL, RSRC_CONF,
================================================================
More information about the pld-cvs-commit
mailing list