Bug 109648 - PATCH: lastlog assumes ll_time in struct lastlog is time_t
Summary: PATCH: lastlog assumes ll_time in struct lastlog is time_t
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: shadow-utils
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: 102121
TreeView+ depends on / blocked
 
Reported: 2003-11-10 17:17 UTC by H.J. Lu
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-16 17:15:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A patch to fix lastlog (593 bytes, patch)
2003-11-10 17:18 UTC, H.J. Lu
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:340 0 normal SHIPPED_LIVE Updated shadow-utils packages available 2003-11-11 05:00:00 UTC

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



Note You need to log in before you can comment on or make changes to this bug.