Bug 166385

Summary: chkconfig --list segfaults if directories exist in /etc/xinetd.d/
Product: [Fedora] Fedora Reporter: Eric Gray <ericg>
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1.3.21-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-07 19:26:33 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 to fix segfault problem
none
different patch for the same issue
none
the *right* patch none

Description Eric Gray 2005-08-20 01:20:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
If any directories are created in /etc/xinetd.d/ (RCS, for example), chkconfig --list will segfault when listing the xinetd services.

This bug was probably introduced in chkconfig 1.3.14-1 when a change was made to sort the output.  I believe the sort function is crashing when it is passed a service struct that contains invalid information (because it is a directory and not a file).

Note that this bug also causes system-config-services to crash shortly after launching.

Most users will not be affected because directories are not typically created in /etc/xinetd.d/.   However, those using RCS to manage config files will likely see it.


Version-Release number of selected component (if applicable):
chkconfig-1.3.20-1

How reproducible:
Always

Steps to Reproduce:
1. Create a directory in /etc/xinetd.d/
2. Run chkconfig --list

  

Actual Results:  xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
yum             0:off   1:off   2:off   3:off   4:off   5:off   6:off

xinetd based services:
Segmentation fault


Expected Results:  xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
yum             0:off   1:off   2:off   3:off   4:off   5:off   6:off

xinetd based services:
        chargen:        off
        chargen-udp:    off
        cvs:            off
        daytime:        off
        daytime-udp:    off
        echo:           off
        echo-udp:       off
        eklogin:        off
        gssftp:         off
        klogin:         off
        krb5-telnet:    off
        kshell:         off
        ktalk:          off
        rsync:          off
        time:           off
        time-udp:       off
        xvnc:           on


Additional info:

Comment 1 Eric Gray 2005-08-20 01:23:36 UTC
Created attachment 117937 [details]
Patch to fix segfault problem

Comment 2 Bill Nottingham 2005-10-07 19:23:49 UTC
Created attachment 119722 [details]
different patch for the same issue

This is what I'm adding for chkconfig-1.3.21-1. This should catch all the cases
where it fails.

Comment 3 Bill Nottingham 2005-10-07 19:25:50 UTC
Created attachment 119723 [details]
the *right* patch

Sorry, that was the wrong patch. :)