Bug 461074 - libuser crashes on parsing invalid entries with missing semi-colons :
libuser crashes on parsing invalid entries with missing semi-colons :
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: libuser (Show other bugs)
4.8
All Linux
low Severity low
: rc
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-03 20:58 EDT by ritz
Modified: 2010-10-23 00:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-07 01:50:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description ritz 2008-09-03 20:58:41 EDT
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 16:38:27 EDT
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 Product and Program Management 2008-10-31 12:37:11 EDT
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.