Bug 624800 - bind rpc service to specific port
Summary: bind rpc service to specific port
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xinetd   
(Show other bugs)
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Vojtech Vitek
QA Contact: qe-baseos-daemons
Keywords: Patch
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:
Story Points: ---
Clone Of: 117746
: 697788 (view as bug list)
Last Closed: 2011-05-25 08:39:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0827 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):

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.


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