Bug 24279

Summary: bug in configuration files of xinetd
Product: [Retired] Red Hat Linux Reporter: pappy <frederic.raynal>
Component: xinetdAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-23 06:41:04 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description pappy 2001-01-18 04:21:28 EST
Some files listed in /etc/xinetd.d contain a bug. It is not a xinetd bug
...  it rather looks like a packaging bug.

The line starting with the keyword "service" must be followed by a service
name that is also defined in /etc/services (it is possible to use unlisted
services by adding the UNLISTED flag - hard to guess ;-). Anyway, some
files contains services not listed in /etc/services and not defined as
UNLISTED, so they won't work :

[pappy@rootdurum xinetd.d]# grep service *udp
chargen-udp:service chargen-udp
daytime-udp:service daytime-udp
echo-udp:service echo-udp
time-udp:service time

The simplest solution to fix those bugs is to change in those *-upd files
the service name by removing the "-udp" string.

This was on a RH7.0 with xinetd-

Some other files could contain badly configure services in previous
Comment 1 Trond Eivind Glomsrxd 2001-01-19 13:47:44 EST
The fix you mention isn't an option, as the names need to be distinct.
Comment 2 pappy 2001-01-19 14:33:33 EST
names doesn't need to be distinct ... if we speak of the same names !
I'm talking about names in front of the service tag.
Here is a sample with echo service :

[root@rootdurum xinetd.d]# cat echo
# default: off
# description: An echo server. This is the tcp \
# version.

service echo
        type            = INTERNAL
        id              = echo-stream
        socket_type     = stream
        protocol        = tcp
        user            = root
        wait            = no
#       disable         = yes
[root@rootdurum xinetd.d]# cat echo-udp
# default: off
# description: An echo server. This is the udp \
# version.

service echo
        type            = INTERNAL
        id              = echo-dgram
        socket_type     = dgram
        protocol        = udp
        user            = root
        wait            = yes
#       disable         = yes
        port            = 7

Here is what you get when starting xinetd with /usr/sbin/xinet -d
01/1/19@20:37:09: DEBUG: {cnf_start_services} Started service: echo-stream
01/1/19@20:37:09: DEBUG: {cnf_start_services} Started service: echo-dgram

Since the socket attribute is necessary, it is enought to differenciate between
udp and tcp services.

So it work fine :)))

Have a look at my article about xinetd :
Comment 3 Trond Eivind Glomsrxd 2001-01-19 15:06:13 EST
Sorry, I didn't say why it has to be unique: The name is used for manipulating
services (chkconfig, ntsysv)/
Comment 4 pappy 2001-01-19 15:52:56 EST
the solution is then to use the UNLISTED flag for the "type" attribute.
I have never test that for an INTERNAL service ... but why not :)
No time to test now
Comment 5 pappy 2001-01-23 06:41:01 EST
I don't understand the matter with chkconfig, ntsysv :(

xinetd is a deamon started at some runlevels ... but the server it manages are
never started directly (at least, they should not. If they are before xinetd,
xinetd tells the port is already in use and forget about this port) I reallly
can't see why chkconfig and/or ntsysv should have a look in /etc/xinetd.d ?

Did you try with an UNLISTED flag for INTERNAL services ? Anyway, the problem
will come back for every service that exists both in tcp and udp (I mean not
only for INTERNAL servers).

Comment 6 Trond Eivind Glomsrxd 2001-01-23 16:55:13 EST
If you take a look at chkconfig and ntsysv in Red Hat Linux 7, they can both
turn services on or off ("chkconfig telnet off"). These use the names given, so
they need to be unique...

Adding UNLISTED seems to help, though - added in
Comment 7 Trond Eivind Glomsrxd 2001-01-31 18:59:11 EST
*** Bug 25292 has been marked as a duplicate of this bug. ***