@@ -28,7 +28,7 @@ module AP_MODULE_DECLARE_DATA auth_gssapi_module;
2828
2929APLOG_USE_MODULE (auth_gssapi );
3030
31- static char * mag_status (request_rec * req , int type , uint32_t err )
31+ static char * mag_status (apr_pool_t * pool , int type , uint32_t err )
3232{
3333 uint32_t maj_ret , min_ret ;
3434 gss_buffer_desc text ;
@@ -47,25 +47,25 @@ static char *mag_status(request_rec *req, int type, uint32_t err)
4747
4848 len = text .length ;
4949 if (msg_ret ) {
50- msg_ret = apr_psprintf (req -> pool , "%s, %*s" ,
50+ msg_ret = apr_psprintf (pool , "%s, %*s" ,
5151 msg_ret , len , (char * )text .value );
5252 } else {
53- msg_ret = apr_psprintf (req -> pool , "%*s" , len , (char * )text .value );
53+ msg_ret = apr_psprintf (pool , "%*s" , len , (char * )text .value );
5454 }
5555 gss_release_buffer (& min_ret , & text );
5656 } while (msg_ctx != 0 );
5757
5858 return msg_ret ;
5959}
6060
61- char * mag_error (request_rec * req , const char * msg , uint32_t maj , uint32_t min )
61+ char * mag_error (apr_pool_t * pool , const char * msg , uint32_t maj , uint32_t min )
6262{
6363 char * msg_maj ;
6464 char * msg_min ;
6565
66- msg_maj = mag_status (req , GSS_C_GSS_CODE , maj );
67- msg_min = mag_status (req , GSS_C_MECH_CODE , min );
68- return apr_psprintf (req -> pool , "%s: [%s (%s)]" , msg , msg_maj , msg_min );
66+ msg_maj = mag_status (pool , GSS_C_GSS_CODE , maj );
67+ msg_min = mag_status (pool , GSS_C_MECH_CODE , min );
68+ return apr_psprintf (pool , "%s: [%s (%s)]" , msg , msg_maj , msg_min );
6969}
7070
7171enum mag_err_code {
@@ -98,7 +98,7 @@ static void mag_post_error(request_rec *req, struct mag_config *cfg,
9898 const char * text = NULL ;
9999
100100 if (maj )
101- text = mag_error (req , msg , maj , min );
101+ text = mag_error (req -> pool , msg , maj , min );
102102
103103 if (cfg -> enverrs )
104104 mag_publish_error (req , maj , min , text ? text : msg , mag_err_text (err ));
@@ -288,7 +288,7 @@ static void mag_store_deleg_creds(request_rec *req, const char *ccname,
288288 GSS_C_NULL_OID , 1 , 1 , & store , NULL , NULL );
289289 if (GSS_ERROR (maj )) {
290290 ap_log_rerror (APLOG_MARK , APLOG_ERR , 0 , req , "%s" ,
291- mag_error (req , "failed to store delegated creds" ,
291+ mag_error (req -> pool , "failed to store delegated creds" ,
292292 maj , min ));
293293 }
294294}
@@ -598,7 +598,7 @@ static bool mag_auth_basic(request_rec *req,
598598 if (maj != GSS_S_COMPLETE ) {
599599 ap_log_rerror (APLOG_MARK , APLOG_WARNING , 0 , req ,
600600 "Failed to restore per-thread ccache, %s" ,
601- mag_error (req , "gss_krb5_ccache_name() "
601+ mag_error (req -> pool , "gss_krb5_ccache_name() "
602602 "failed" , maj , min ));
603603 }
604604 }
0 commit comments