Bug 109648

Summary: PATCH: lastlog assumes ll_time in struct lastlog is time_t
Product: Red Hat Enterprise Linux 3 Reporter: H.J. Lu <hongjiu.lu>
Component: shadow-utilsAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-16 17:15:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 102121    
Attachments:
Description Flags
A patch to fix lastlog none

Description H.J. Lu 2003-11-10 17:17:43 UTC
In lastlog.c, there is

        tm = localtime (&lastlog.ll_time);

it assumes ll_time is time_t. But in <bits/utmp.h>, there are


struct lastlog
  {
#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
    int32_t ll_time;
#else
    __time_t ll_time;
#endif
    char ll_line[UT_LINESIZE];
    char ll_host[UT_HOSTSIZE];
  };

Comment 1 H.J. Lu 2003-11-10 17:18:51 UTC
Created attachment 95881 [details]
A patch to fix lastlog

Comment 3 Nalin Dahyabhai 2003-11-11 15:30:57 UTC
Patch looks reasonable from here.

Comment 4 Jay Turner 2004-01-16 17:15:05 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2003-340.html