On 08/03/2012 04:47 PM, Stefan Fritsch wrote:
On Tue, 31 Jul 2012, humbed...@apache.org wrote:
Author: humbedooh
Date: Tue Jul 31 11:47:04 2012
New Revision: 1367504
URL: http://svn.apache.org/viewvc?rev=1367504view=rev
Log:
mod_lua: The current way of getting the authz provider name doesn't
seem to work. This approach should fix that.
Modified:
httpd/httpd/trunk/modules/lua/mod_lua.c
Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1367504r1=1367503r2=1367504view=diff
==
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Tue Jul 31 11:47:04 2012
@@ -1006,8 +1006,7 @@ static const char *lua_authz_parse(cmd_p
const char *provider_name;
lua_authz_provider_spec *spec;
-apr_pool_userdata_get((void**)provider_name,
AUTHZ_PROVIDER_NAME_NOTE,
- cmd-temp_pool);
+provider_name = (const char*) ap_getword(cmd-temp_pool,
cmd-directive-args, ' ');
ap_assert(provider_name != NULL);
spec = apr_hash_get(lua_authz_providers, provider_name,
APR_HASH_KEY_STRING);
Huh? I am very sure that I have tested this. In which configuration did
it not work? And does your code work with negation like Require not foo
bar?
If your change is kept, the corresponding code in mod_authz_core should
be removed, too. And the ap_assert() can't trigger anymore. But I think
passing as pool userdata is preferable.
Sorry, that was my bad. It seems I hadn't checked out the latest version
of the auth core when I tested this, so I was effectively testing
against the 2.4.2 version of it, which is why it failed.
I had planned to write to the list (after I noticed the change) and ask
about whether my fix was something that would normally work, or
whether there was a reason why you had made the change in the auth
module, but I got a bit sidetracked by my attempt to make a server scope
for mod_lua, which made my head hurt a bit.
Feel free to revert my changes if your way is better :)
With regards and apologies,
Daniel.