Bug 166385 - chkconfig --list segfaults if directories exist in /etc/xinetd.d/
Summary: chkconfig --list segfaults if directories exist in /etc/xinetd.d/
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: chkconfig (Show other bugs)
(Show other bugs)
Version: 4
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-20 01:20 UTC by Eric Gray
Modified: 2014-03-17 02:55 UTC (History)
1 user (show)

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: ---


Attachments (Terms of Use)
Patch to fix segfault problem (470 bytes, patch)
2005-08-20 01:23 UTC, Eric Gray
no flags Details | Diff
different patch for the same issue (1.59 KB, patch)
2005-10-07 19:23 UTC, Bill Nottingham
no flags Details | Diff
the *right* patch (3.88 KB, patch)
2005-10-07 19:25 UTC, Bill Nottingham
no flags Details | Diff

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. :)


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