Bug 603692

Summary: faillog: Failed to get the entry for UID
Product: Red Hat Enterprise Linux 5 Reporter: Peter Vrabec <pvrabec>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: fnadge, mvadkert, pvrabec, sgrubb, tmraz
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the command "faillog" failed to print the User Identification (UID) when the faillog file was empty. This update prints the UID of the users who had a login failure and no more underflow occurs.
Story Points: ---
Clone Of: 603683 Environment:
Last Closed: 2011-01-13 23:28: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: 603683    
Bug Blocks: 603691    

Description Peter Vrabec 2010-06-14 11:22:09 UTC
+++ This bug was initially created as a clone of Bug #603683 +++

Description of problem:
Integer underflow happens on x86_64 in faillog command when /var/log/faillog is empty file:
if (offset <= (statbuf.st_size - sizeof (fl))) 

How reproducible:
remove /var/log/faillog
touch /var/log/faillog
run faillog

  
Actual results:
faillog: Failed to get the entry for UID 0
faillog: Failed to get the entry for UID 1
faillog: Failed to get the entry for UID 2
faillog: Failed to get the entry for UID 3
faillog: Failed to get the entry for UID 4
faillog: Failed to get the entry for UID 5
...

Expected results:
Display only list of user faillog records who have ever had a login failure.

Comment 4 Florian Nadge 2011-01-03 16:03:51 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the command "faillog" failed to print the User Identification (UID) when the faillog file was empty. This update prints the UID of the users who had a login failure and no more underflow occurs.

Comment 6 errata-xmlrpc 2011-01-13 23:28:05 UTC
An advisory 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 therefore 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-2011-0094.html