sec-mod: expire sessions which are in terminated state

Reported by riteki@gmail.com.
This commit is contained in:
Nikos Mavrogiannopoulos
2015-04-26 16:46:39 +02:00
parent 80e6e46034
commit ea7b975840
+2 -2
View File
@@ -500,7 +500,7 @@ int handle_sec_auth_session_close(int cfd, sec_mod_st *sec, const SecAuthSession
(pack_func) cli_stats_msg__pack);
}
if (e->status != PS_AUTH_COMPLETED) {
if (e->status < PS_AUTH_COMPLETED) {
seclog(sec, LOG_DEBUG, "session close received in unauthenticated client %s "SESSION_STR"!", e->auth_info.username, e->auth_info.psid);
return send_msg(e, cfd, SM_CMD_AUTH_CLI_STATS, &rep,
(pack_size_func) cli_stats_msg__get_packed_size,
@@ -604,7 +604,7 @@ int handle_sec_auth_stats_cmd(sec_mod_st * sec, const CliStatsMsg * req)
e->stats.uptime = req->uptime;
if (req->has_invalidate_cookie && req->invalidate_cookie != 0) {
seclog(sec, LOG_INFO, "invalidating session user '%s' "SESSION_STR,
seclog(sec, LOG_INFO, "invalidating session of user '%s' "SESSION_STR,
e->auth_info.username, e->auth_info.psid);
e->status = PS_AUTH_USER_TERM;
}