httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1411530 - /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
Date Tue, 20 Nov 2012 04:25:37 GMT
Author: wrowe
Date: Tue Nov 20 04:25:36 2012
New Revision: 1411530

URL: http://svn.apache.org/viewvc?rev=1411530&view=rev
Log:
Would be good to have some +1 confirmation of the attached patch.
While it compiles, I don't have a reproduction/test case for the
Fcgid[Authenticator|Authorizor|Access] commands, but the code had
been validated for FcgidWrapper.

Modifies the behavior of Fcgid AAA directives to follow the file
test pattern of FcgidWrapper and respect embedded command line 
quotes, as documented.


Modified:
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c?rev=1411530&r1=1411529&r2=1411530&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c Tue Nov 20 04:25:36 2012
@@ -621,9 +621,17 @@ const char *set_authenticator_info(cmd_p
     apr_status_t rv;
     apr_finfo_t finfo;
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    const char *path;
+    char **args;
+
+    /* Get wrapper path */
+    apr_tokenize_to_argv(authenticator, &args, cmd->temp_pool);
+
+    if (*args == NULL || **args == '\0')
+        return "Invalid authenticator config";
 
     /* Fetch only required file details inode + device */
-    if ((rv = apr_stat(&finfo, authenticator, APR_FINFO_IDENT,
+    if ((rv = apr_stat(&finfo, args[0], APR_FINFO_IDENT,
                        cmd->temp_pool)) != APR_SUCCESS) {
         return missing_file_msg(cmd->pool, "Authenticator", authenticator, rv);
     }
@@ -632,10 +640,8 @@ const char *set_authenticator_info(cmd_p
     dirconfig->authenticator_info =
         apr_pcalloc(cmd->server->process->pconf,
                     sizeof(*dirconfig->authenticator_info));
-    dirconfig->authenticator_info->cgipath =
-        apr_pstrdup(cmd->pool, authenticator);
-    dirconfig->authenticator_info->cmdline =
-        dirconfig->authenticator_info->cgipath;
+    dirconfig->authenticator_info->cgipath = apr_pstrdup(cmd->pool, args[0]);
+    dirconfig->authenticator_info->cmdline = authenticator;
     dirconfig->authenticator_info->inode = finfo.inode;
     dirconfig->authenticator_info->deviceid = finfo.device;
     return NULL;
@@ -670,9 +676,17 @@ const char *set_authorizer_info(cmd_parm
     apr_status_t rv;
     apr_finfo_t finfo;
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    const char *path;
+    char **args;
+
+    /* Get wrapper path */
+    apr_tokenize_to_argv(authorizer, &args, cmd->temp_pool);
+
+    if (*args == NULL || **args == '\0')
+        return "Invalid authorizer config";
 
     /* Fetch only required file details inode + device */
-    if ((rv = apr_stat(&finfo, authorizer, APR_FINFO_IDENT,
+    if ((rv = apr_stat(&finfo, args[0], APR_FINFO_IDENT,
                        cmd->temp_pool)) != APR_SUCCESS) {
         return missing_file_msg(cmd->pool, "Authorizer", authorizer, rv);
     }
@@ -681,10 +695,8 @@ const char *set_authorizer_info(cmd_parm
     dirconfig->authorizer_info =
         apr_pcalloc(cmd->server->process->pconf,
                     sizeof(*dirconfig->authorizer_info));
-    dirconfig->authorizer_info->cgipath =
-        apr_pstrdup(cmd->pool, authorizer);
-    dirconfig->authorizer_info->cmdline =
-        dirconfig->authorizer_info->cgipath;
+    dirconfig->authorizer_info->cgipath = apr_pstrdup(cmd->pool, args[0]);
+    dirconfig->authorizer_info->cmdline = authorizer;
     dirconfig->authorizer_info->inode = finfo.inode;
     dirconfig->authorizer_info->deviceid = finfo.device;
     return NULL;
@@ -719,9 +731,17 @@ const char *set_access_info(cmd_parms * 
     apr_status_t rv;
     apr_finfo_t finfo;
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    const char *path;
+    char **args;
+
+    /* Get wrapper path */
+    apr_tokenize_to_argv(access, &args, cmd->temp_pool);
+
+    if (*args == NULL || **args == '\0')
+        return "Invalid access config";
 
     /* Fetch only required file details inode + device */
-    if ((rv = apr_stat(&finfo, access, APR_FINFO_IDENT,
+    if ((rv = apr_stat(&finfo, args[0], APR_FINFO_IDENT,
                        cmd->temp_pool)) != APR_SUCCESS) {
         return missing_file_msg(cmd->pool, "Access checker", access, rv);
     }
@@ -730,10 +750,8 @@ const char *set_access_info(cmd_parms * 
     dirconfig->access_info =
         apr_pcalloc(cmd->server->process->pconf,
                     sizeof(*dirconfig->access_info));
-    dirconfig->access_info->cgipath =
-        apr_pstrdup(cmd->pool, access);
-    dirconfig->access_info->cmdline =
-        dirconfig->access_info->cgipath;
+    dirconfig->access_info->cgipath = apr_pstrdup(cmd->pool, args[0]);
+    dirconfig->access_info->cmdline = access;
     dirconfig->access_info->inode = finfo.inode;
     dirconfig->access_info->deviceid = finfo.device;
     return NULL;



Mime
View raw message