mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-06 14:56:59 +08:00
sec-mod: terminate a client session immediately only if there is a single user
This commit is contained in:
@@ -548,7 +548,7 @@ int handle_sec_auth_session_close(int cfd, sec_mod_st *sec, const SecAuthSession
|
||||
memset(&e->stats, 0, sizeof(e->stats));
|
||||
expire_client_entry(sec, e);
|
||||
|
||||
if (e->discon_reason == REASON_USER_DISCONNECT || e->discon_reason == REASON_SERVER_DISCONNECT) {
|
||||
if (e->in_use == 0 && (e->discon_reason == REASON_USER_DISCONNECT || e->discon_reason == REASON_SERVER_DISCONNECT)) {
|
||||
seclog(sec, LOG_INFO, "invalidating session of user '%s' "SESSION_STR,
|
||||
e->auth_info.username, e->auth_info.psid);
|
||||
/* immediately disconnect the user */
|
||||
|
||||
Reference in New Issue
Block a user