# xinetd

## darkseer

First off sorry if this is a duplicate, but search didn't yield anything on the gentoo boards about this. 

I can't for the life of me get xinetd to recognize any services. All the services I have set up are disabled for the same reason:

10/4/18@22:19:01: ERROR: 20663 {protocol_parser} Protocol tcp not in /etc/protocols [file=/etc/xinetd.d/svnserve] [line=8]                                                                      

10/4/18@22:19:01: ERROR: 20663 {identify_attribute} Error parsing attribute protocol - DISABLING SERVICE [file=/etc/xinetd.d/svnserve] [line=8]      

/etc/protocols does exist and is readable by xinet. tcp is a listed protocol and all the services are listed in /etc/services. Attached is the xinetd.conf and a sample service conf. Any suggestions help, the great google shows me that other people have this issue but no one has found an answer. 

xinet.conf

#                                 

# This is the master xinetd configuration file. Settings in the

# default section will be inherited by all service configurations

# unless explicitly overridden in the service configuration. See 

# xinetd.conf in the man pages for a more detailed explanation of

# these attributes.                                              

defaults

{       

# The next two items are intended to be a quick access place to

# temporarily enable or disable services.

#

#       enabled         =

#       disabled        =

# Define general logging characteristics.

        log_type        = SYSLOG daemon info

        #log_type       = SYSLOG daemon debug

        log_on_failure  = HOST

        log_on_success  = PID HOST DURATION EXIT

# Define access restriction defaults

#

#       no_access       =

        only_from       = 192.168.0.0/24 localhost

#       max_load        = 0

        cps             = 50 10

        instances       = 50

        per_source      = 10

# Address and networking defaults

#

#       bind            =

#       mdns            = yes

        v6only          = no

# setup environmental attributes

#

#       passenv         =

        groups          = yes

        umask           = 002

# Generally, banners are not used. This sets up their global defaults

#

#       banner          =

#       banner_fail     =

#       banner_success  =

}

includedir /etc/xinetd.d

Sample Service:

service vmware-authd

{

    disable         = no

    port            = 902

    socket_type     = stream

    protocol        = tcp

    wait            = no

    user            = root

    server          = /opt/vmware/server/sbin/vmware-authd

    type            = unlisted

    only_from       = 192.168.0.0/24

}

Any help is appreciate. 

-Darkseer

----------

## darkseer

It gets stranger, xinetd appears to be fine. After paging through the xinetd source code it appears the function getprotobyname  in netdb.h isn't working. It returns null when clearly it shouldn't be. Anyone else run into this error?

-Darkseer

----------

## Hu

Does dev-util/strace show any unusual behavior?

----------

## darkseer

strace isn't pulling in getprotobyname

I'm running it the following way:

strace /usr/sbin/xinetd -d -f /etc/xinetd.conf --stayalive 2>&1 | grep get

Am I doing it wrong?

-Darkseer

----------

## Rexilion

That:

type = UNLISTED

line seems suspicious to me. The man page says:

 *Quote:*   

> UNLISTED
> 
>     if this is a service not listed in a standard system file (like /etc/rpc for RPC services, or /etc/services for non-RPC services). 

 

Since xinetd is also complaining of the (presumably) standard system file /etc/protocols, this could be your culprit.

----------

## darkseer

UNLISTED is how the install sets it. I messed with changing it to all the different legal types listed in the manual for xinetd to no avail. I'm taking the time to do an emerge world to see if some library incompatability is causing getprotobyname not to work.  In an update I may have updated some set of C libraries or somesuch and not done a world to recompile everything with the new compiler. 

-Darkseer

----------

## darkseer

emerge -av --deep world didn't help. Fixed some other things but not this. getprotobyname is still not working. Any ideas?

-Darkseer

----------

## darkseer

strangely enough, I believe its related to this:

https://bugs.gentoo.org/119247

researching more.

-Darkseer

----------

