Skip to content

Commit bb7c20b

Browse files
committed
Attempt to use sessions only when they are enabled
1 parent 1d9d246 commit bb7c20b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/mod_auth_gssapi.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ static int mag_auth(request_rec *req)
209209
}
210210

211211
/* if available, session always supersedes connection bound data */
212-
mag_check_session(req, cfg, &mc);
212+
if (cfg->use_sessions) {
213+
mag_check_session(req, cfg, &mc);
214+
}
213215

214216
if (mc) {
215217
/* register the context in the memory pool, so it can be freed
@@ -335,7 +337,9 @@ static int mag_auth(request_rec *req)
335337
vtime = MIN_SESS_EXP_TIME;
336338
}
337339
mc->expiration = time(NULL) + vtime;
338-
mag_attempt_session(req, cfg, mc);
340+
if (cfg->use_sessions) {
341+
mag_attempt_session(req, cfg, mc);
342+
}
339343
}
340344

341345
ret = OK;

0 commit comments

Comments
 (0)