Fix regression in domain to session type mapping
If no domain is passed, self->session->client_info->domain is an empty string that is incorrectly treated as if the domain were passed by the client. The regression was introduced infc753a95
, when an incorrect check for non-empty domain was added. That check was removed in67119ecc
based on coverity report, leaving no trace of the original intention. Check domain both for '_' and '\0' as the initial character. In either case, select the first session type section in xrdp.ini.
This commit is contained in:
parent
e8185caf31
commit
5d2ce60340
@ -583,7 +583,8 @@ xrdp_wm_init(struct xrdp_wm *self)
|
|||||||
/* if autorun is configured in xrdp.ini, we enforce that module to be loaded */
|
/* if autorun is configured in xrdp.ini, we enforce that module to be loaded */
|
||||||
g_strncpy(section_name, autorun_name, 255);
|
g_strncpy(section_name, autorun_name, 255);
|
||||||
}
|
}
|
||||||
else if (self->session->client_info->domain[0] != '_')
|
else if (self->session->client_info->domain[0] != '\0' &&
|
||||||
|
self->session->client_info->domain[0] != '_')
|
||||||
{
|
{
|
||||||
/* domain names that starts with '_' are reserved for IP/DNS to
|
/* domain names that starts with '_' are reserved for IP/DNS to
|
||||||
* simplify for the user in a proxy setup */
|
* simplify for the user in a proxy setup */
|
||||||
|
Loading…
Reference in New Issue
Block a user