when autologin, don't use client passed params unless xrdp.ini ask is used

This commit is contained in:
jsorg71 2009-05-28 21:01:01 +00:00
parent d486e1dd91
commit e1461fd946

View File

@ -411,21 +411,28 @@ 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
{
list_add_item(self->mm->login_names, (long)g_strdup(q));
list_add_item(self->mm->login_values, (long)g_strdup(r));
/* 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);
}