summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2017-04-04 18:36:52 +0900
committermetalefty <meta@vmeta.jp>2017-04-06 09:25:02 +0900
commit06ce0d7ee3121a53302ef102e14ffb71ab798c3c (patch)
treeb601db117ffab67478a0e19564fbf13ea77feac6 /sesman
parent7a7445fefd9a61535881ceedf5ed82febb52d2dc (diff)
downloadxrdp-proprietary-06ce0d7ee3121a53302ef102e14ffb71ab798c3c.tar.gz
xrdp-proprietary-06ce0d7ee3121a53302ef102e14ffb71ab798c3c.zip
sesman: LOGNAME should be set to username
which is used to store login name. The login name shall be the string that would be returned by the getlogin() function [1]. Some applications only refers LOGNAME environment variable and don't fallback to other variables such as USER. Fixes #725. Reported by @seidler2547. [1] The Single UNIX Specification, Issue 7
Diffstat (limited to 'sesman')
-rw-r--r--sesman/env.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sesman/env.c b/sesman/env.c
index eabc92c4..e60a0cfe 100644
--- a/sesman/env.c
+++ b/sesman/env.c
@@ -132,6 +132,7 @@ env_set_user(const char *username, char **passwd_file, int display,
g_setenv("SHELL", pw_shell, 1);
g_setenv("PATH", "/sbin:/bin:/usr/bin:/usr/local/bin", 1);
g_setenv("USER", username, 1);
+ g_setenv("LOGNAME", username, 1);
g_sprintf(text, "%d", uid);
g_setenv("UID", text, 1);
g_setenv("HOME", pw_dir, 1);