]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login-utils: minor utmp cleanup
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 24 Feb 2016 19:25:11 +0000 (20:25 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 29 Feb 2016 12:05:06 +0000 (13:05 +0100)
- 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>
login-utils/last.c
login-utils/login.c

index dbfa8aed12cc77f4df1ca35b3740b8b98de7d47a..38b92efc288c0e938e85db77819f3238048de055 100644 (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);
index e1f11eb9e13f4f500fc7de7489b4e5c8b86045fa..c5ce1887eef08d0075d3dd5f2bbb238cc69be197 100644 (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>