Bug 461074

Summary: libuser crashes on parsing invalid entries with missing semi-colons :
Product: Red Hat Enterprise Linux 4 Reporter: ritz <rkhadgar>
Component: libuserAssignee: Miloslav Trmač <mitr>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 4.8CC: jwest, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-07 05:50:44 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:
Attachments:
Description Flags
patch based on upstream code
none
Consistently use "" if the last field is not present none

Description ritz 2008-09-04 00:58:41 UTC
Created attachment 315712 [details]
patch based on upstream code

Description of problem:
system-config-users segfaults on libuser if an entry in the /etc/passwd file isn't formatted correctly.

Version-Release number of selected component (if applicable):
libuser-0.52.5-1.el4.1

How reproducible:
always

Steps to Reproduce:
1) Manually add an entry to /etc/passwd with a missing colon, eg:
oracle:x:700:700:/home/oracle:/bin/bash
(should be 'oracle:x:700:700::/home/oracle:/bin/bash')

2) Run system-config-users from command line (you don't see the error displayed if you run it from the GUI menu: s-c-u just doesn't run)

3) Get the following error:
[mhuth@localhost ~]$ system-config-users
/usr/share/system-config-users/system-config-users: line 4:  6486 Segmentation fault      /usr/bin/python2 /usr/share/system-config-users/system-config-users.py
  
Actual results:
segv

Expected results:
libuser should not segv

Additional info:
patch based on upstream code attached

Comment 1 Miloslav Trmač 2008-09-04 20:38:27 UTC
Created attachment 315807 [details]
Consistently use "" if the last field is not present

Thanks for the report, this is the relevant patch (backported from the 2006-03-05 changes on HEAD).

Comment 2 RHEL Program Management 2008-10-31 16:37:11 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".