From 56805d33c1ed477f6839074748bfa373db01c431 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 2 Jul 2008 17:39:04 +0000 Subject: Transfer groups information to sub requests properly. --- apache2x/mod_httpauth.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apache2x/mod_httpauth.c') diff --git a/apache2x/mod_httpauth.c b/apache2x/mod_httpauth.c index 426a83b..f2c76ad 100644 --- a/apache2x/mod_httpauth.c +++ b/apache2x/mod_httpauth.c @@ -1112,6 +1112,17 @@ static int httpauth_authenticate(request_rec* r) if (hreq) { r->user = apr_pstrdup (r->pool, hreq->user); r->ap_auth_type = HTTPAUTH_AUTHTYPE; + + /* Make another request config for this sub request */ + if (mainreq != r) { + groups = hreq->groups ? apr_pstrdup (r->pool, hreq->groups) : 0; + + hreq = (httpauth_request_t*)apr_pcalloc (r->pool, sizeof (*hreq)); + hreq->user = r->user; + hreq->groups = groups; + ap_set_module_config (r->request_config, &httpauth_module, hreq); + } + return OK; } -- cgit v1.2.3