Bug 461074 - libuser crashes on parsing invalid entries with missing semi-colons :
Summary: libuser crashes on parsing invalid entries with missing semi-colons :
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: libuser
Version: 4.8
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Miloslav Trmač
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-04 00:58 UTC by ritz
Modified: 2018-10-20 02:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-07 05:50:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch based on upstream code (1.34 KB, patch)
2008-09-04 00:58 UTC, ritz
no flags Details | Diff
Consistently use "" if the last field is not present (2.31 KB, patch)
2008-09-04 20:38 UTC, Miloslav Trmač
no flags Details | Diff

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 "?".


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