diff options
-rw-r--r-- | apache2x/mod_httpauth.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; } |