History log of /freebsd-9.3-release/usr.sbin/rpcbind/rpcbind.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 224001 14-Jul-2011 delphij

Use prototype. While I'm there, add a pair of parenthesis to mark an if
statment's border.

MFC after: 1 month


# 203710 09-Feb-2010 imp

When you have multiple addresses on the same network on different
interfaces (such as when you are part of a carp pool), and you run
rpcbind -h to restrict which interfaces have rpc services, rpcbind can
none-the-less return addresses that aren't in the -h list. This patch
enforces the rule that when you specify -h on the command line, then
services returned from rpcbind must be to one of the addresses listed
in -h, or be a loopback address (since localhost is implicit when
running -h).

The root cause of this is the assumption in addrmerge that there can
be only one interface that matches a given network IP address. This
turns out not to be the case. To retain historical behavior, I didn't
try to fix the routine to prefer the address that the request came
into, since I didn't know the side effects that might cause in the
normal case. My quick analysis suggests that it wouldn't be a
problem, but since this code is tricky I opted for the more
conservative patch of only restricting the reply when -h is in effect.

Hence, this change will have no effect when you are running rpcbind
without -h.

Reviewed by: alfred@
Sponsored by: iX Systems
MFC after: 2 weeks


# 176290 14-Feb-2008 yar

No network addresses in the system isn't a good excuse
for rpcbind(8) to crash.

The crash was due to a boolean variable initialized
improperly. Besides fixing the initialization, pick
a better name for the variable so that its meaning is
clear and no more coding errors appear around it.


# 173412 07-Nov-2007 kevlo

Cleanup of userland __P use


# 172901 23-Oct-2007 matteo

Avoid leaking file descriptors


# 170457 09-Jun-2007 matteo

Remove a comment I forgot to remove


# 169174 01-May-2007 matteo

Correctly inizialize local/unix transport. I broke it in rev.1.15.

PR: bin/1122566
MFC after: 1 week


# 168969 23-Apr-2007 matteo

1)Make it possible for rpcbind(8) to bind TCP listening socket to an IP
other than INADDR_ANY.

2) Add the -6 option to specify "IPv6 only".

Glanced at by: bms
Requested by: bms [2]
PR: bin/84494 [1]
Approved by: silence from maintainer (~2 weeks) [1]
MFC after: 2 weeks


# 137327 07-Nov-2004 dd

Make the usage message match reality about -h and -w.


# 133789 15-Aug-2004 mbr

MFNetBSD

Decrease log severity to debug if a protocol is not supported by the
kernel (rpcbind checks /etc/netconfig if a protocol is available).
This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.


# 121657 29-Oct-2003 mbr

Don't pass NULL as an integer.

Obtained from: NetBSD


# 109363 16-Jan-2003 mbr

Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code.

Reviewed by: rwatson
Obtained from: NetBSD
MFC after: 1 day


# 108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


# 107952 16-Dec-2002 mbr

Change the name for the local unix-socket based protocol
from "unix" back to "local". Add some compat stuff so both
ways work for some time.

Reviewed by: phk
Approved by: imp (UPDATING)
Requested by: iedowse, lukem@netbsd.org


# 107725 10-Dec-2002 mbr

Check if rpcbind is already running and print a warning.
Fixes segfault if rpcbind is started up a second time.

Solution has been taken from mountd(8).

Reviewed by: phk
Approved by: re (rwatson)


# 104592 07-Oct-2002 alfred

WARNS=3 safety (mostly), use __unused for unused params and unsigned where
needed to avoid warnings about comparing signed and unsigned values.


# 104590 06-Oct-2002 alfred

fix line wrap.


# 104587 06-Oct-2002 alfred

Don't pass a NULL pointer to syslog(3).

Submitted by: kris


# 100505 22-Jul-2002 ume

use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.

MFC after: 1 week


# 99774 11-Jul-2002 alfred

Add -h option to rpcbind, used to specify what address to bind to for
UDP requests.

Submitted by: mbr


# 96788 17-May-2002 jmallett

Stop this program's abuse of malloc(3). Its return value doesn't need these
ugly explicit casts, and its argument doesn't need explicitly cast to u_int,
especially if sizeof() is being used.


# 74462 19-Mar-2001 alfred

Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

Bring in required TLI library routines to support this.

Since we don't support TLI we've essentially copied what NetBSD
has done, adding a thin layer to emulate direct the TLI calls
into BSD socket calls.

This is mostly from Sun's tirpc release that was made in 1994,
however some fixes were backported from the 1999 release (supposedly
only made available after this porting effort was underway).

The submitter has agreed to continue on and bring us up to the
1999 release.

Several key features are introduced with this update:
Client calls are thread safe. (1999 code has server side thread
safe)
Updated, a more modern interface.

Many userland updates were done to bring the code up to par with
the recent RPC API.

There is an update to the pthreads library, a function
pthread_main_np() was added to emulate a function of Sun's threads
library.

While we're at it, bring in NetBSD's lockd, it's been far too
long of a wait.

New rpcbind(8) replaces portmap(8) (supporting communication over
an authenticated Unix-domain socket, and by default only allowing
set and unset requests over that channel). It's much more secure
than the old portmapper.

Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
to support TI-RPC and to support IPV6.

Umount(8) is also fixed to unmount pathnames longer than 80 chars,
which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul