diff options
author | Robbie Harwood <rharwood@redhat.com> | 2016-07-22 14:23:31 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2016-08-15 14:32:45 -0400 |
commit | 3ef79e28b4996750a07874f80282acc0351ef675 (patch) | |
tree | ce8c14d16a839f39ac13d1e7c592185d4d3050ed | |
parent | 2a0b41c926f56588946ca3d73a851f7ec452d53b (diff) | |
download | mod_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
-rw-r--r-- | src/sessions.c | 7 |
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) { |