diff options
author | Stef Walter <stef@memberwebs.com> | 2008-07-02 17:39:04 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-07-02 17:39:04 +0000 |
commit | 56805d33c1ed477f6839074748bfa373db01c431 (patch) | |
tree | 513039cc55293ab6f4fb1f1e51a43e4746701f66 /apache2x | |
parent | a6b7ff3f1082dc1fd19d0b21af9f2bc1cf5cde37 (diff) |
Transfer groups information to sub requests properly.
Diffstat (limited to 'apache2x')
-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; } |