Skip to content

Commit

Permalink
sesman: LOGNAME should be set to username
Browse files Browse the repository at this point in the history
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
  • Loading branch information
metalefty committed Apr 6, 2017
1 parent 7a7445f commit 06ce0d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sesman/env.c
Expand Up @@ -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);
Expand Down

0 comments on commit 06ce0d7

Please sign in to comment.