Return-Path: X-Original-To: apmail-perl-modperl-cvs-archive@www.apache.org Delivered-To: apmail-perl-modperl-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 33041104BE for ; Mon, 15 Jul 2013 10:46:48 +0000 (UTC) Received: (qmail 48142 invoked by uid 500); 15 Jul 2013 10:46:48 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 48079 invoked by uid 500); 15 Jul 2013 10:46:46 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@perl.apache.org List-Id: Delivered-To: mailing list modperl-cvs@perl.apache.org Received: (qmail 48070 invoked by uid 99); 15 Jul 2013 10:46:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 10:46:45 +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; Mon, 15 Jul 2013 10:46:43 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 295E12388900; Mon, 15 Jul 2013 10:46:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1503171 - /perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c Date: Mon, 15 Jul 2013 10:46:22 -0000 To: modperl-cvs@perl.apache.org From: jkaluza@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130715104622.295E12388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jkaluza Date: Mon Jul 15 10:46:21 2013 New Revision: 1503171 URL: http://svn.apache.org/r1503171 Log: Use 'const char *' instead of 'char *' in modperl_util.c, do not try to get interp_pool in perl_parse_require_line if we don't have the proper key for this require line in global_authz_providers. Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c?rev=1503171&r1=1503170&r2=1503171&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c (original) +++ perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c Mon Jul 15 10:46:21 2013 @@ -938,7 +938,7 @@ static authz_status perl_check_authoriza authz_status ret = AUTHZ_DENIED; int count; AV *args = Nullav; - char *key; + const char *key; auth_callback *ab; MP_dTHX; dSP; @@ -994,10 +994,7 @@ static const char *perl_parse_require_li int count; void *key; auth_callback *ab; - modperl_interp_t *interp = modperl_interp_pool_select(cmd->server->process->pool, - cmd->server); - dTHXa(interp->perl); - dSP; + modperl_interp_t *interp = NULL; if (global_authz_providers == NULL) { return ret; @@ -1009,6 +1006,9 @@ static const char *perl_parse_require_li return ret; } + modperl_interp_pool_select(cmd->server->process->pool, cmd->server); + dTHXa(interp->perl); + dSP; ENTER; SAVETMPS; PUSHMARK(SP); @@ -1040,7 +1040,7 @@ static authn_status perl_check_password( authn_status ret = AUTH_DENIED; int count; AV *args = Nullav; - char *key; + const char *key; auth_callback *ab; MP_dTHX; dSP; @@ -1096,7 +1096,7 @@ static authn_status perl_get_realm_hash( authn_status ret = AUTH_USER_NOT_FOUND; int count; SV *rh; - char *key; + const char *key; auth_callback *ab; MP_dTHX; dSP; @@ -1124,9 +1124,8 @@ static authn_status perl_get_realm_hash( SPAGAIN; if (count == 1) { - char *tmp; + const char *tmp = SvPV_nolen(rh); ret = (authn_status) POPi; - *tmp = SvPV_nolen(rh); if (*tmp != '\0') { *rethash = apr_pstrdup(r->pool, tmp); }