Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 74260D85B for ; Tue, 20 Nov 2012 04:26:04 +0000 (UTC) Received: (qmail 84722 invoked by uid 500); 20 Nov 2012 04:26:03 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 84481 invoked by uid 500); 20 Nov 2012 04:26:02 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 84454 invoked by uid 99); 20 Nov 2012 04:26:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2012 04:26:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2012 04:25:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C5D8423888E4; Tue, 20 Nov 2012 04:25:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1411530 - /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c Date: Tue, 20 Nov 2012 04:25:37 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121120042537.C5D8423888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;