summaryrefslogtreecommitdiffstats
path: root/auth_mellon_cache.c
diff options
context:
space:
mode:
authormanu@netbsd.org <manu@netbsd.org@a716ebb1-153a-0410-b759-cfb97c6a1b53>2009-05-25 20:48:46 +0000
committermanu@netbsd.org <manu@netbsd.org@a716ebb1-153a-0410-b759-cfb97c6a1b53>2009-05-25 20:48:46 +0000
commit4efd2ad895795b7a61d70da76e32fac5d319e2c1 (patch)
treea9df6a95ae637094cb8ad61f2ab2c13e9967adb6 /auth_mellon_cache.c
parent1803631503fca57e7f173bdd824c6da47a2db33f (diff)
downloadmod_auth_mellon-4efd2ad895795b7a61d70da76e32fac5d319e2c1.tar.gz
mod_auth_mellon-4efd2ad895795b7a61d70da76e32fac5d319e2c1.tar.xz
mod_auth_mellon-4efd2ad895795b7a61d70da76e32fac5d319e2c1.zip
Add MellonSessionDump option, to make the session available in the environment
git-svn-id: https://modmellon.googlecode.com/svn/trunk@50 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_cache.c')
-rw-r--r--auth_mellon_cache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/auth_mellon_cache.c b/auth_mellon_cache.c
index 058e278..fbb1173 100644
--- a/auth_mellon_cache.c
+++ b/auth_mellon_cache.c
@@ -434,6 +434,19 @@ void am_cache_env_populate(request_rec *r, am_cache_entry_t *t)
/* Increase the count. */
++(*count);
}
+
+ /* Populate with the assertion? */
+ if (d->dump_session) {
+ char *session;
+ int srclen, dstlen;
+
+ srclen = strlen(t->lasso_session);
+ dstlen = apr_base64_encode_len(srclen);
+
+ session = apr_palloc(r->pool, dstlen);
+ (void)apr_base64_encode(session, t->lasso_session, srclen);
+ apr_table_set(r->subprocess_env, "MELLON_SESSION", session);
+ }
}