ASF Bugzilla – Attachment 29520 Details for
Bug 51194
FcgidWrapper does not support paths containing a space
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to honor quoted FcgidWrapper command and arguments
fcgid-wrapper-argv.patch (text/plain), 2.78 KB, created by
William A. Rowe Jr.
on 2012-10-29 19:13:20 UTC
(
hide
)
Description:
Patch to honor quoted FcgidWrapper command and arguments
Filename:
MIME Type:
Creator:
William A. Rowe Jr.
Created:
2012-10-29 19:13:20 UTC
Size:
2.78 KB
patch
obsolete
>Index: modules/fcgid/fcgid_conf.c >=================================================================== >--- modules/fcgid/fcgid_conf.c (revision 1403453) >+++ modules/fcgid/fcgid_conf.c (working copy) >@@ -831,11 +831,12 @@ > const char *extension, > const char *virtual) > { >- const char *path, *tmp; >+ const char *path; > apr_status_t rv; > apr_finfo_t finfo; > fcgid_cmd_conf *wrapper = NULL; > fcgid_dir_conf *config = (fcgid_dir_conf *) dirconfig; >+ char **args; > > /* Sanity checks */ > >@@ -854,8 +855,9 @@ > return "Invalid wrapper file extension"; > > /* Get wrapper path */ >- tmp = wrapper_cmdline; >- path = ap_getword_white(cmd->temp_pool, &tmp); >+ apr_tokenize_to_argv(wrapper_cmdline, &args, cmd->temp_pool); >+ path = apr_pstrdup(cmd->pool, args[0]); >+ > if (path == NULL || *path == '\0') > return "Invalid wrapper config"; > >Index: modules/fcgid/fcgid_proc_unix.c >=================================================================== >--- modules/fcgid/fcgid_proc_unix.c (revision 1403453) >+++ modules/fcgid/fcgid_proc_unix.c (working copy) >@@ -204,23 +204,11 @@ > char **proc_environ; > struct sockaddr_un unix_addr; > apr_procattr_t *procattr = NULL; >- int argc, len; >- const char *wargv[APACHE_ARG_MAX + 1]; >- const char *word; /* For wrapper */ >- const char *tmp; >+ int len; >+ const char **wargv; > > /* Build wrapper args */ >- argc = 0; >- tmp = cmdline; >- while (1) { >- word = ap_getword_white(procnode->proc_pool, &tmp); >- if (word == NULL || *word == '\0') >- break; >- if (argc >= APACHE_ARG_MAX) >- break; >- wargv[argc++] = word; >- } >- wargv[argc] = NULL; >+ apr_tokenize_to_argv(cmdline, (char ***)&wargv, procnode->proc_pool); > > /* > Create UNIX domain socket before spawn >Index: modules/fcgid/fcgid_proc_win.c >=================================================================== >--- modules/fcgid/fcgid_proc_win.c (revision 1403453) >+++ modules/fcgid/fcgid_proc_win.c (working copy) >@@ -69,22 +69,10 @@ > apr_file_t *file; > const char * const *proc_environ; > char sock_path[FCGID_PATH_MAX]; >- int argc; >- char const * wargv[APACHE_ARG_MAX + 1], *word; /* For wrapper */ >- const char *tmp; >+ const char **wargv; > > /* Build wrapper args */ >- argc = 0; >- tmp = cmdline; >- while (1) { >- word = ap_getword_white(procnode->proc_pool, &tmp); >- if (word == NULL || *word == '\0') >- break; >- if (argc >= APACHE_ARG_MAX) >- break; >- wargv[argc++] = word; >- } >- wargv[argc] = NULL; >+ apr_tokenize_to_argv(cmdline, (char ***)&wargv, procnode->proc_pool); > > memset(&SecurityAttributes, 0, sizeof(SecurityAttributes)); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51194
: 29520