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>
This commit is contained in:
Ruediger Meier 2016-02-24 20:25:11 +01:00
parent c12fc5e1cd
commit a365953a24
2 changed files with 1 additions and 2 deletions

View File

@ -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);

View File

@ -55,7 +55,6 @@
# include <linux/major.h>
#endif
#include <netdb.h>
#include <lastlog.h>
#include <security/pam_appl.h>
#ifdef HAVE_SECURITY_PAM_MISC_H
# include <security/pam_misc.h>