express: Check getenv(LOGNAME) for user name first before using getlogin()
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
4f79bcfa79
commit
cd06d81420
|
@ -108,7 +108,8 @@ _util_user_fullname_get(void)
|
|||
struct passwd *p;
|
||||
size_t n;
|
||||
|
||||
if (!(usr = getlogin())) return NULL;
|
||||
if (!(usr = getenv("LOGNAME")))
|
||||
if (!(usr = getlogin())) return NULL;
|
||||
|
||||
p = getpwnam(usr);
|
||||
if ((!p) && (errno == 0)) return NULL;
|
||||
|
|
Loading…
Reference in New Issue