Merge pull request #3170 from matt335672/fix_missing_pre_session_ipaddr

sesman: Copy IP address to pre_session_item struct
This commit is contained in:
matt335672 2024-07-22 09:46:08 +01:00 committed by GitHub
commit 4bfeb668e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -102,6 +102,14 @@ process_sys_login_request(struct pre_session_item *psi)
}
else
{
/*
* Copy the IP address of the requesting user, anticipating a
* successful login. We need this so we can search for a session
* with a matching IP address if required.
*/
g_snprintf(psi->start_ip_addr, sizeof(psi->start_ip_addr),
"%s", ip_addr);
/* Create a sesexec process to handle the login
*
* We won't check for the user being valid here, as this might