neutrinordp: avoid pampassword leakage

The leakage does not occur in the most usual use case of xrdp.
It occurs in NeutrinoRDP proxy mode with PAM authentication enabled.

Reported by @TOMATO-ONE
This commit is contained in:
Koichiro IWAO 2021-04-29 21:51:30 +09:00
parent 5bb9d982ea
commit aad14384cc
No known key found for this signature in database
GPG Key ID: 03993B4065E7193B
1 changed files with 12 additions and 1 deletions

View File

@ -443,7 +443,14 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{
rdpSettings *settings;
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [%s]", name, value);
if (g_strcmp(name, "password") == 0 || g_strcmp(name, "pampassword") == 0)
{
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [******]", name);
}
else
{
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [%s]", name, value);
}
settings = mod->inst->settings;
if (g_strcmp(name, "hostname") == 0)
@ -496,6 +503,10 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{
settings->desktop_resize = g_text2bool(value);
}
else if (g_strcmp(name, "pampassword") == 0)
{
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [******]", name);
}
else
{
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value);