Skip to content

Commit 3ef79e2

Browse files
frozencemeterysimo5
authored andcommitted
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
1 parent 2a0b41c commit 3ef79e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sessions.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,13 @@ void mag_attempt_session(struct mag_req_cfg *cfg, struct mag_conn *mc)
236236
(const char *)mc->basic_hash.value,
237237
mc->basic_hash.length) != 0)
238238
goto done;
239-
if (OCTET_STRING_fromString(&gsessdata.ccname, mc->ccname) != 0)
239+
240+
/* NULL ccname here just means default ccache */
241+
if (mc->ccname &&
242+
OCTET_STRING_fromString(&gsessdata.ccname, mc->ccname) != 0) {
240243
goto done;
244+
}
245+
241246
ret = encode_GSSSessionData(req->pool, &gsessdata,
242247
&plainbuf.value, &plainbuf.length);
243248
if (ret == false) {

0 commit comments

Comments
 (0)