@@ -938,20 +938,21 @@ static authz_status perl_check_authorization(request_rec *r,
938938    authz_status  ret  =  AUTHZ_DENIED ;
939939    int  count ;
940940    AV  * args  =  Nullav ;
941+     char  * key ;
942+     auth_callback  * ab ;
943+     MP_dTHX ;
944+     dSP ;
941945
942946    if  (global_authz_providers  ==  NULL ) {
943947        return  ret ;
944948    }
945949
946-     const  char  * key  =  apr_table_get (r -> notes , AUTHZ_PROVIDER_NAME_NOTE );
947-     auth_callback  * ab  =  apr_hash_get (global_authz_providers , key ,
948-                                      APR_HASH_KEY_STRING );
950+     key  =  apr_table_get (r -> notes , AUTHZ_PROVIDER_NAME_NOTE );
951+     ab  =  apr_hash_get (global_authz_providers , key , APR_HASH_KEY_STRING );
949952    if  (ab  ==  NULL ) {
950953        return  ret ;
951954    }
952955
953-     MP_dTHX ;
954- 
955956    if  (ab -> cb1  ==  NULL ) {
956957        if  (ab -> cb1_handler  ==  NULL ) {
957958            return  ret ;
@@ -965,7 +966,6 @@ static authz_status perl_check_authorization(request_rec *r,
965966        return  ret ;
966967    }
967968
968-     dSP ;
969969    ENTER ;
970970    SAVETMPS ;
971971    PUSHMARK (SP );
@@ -992,23 +992,23 @@ static const char *perl_parse_require_line(cmd_parms *cmd,
992992    SV  * ret_sv ;
993993    char  * ret  =  NULL ;
994994    int  count ;
995+     void  * key ;
996+     auth_callback  * ab ;
997+     modperl_interp_t  * interp  =  modperl_interp_pool_select (cmd -> server -> process -> pool ,
998+                                                           cmd -> server );
999+     dTHXa (interp -> perl );
1000+     dSP ;
9951001
9961002    if  (global_authz_providers  ==  NULL ) {
9971003        return  ret ;
9981004    }
9991005
1000-     void  * key ;
10011006    apr_pool_userdata_get (& key , AUTHZ_PROVIDER_NAME_NOTE , cmd -> temp_pool );
1002-     auth_callback  * ab  =  apr_hash_get (global_authz_providers , (char  * ) key ,
1003-                                      APR_HASH_KEY_STRING );
1007+     ab  =  apr_hash_get (global_authz_providers , (char  * ) key , APR_HASH_KEY_STRING );
10041008    if  (ab  ==  NULL  ||  ab -> cb2  ==  NULL ) {
10051009        return  ret ;
10061010    }
10071011
1008-     modperl_interp_t  * interp  =  modperl_interp_pool_select (cmd -> server -> process -> pool ,
1009-                                                           cmd -> server );
1010-     dTHXa (interp -> perl );
1011-     dSP ;
10121012    ENTER ;
10131013    SAVETMPS ;
10141014    PUSHMARK (SP );
@@ -1040,20 +1040,22 @@ static authn_status perl_check_password(request_rec *r, const char *user,
10401040    authn_status  ret  =  AUTH_DENIED ;
10411041    int  count ;
10421042    AV  * args  =  Nullav ;
1043+     char  * key ;
1044+     auth_callback  * ab ;
1045+     MP_dTHX ;
1046+     dSP ;
10431047
10441048    if  (global_authn_providers  ==  NULL ) {
10451049        return  ret ;
10461050    }
10471051
1048-     const   char   * key  =  apr_table_get (r -> notes , AUTHN_PROVIDER_NAME_NOTE );
1049-     auth_callback   * ab  =  apr_hash_get (global_authn_providers , key ,
1052+     key  =  apr_table_get (r -> notes , AUTHN_PROVIDER_NAME_NOTE );
1053+     ab  =  apr_hash_get (global_authn_providers , key ,
10501054                                     APR_HASH_KEY_STRING );
10511055    if  (ab  ==  NULL  ||  ab -> cb1 ) {
10521056        return  ret ;
10531057    }
10541058
1055-     MP_dTHX ;
1056- 
10571059    if  (ab -> cb1  ==  NULL ) {
10581060        if  (ab -> cb1_handler  ==  NULL ) {
10591061            return  ret ;
@@ -1068,7 +1070,6 @@ static authn_status perl_check_password(request_rec *r, const char *user,
10681070        return  ret ;
10691071    }
10701072
1071-     dSP ;
10721073    ENTER ;
10731074    SAVETMPS ;
10741075    PUSHMARK (SP );
@@ -1095,21 +1096,22 @@ static authn_status perl_get_realm_hash(request_rec *r, const char *user,
10951096    authn_status  ret  =  AUTH_USER_NOT_FOUND ;
10961097    int  count ;
10971098    SV  * rh ;
1099+     char  * key ;
1100+     auth_callback  * ab ;
1101+     MP_dTHX ;
1102+     dSP ;
10981103
10991104    if  (global_authn_providers  ==  NULL ) {
11001105        return  ret ;
11011106    }
11021107
1103-     const  char  * key  =  apr_table_get (r -> notes , AUTHN_PROVIDER_NAME_NOTE );
1104-     auth_callback  * ab  =  apr_hash_get (global_authn_providers , key ,
1105-                                      APR_HASH_KEY_STRING );
1108+     key  =  apr_table_get (r -> notes , AUTHN_PROVIDER_NAME_NOTE );
1109+     ab  =  apr_hash_get (global_authn_providers , key , APR_HASH_KEY_STRING );
11061110    if  (ab  ==  NULL  ||  ab -> cb2 ) {
11071111        return  ret ;
11081112    }
11091113
1110-     MP_dTHX ;
11111114    rh  =  sv_2mortal (newSVpv ("" , 0 ));
1112-     dSP ;
11131115    ENTER ;
11141116    SAVETMPS ;
11151117    PUSHMARK (SP );
@@ -1122,8 +1124,9 @@ static authn_status perl_get_realm_hash(request_rec *r, const char *user,
11221124    SPAGAIN ;
11231125
11241126    if  (count  ==  1 ) {
1127+         char  * tmp ;
11251128        ret  =  (authn_status ) POPi ;
1126-         char   * tmp  =  SvPV_nolen (rh );
1129+         * tmp  =  SvPV_nolen (rh );
11271130        if  (* tmp  !=  '\0' ) {
11281131            * rethash  =  apr_pstrdup (r -> pool , tmp );
11291132        }
0 commit comments