History log of /freebsd-11.0-release/usr.sbin/rpc.statd/statd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

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

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

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


# 300935 29-May-2016 ngie

Mark out_of_mem(..) and usage(..) with __dead2 as they both directly call exit
as a hint to static analysis tools

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division


# 292864 29-Dec-2015 uqs

Fix type mismatches for malloc(3) and Co.

This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)

Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722


# 277352 19-Jan-2015 rstone

When mountd is creating sockets, it iterates over all addresses specified
in the "hosts" array and eventually looks up the network address with
getaddrinfo(). At one point it checks for a numeric address and if it
sees one, it sets a hint parameter to force getaddrinfo to interpret the
host as a numeric address. However that hint is not cleared for subsequent
iterations of the loop and if any hosts seen after this point are host names,
getaddrinfo will fail on the name. The result of this bug is that you cannot
pass a host name to the -h flag.

Unfortunately, the first iteration will either process ::1 or 127.0.0.1,
so the flag is set on the first iteration and all host names will fail
to be processed.

The same bug applies to rpc.lockd and rpc.statd, so fix them too.

Differential Revision: https://reviews.freebsd.org/D1507
Reported by: Dylan Martin
MFC after: 1 week
Sponsored by: Sandvine Inc.


# 222627 02-Jun-2011 rmacklem

Fix the nfs related daemons so that they don't intermittently
fail with "bind: address already in use". This problem was reported
to the freebsd-stable@ mailing list on Feb. 19 under the subject
heading "statd/lockd startup failure" by george+freebsd at m5p dot com.
The problem is that the first combination of {udp,tcp X ipv4,ipv6}
would select a port# dynamically, but one of the other three combinations
would have that port# already in use. The patch is somewhat involved
because it was requested by dougb@ that the four combinations use the
same port# wherever possible. The patch splits the create_service()
function into two functions. The first goes as far as bind(2) in a
loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port#
for all four cases. If these attempts fail, the last attempt allows
the 4 cases to use different port #s. After this function has succeeded,
the second function, called complete_service(), does the rest of what
create_service() did.
The three daemons mountd, rpc.lockd and rpc.statd all have a
create_service() function that is patched in a similar way. However,
create_service() has non-trivial differences for the three daemons
that made it impractical to share the same functions between them.

Reviewed by: jhb
MFC after: 2 weeks


# 177963 06-Apr-2008 kan

Fix apparent mis-paste in previous check-in by author.


# 177950 06-Apr-2008 dfr

Call listen(2) on bound tcp sockets before passing them to svc_tli_create.


# 173411 07-Nov-2007 matteo

Check the correct variables for malloc failures.

Submitted by: Michiel Boland <michiel@boland.org>


# 173263 01-Nov-2007 matteo

Add the -h <bindip> option to rpc.statd, similar to the one in nfsd(8)
and in mountd(8)

-h bindip
Specify specific IP addresses to bind to for TCP and UDP requests.
This option may be specified multiple times. If no -h option is
specified, rpc.statd will bind to INADDR_ANY. Note that when specifying
IP addresses with -h, rpc.statd will automatically add 127.0.0.1 and if
IPv6 is enabled, ::1 to the list.

(coming for rpc.lockd too)

PR: bin/98500
MFC after: 1 week


# 171733 05-Aug-2007 truckman

The call to init_file() needs to be moved outside the loop in statd.c,
otherwise mmap() gets called multiple times, which eventually fails due
to address space exhaustion on i386.

Approved by: re (kensmith)
MFC after: 1 week


# 168325 03-Apr-2007 matteo

Add the "-p" option, which allows to specify a port which the daemon
should bind to.

PR: bin/94920
Reviewed by: alfred@
MFC after: 1 week


# 162263 13-Sep-2006 charnier

compile under WARNS=6


# 127861 04-Apr-2004 charnier

Add FBSDID. Use getopt(3).


# 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


# 100125 15-Jul-2002 alfred

Nuke unused variable.


# 100120 15-Jul-2002 alfred

Port to TI/RPC and/or IPV6.

Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>


# 99798 11-Jul-2002 alfred

make mostly WARNS=4 clean.
constify, mark unsued args, fixup prototypes.


# 99787 11-Jul-2002 alfred

include string.h for strcmp(3) prototype.


# 51948 05-Oct-1999 marcel

Undo previous change.

Submitted by: bde


# 51794 29-Sep-1999 marcel

sigset_t change (part 5 of 5)
-----------------------------

Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c

The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.

There are version bumps for the following libraries:
libdialog
libreadline
libc
libc_r
libedit
libftpio
libss

These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.

NOTE: libncurses already had an version bump and has not been
given one now.

NOTE: doscmd is a real casualty and has been disconnected for
the moment. Reconnection will eventually happen after
doscmd has been fixed. I'm aware that being the last one
to touch it, I'm automaticly promoted to being maintainer.
According to good taste this means that I will receive a
badge which either will be glued or mechanically stapled,
drilled or otherwise violently forced onto me :-)

NOTE: pcvt/vttest cannot be compiled with -traditional. The
change cause sys/types to be included along the way which
contains the const and volatile modifiers. I don't consider
this a solution, but more a workaround.


# 50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 30376 13-Oct-1997 charnier

Use err(3). Add usage() and #includes.


# 14982 01-Apr-1996 peter

Some minor tweaks for statd
- use rpcgen to generate unmodified code instead of havinf it in the
repository
- use "natural" function names to avoid conflicts with prototypes etc.


# 14126 17-Feb-1996 peter

This commit was generated by cvs2svn to compensate for changes in r14125,
which included commits to RCS files with non-trunk default branches.


# 14125 17-Feb-1996 peter

Import Jan 15 version of Andrew Gordon <andrew.gordon@net-tel.co.uk>'s
rpc.statd.

This is apparently fully functional and complete.