History log of /freebsd-10-stable/usr.sbin/rpc.statd/file.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 300469 23-May-2016 truckman

MFC r299988

Set ai2 to NULL in in find_host() before the loop and after calling
freeaddrinfo() on it to indicate that it doesn't point to a valid
addrinfo list. This fixes this Coverity issues:
1006368 Uninitialized pointer read
1018506 Double free
1305590 Resource leak
that can be triggered in the hp->hostname[0] != '\0' case.

Don't treat a character as a boolean.

Fix these Coverity issues:
1009293 Unchecked return value from library
1194246 Wrong size argument
by tweaking the status file extend code.

Reported by: Coverity
CID: 1006368, 1018506, 1305590, 1009293, 1194246
Reviewed by: rmacklem
Feedback from: hrs
Differential Revision: https://reviews.freebsd.org/D6398


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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

# 180025 26-Jun-2008 dfr

Re-implement the client side of rpc.lockd in the kernel. This implementation
provides the correct semantics for flock(2) style locks which are used by the
lockf(1) command line tool and the pidfile(3) library. It also implements
recovery from server restarts and ensures that dirty cache blocks are written
to the server before obtaining locks (allowing multiple clients to use file
locking to safely share data).

Sponsored by: Isilon Systems
PR: 94256
MFC after: 2 weeks


# 171816 13-Aug-2007 truckman

If the mmap() call in rpc.statd fails, rpc.statd prints a warning
message and then dumps core because the subsequent code assumes that
mmap() succeeded. Since rpc.statd does not have fallback code to
implement the functionality needed to operate on the status file if
it is not memory mapped, rpc.statd should use err() to force the process
to exit if the mmap() call fails.

PR: bin/115430 (mmap() failure previously fixed in statd.c 1.15)
Approved by: re (kensmith)
MFC after: 1 week


# 121560 26-Oct-2003 peter

Deal with xdrproc_t casts. Make these compile cleanly with WARNS=2
(but I haven't turned it on)


# 99798 11-Jul-2002 alfred

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


# 99786 11-Jul-2002 alfred

include stdlib.h for exit(3) prototype.


# 74499 19-Mar-2001 alfred

Included in the updated version of tirpc's sm_inter.x Sun added the
SM_NOTIFY procedure.

Remove our hand-coded one as it was causing world breakage for
worlds compiled with NOSHARED=yes because the static linker is a
bit less forgiving (or not as broken as) our dynamic linker.

Add $FreeBSD$ while I'm here.

Pointed out by: bde


# 30376 13-Oct-1997 charnier

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


# 21786 16-Jan-1997 alex

Sweep through the tree fixing mmap() usage:

- Use MAP_FAILED instead of the constant -1 to indicate
failure (required by POSIX).
- Removed flag arguments of '0' (required by POSIX).
- Fixed code which expected an error return of 0.
- Fixed code which thought any address with the high bit set
was an error.
- Check for failure where no checks were present.

Discussed with: bde


# 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.