perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkal...@apache.org
Subject svn commit: r1503171 - /perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c
Date Mon, 15 Jul 2013 10:46:22 GMT
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);
         }



Mime
View raw message