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
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.
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;
}