This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 624800 - bind rpc service to specific port
bind rpc service to specific port
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xinetd (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Vojtech Vitek
qe-baseos-daemons
: Patch
Depends On:
Blocks: 697788
  Show dependency treegraph
 
Reported: 2010-08-17 15:53 EDT by Jeff Bastian
Modified: 2015-03-04 18:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 117746
: 697788 (view as bug list)
Environment:
Last Closed: 2011-05-25 04:39:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch to allow rpc services to bind to a specific port (1.12 KB, patch)
2010-08-17 15:53 EDT, Jeff Bastian
no flags Details | Diff

  None (edit)
Description Jeff Bastian 2010-08-17 15:53:16 EDT
Created attachment 439195 [details]
patch to allow rpc services to bind to a specific port

Description of problem:
rpc services started by xinetd cannot be bound to a specific port; xinetd just ignores the 'port' line in the service config file.  Since RPC uses random ports by default, this makes it impossible to run a firewall.

Some RPC services, e.g., the NFS daemons, allow you to bind to a specific port, but not all daemons have this feature, e.g., rpc.rstatd (from rusers-server package).

The attached patch honors the 'port' line for RPC services.

Version-Release number of selected component (if applicable):
xinetd-2.3.14-10.el5.x86_64
rusers-server-0.17-47.x86_64

How reproducible:
every time

Steps to Reproduce:
1. create /etc/xinetd.d/rstatd-server with contents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
service rstatd
{
    disable        = no
    type           = RPC
    socket_type    = dgram
    protocol       = udp
    server         = /usr/sbin/rpc.rstatd
    wait           = yes
    flags          = IPv4
    port           = 60222
    user           = root
    group          = root
    rpc_version    = 1-4
    instances      = 1
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. service xinetd restart
3. rpcinfo -p localhost | grep rstatd
  
Actual results:
rstatd is running on a random port, i.e., not 60222 as requested
$ rpcinfo -p localhost | grep rstatd
    100001    1   udp  58497  rstatd
    ...

Expected results:
rstatd is running on port 60222
$ rpcinfo -p localhost | grep rstatd
    100001    1   udp  60222  rstatd
    ...

Additional info:
Comment 7 errata-xmlrpc 2011-05-25 04:39:04 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0827.html

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