when autologin, don't use client passed params unless xrdp.ini ask is used
This commit is contained in:
parent
d486e1dd91
commit
e1461fd946
@ -411,22 +411,29 @@ xrdp_wm_init(struct xrdp_wm* self)
|
||||
r = (char*)list_get_item(values, index);
|
||||
if (g_strncmp("password", q, 255) == 0)
|
||||
{
|
||||
list_add_item(self->mm->login_names, (long)g_strdup("password"));
|
||||
list_add_item(self->mm->login_values,
|
||||
(long)g_strdup(self->session->client_info->password));
|
||||
/* if the password has been asked for by the module, use what the
|
||||
client says.
|
||||
if the password has been manually set in the config, use that
|
||||
instead of what the client says. */
|
||||
if (g_strncmp("ask", r, 3) == 0)
|
||||
{
|
||||
r = self->session->client_info->password;
|
||||
}
|
||||
}
|
||||
else if (g_strncmp("username", q, 255) == 0)
|
||||
{
|
||||
list_add_item(self->mm->login_names, (long)g_strdup("username"));
|
||||
list_add_item(self->mm->login_values,
|
||||
(long)g_strdup(self->session->client_info->username));
|
||||
}
|
||||
else
|
||||
/* if the username has been asked for by the module, use what the
|
||||
client says.
|
||||
if the username has been manually set in the config, use that
|
||||
instead of what the client says. */
|
||||
if (g_strncmp("ask", r, 3) == 0)
|
||||
{
|
||||
r = self->session->client_info->username;
|
||||
}
|
||||
}
|
||||
list_add_item(self->mm->login_names, (long)g_strdup(q));
|
||||
list_add_item(self->mm->login_values, (long)g_strdup(r));
|
||||
}
|
||||
}
|
||||
xrdp_wm_set_login_mode(self, 2);
|
||||
}
|
||||
list_delete(names);
|
||||
|
Loading…
Reference in New Issue
Block a user