Bug 166385 - chkconfig --list segfaults if directories exist in /etc/xinetd.d/
chkconfig --list segfaults if directories exist in /etc/xinetd.d/
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: chkconfig (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-19 21:20 EDT by Eric Gray
Modified: 2014-03-16 22:55 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.3.21-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-07 15:26:33 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 to fix segfault problem (470 bytes, patch)
2005-08-19 21:23 EDT, Eric Gray
no flags Details | Diff
different patch for the same issue (1.59 KB, patch)
2005-10-07 15:23 EDT, Bill Nottingham
no flags Details | Diff
the *right* patch (3.88 KB, patch)
2005-10-07 15:25 EDT, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Eric Gray 2005-08-19 21:20:39 EDT
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-19 21:23:36 EDT
Created attachment 117937 [details]
Patch to fix segfault problem
Comment 2 Bill Nottingham 2005-10-07 15:23:49 EDT
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 15:25:50 EDT
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.