Bug 624800 - bind rpc service to specific port
Summary: bind rpc service to specific port
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xinetd
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Vojtech Vitek
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 697788
TreeView+ depends on / blocked
 
Reported: 2010-08-17 19:53 UTC by Jeff Bastian
Modified: 2018-10-27 13:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 117746
: 697788 (view as bug list)
Environment:
Last Closed: 2011-05-25 08:39:04 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0827 0 normal SHIPPED_LIVE xinetd bug fix update 2011-05-25 08:38:48 UTC

Description Jeff Bastian 2010-08-17 19:53:16 UTC
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 08:39:04 UTC
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.