summaryrefslogtreecommitdiffstats
path: root/src/sessions.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-04-11 17:27:21 -0400
committerSimo Sorce <simo@redhat.com>2015-06-09 18:10:22 -0400
commit8cabd1e6ac6c300f7e603cd61f1a8a7a7da7fb8f (patch)
tree38b8db8751b43751ffd64a75571d897c5fa3cd41 /src/sessions.c
parentabd7c2e0ce5bd17997fb4c05eb2c7453060c0a3a (diff)
downloadmod_auth_gssapi-8cabd1e6ac6c300f7e603cd61f1a8a7a7da7fb8f.tar.gz
mod_auth_gssapi-8cabd1e6ac6c300f7e603cd61f1a8a7a7da7fb8f.tar.xz
mod_auth_gssapi-8cabd1e6ac6c300f7e603cd61f1a8a7a7da7fb8f.zip
Set KRB5CCNAME on follow up requests with session
If the original context establishment delegated credentials, set the KRB5CCNAME variable to the proper file name for follow up connections that uses the session to validate access. Closes #18 Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/sessions.c')
-rw-r--r--src/sessions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sessions.c b/src/sessions.c
index e8c79cd..f90857c 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -153,6 +153,10 @@ void mag_check_session(request_rec *req,
return;
}
+ /* booleans */
+ if (gsessdata->established != 0) mc->established = true;
+ if (gsessdata->delegated != 0) mc->delegated = true;
+
/* get time */
expiration = gsessdata->expiration;
if (expiration < time(NULL)) {
@@ -211,6 +215,8 @@ void mag_attempt_session(request_rec *req,
}
}
+ gsessdata.established = mc->established?1:0;
+ gsessdata.delegated = mc->delegated?1:0;
gsessdata.expiration = mc->expiration;
if (OCTET_STRING_fromString(&gsessdata.username, mc->user_name) != 0)
goto done;