summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobbie Harwood <rharwood@redhat.com>2016-07-22 14:23:31 -0400
committerSimo Sorce <simo@redhat.com>2016-08-15 14:32:45 -0400
commit3ef79e28b4996750a07874f80282acc0351ef675 (patch)
treece8c14d16a839f39ac13d1e7c592185d4d3050ed /src
parent2a0b41c926f56588946ca3d73a851f7ec452d53b (diff)
downloadmod_auth_gssapi-3ef79e28b4996750a07874f80282acc0351ef675.tar.gz
mod_auth_gssapi-3ef79e28b4996750a07874f80282acc0351ef675.tar.xz
mod_auth_gssapi-3ef79e28b4996750a07874f80282acc0351ef675.zip
Fix behavior of NULL ccname for cookie creation
This resolves an issue where the session cookie would not be populated when sesions were used but unique ccaches were not. Based on a report from Bhagavan Das. Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com> Closes #98
Diffstat (limited to 'src')
-rw-r--r--src/sessions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sessions.c b/src/sessions.c
index 03efc89..4043496 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -236,8 +236,13 @@ void mag_attempt_session(struct mag_req_cfg *cfg, struct mag_conn *mc)
(const char *)mc->basic_hash.value,
mc->basic_hash.length) != 0)
goto done;
- if (OCTET_STRING_fromString(&gsessdata.ccname, mc->ccname) != 0)
+
+ /* NULL ccname here just means default ccache */
+ if (mc->ccname &&
+ OCTET_STRING_fromString(&gsessdata.ccname, mc->ccname) != 0) {
goto done;
+ }
+
ret = encode_GSSSessionData(req->pool, &gsessdata,
&plainbuf.value, &plainbuf.length);
if (ret == false) {