summaryrefslogtreecommitdiffstats
path: root/login-utils/last.c
diff options
context:
space:
mode:
authorRuediger Meier2016-02-24 20:25:11 +0100
committerRuediger Meier2016-02-29 13:05:06 +0100
commita365953a247cf4d00cde52a7b19faf977ae95cc4 (patch)
tree11129716f8cb626d63634c7b7d5828d32ef285df /login-utils/last.c
parentbuild-sys: build_init should check for flock (diff)
downloadkernel-qcow2-util-linux-a365953a247cf4d00cde52a7b19faf977ae95cc4.tar.gz
kernel-qcow2-util-linux-a365953a247cf4d00cde52a7b19faf977ae95cc4.tar.xz
kernel-qcow2-util-linux-a365953a247cf4d00cde52a7b19faf977ae95cc4.zip
login-utils: minor utmp cleanup
- consistently use ut->ut_user instead of ut->ut_name - don't include obsolete lastlog.h BSD header Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r--login-utils/last.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/last.c b/login-utils/last.c
index dbfa8aed1..38b92efc2 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -586,7 +586,7 @@ static int is_phantom(const struct last_control *ctl, struct utmp *ut)
if (ut->UL_UT_TIME < ctl->boot_time.tv_sec)
return 1;
- pw = getpwnam(ut->ut_name);
+ pw = getpwnam(ut->ut_user);
if (!pw)
return 1;
sprintf(path, "/proc/%u/loginuid", ut->ut_pid);