Unify connection fields for the connected client
The connected client is currently described in two places in the xrdp_client_info structure:- 1) In the connection_description field. This was introduced as field client_ip by commitd797b2cf49for xrdp v0.6.0 2) In the client_addr and client_port fields introduced by commit25369460a1for xrdp v0.8.0 This commit unifies these two sets of fields into a single set of fields describing the connection IP and port (for AF_INET/AF_INET6 connections only) and a connection description for all connection types. The code in os_calls to provide client logging has been simplified somewhat which should make it easier to add new connection types (e.g. AF_VSOCK). The old connection_description field used to be passed to sesman to inform sesman of the IP address of the client, and also to provide a string for 'C' field session policy matching. 'C' field session policy matching does not actually need this string (see #2239), and so now only the IP field is passed to sesman.
This commit is contained in:
@@ -268,10 +268,9 @@ lxrdp_connect(struct mod *mod)
|
||||
}
|
||||
#endif
|
||||
LOG(LOG_LEVEL_ERROR, "NeutrinoRDP proxy connection: status [Failed],"
|
||||
" RDP client [%s:%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" RDP client [%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" xrdp pamusername [%s], xrdp process id [%d]",
|
||||
mod->client_info.client_addr,
|
||||
mod->client_info.client_port,
|
||||
mod->client_info.client_description,
|
||||
mod->inst->settings->hostname,
|
||||
mod->inst->settings->port,
|
||||
mod->inst->settings->username,
|
||||
@@ -282,10 +281,9 @@ lxrdp_connect(struct mod *mod)
|
||||
else
|
||||
{
|
||||
LOG(LOG_LEVEL_INFO, "NeutrinoRDP proxy connection: status [Success],"
|
||||
" RDP client [%s:%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" RDP client [%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" xrdp pamusername [%s], xrdp process id [%d]",
|
||||
mod->client_info.client_addr,
|
||||
mod->client_info.client_port,
|
||||
mod->client_info.client_description,
|
||||
mod->inst->settings->hostname,
|
||||
mod->inst->settings->port,
|
||||
mod->inst->settings->username,
|
||||
@@ -531,10 +529,9 @@ lxrdp_end(struct mod *mod)
|
||||
|
||||
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_end:");
|
||||
LOG(LOG_LEVEL_INFO, "NeutrinoRDP proxy connection: status [Disconnect],"
|
||||
" RDP client [%s:%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" RDP client [%s], RDP server [%s:%d], RDP server username [%s],"
|
||||
" xrdp pamusername [%s], xrdp process id [%d]",
|
||||
mod->client_info.client_addr,
|
||||
mod->client_info.client_port,
|
||||
mod->client_info.client_description,
|
||||
mod->inst->settings->hostname,
|
||||
mod->inst->settings->port,
|
||||
mod->inst->settings->username,
|
||||
|
||||
Reference in New Issue
Block a user