From a365953a247cf4d00cde52a7b19faf977ae95cc4 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Wed, 24 Feb 2016 20:25:11 +0100 Subject: [PATCH] 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 --- login-utils/last.c | 2 +- login-utils/login.c | 1 - 2 files changed, 1 insertion(+), 2 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); diff --git a/login-utils/login.c b/login-utils/login.c index e1f11eb9e..c5ce1887e 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -55,7 +55,6 @@ # include #endif #include -#include #include #ifdef HAVE_SECURITY_PAM_MISC_H # include