From 0594dcc07ccbd43d1bcd17ec968080883ec3c5fd Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 2 Aug 2012 13:08:05 +0000 Subject: [PATCH] Merge r1351016 from trunk: pass the provider name to parse_require_line as pool userdata This allows a single C function to implement several authz providers. Submitted by: sf Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1368451 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 6 ------ modules/aaa/mod_authz_core.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/STATUS b/STATUS index 8bfae3be6f..255e5b9d79 100644 --- a/STATUS +++ b/STATUS @@ -88,12 +88,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * authz: pass the provider name to parse_require_line as pool userdata - This allows a single C function to implement several authz providers. - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1351016 - 2.4.x patch: Trunk patch applies. - +1: rjung, sf, jim - * event: Simplify handling of MaxConnectionsPerChild. trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1361766 2.4.x patch: Trunk patch applies. diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index fee4b3dba4..d87928254c 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -413,8 +413,14 @@ static const char *add_authz_provider(cmd_parms *cmd, void *config, section->limited = cmd->limited; if (section->provider->parse_require_line) { - const char *err = section->provider->parse_require_line(cmd, args, - §ion->provider_parsed_args); + const char *err; + apr_pool_userdata_setn(section->provider_name, + AUTHZ_PROVIDER_NAME_NOTE, + apr_pool_cleanup_null, + cmd->temp_pool); + err = section->provider->parse_require_line(cmd, args, + §ion->provider_parsed_args); + if (err) return err; } -- 2.40.0