Commit Graph

67 Commits

Author SHA1 Message Date
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Eitan Adler
dda5b39711 multiple: Remove 3rd clause from BSD license where approved by the
regents and renumber.

This patch skips files in contrib/ and crypto/

Acked by:	imp
Discussed with:	emaste
2014-03-14 03:07:51 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dimitry Andric
5e0a19bdee Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

MFC after:	1 week
2012-02-07 09:27:07 +00:00
Rick Macklem
6924e68e11 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
2011-06-02 20:15:32 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Doug Rabson
c675522fc4 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
2008-06-26 10:21:54 +00:00
Alexander Kabaev
4760d2ac3f Fix apparent mis-paste in previous check-in by author. 2008-04-06 22:08:17 +00:00
Doug Rabson
0e7cce1381 Call listen(2) on bound tcp sockets before passing them to svc_tli_create. 2008-04-06 13:52:17 +00:00
Matteo Riondato
96e460ec53 Check the correct variables for malloc failures.
Submitted by:	Michiel Boland <michiel@boland.org>
2007-11-07 10:21:36 +00:00
Matteo Riondato
3c2ff3b0a5 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
2007-11-01 20:13:33 +00:00
Don Lewis
098935f8d5 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
2007-08-13 15:04:39 +00:00
Don Lewis
f61a23adcc 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
2007-08-05 16:33:06 +00:00
Matteo Riondato
74e69f9e66 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
2007-04-03 21:15:00 +00:00
Matteo Riondato
df18f9cc99 Make rpc.statd INET* indipendent by converting sockaddr_in structures
to sockaddr ones and using svc_getrpccaller instead of svc_getcaller.
A similar patch was committed to rpc.lockd back in 2002 .

PR:		bin/42004
MFC after:	1 week
2007-04-02 18:59:48 +00:00
Philippe Charnier
e55942e33c compile under WARNS=6 2006-09-13 05:01:25 +00:00
Thomas Quinot
53c651a14e (sm_mon_1_svc): Fix debugging output: when establising a monitoring
request, correctly report the location (usually localhost) to which
 a callback will be made when a notification is received for the
 monitored host. Previsouly, the name of the monitored host was
 reported instead.

MFC after:	2 weeks
2006-08-11 21:44:53 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Philippe Charnier
1c38ed81bc Add FBSDID. Use getopt(3). 2004-04-04 19:46:14 +00:00
Peter Wemm
422e293c7f Deal with xdrproc_t casts. Make these compile cleanly with WARNS=2
(but I haven't turned it on)
2003-10-26 06:14:10 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Martin Blapp
bcb53b1606 Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code.

Reviewed by:	rwatson
Obtained from:	NetBSD
MFC after:	1 day
2003-01-16 07:27:30 +00:00
Alfred Perlstein
45ea00ee87 use getaddrinfo() instead of gethostbyname().
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2002-07-15 19:02:45 +00:00
Alfred Perlstein
ae23eaed6e Nuke unused variable. 2002-07-15 19:00:34 +00:00
Alfred Perlstein
af37179b5f Port to TI/RPC and/or IPV6.
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2002-07-15 18:51:57 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Alfred Perlstein
ef6d75ff7d mark unused variable. 2002-07-11 18:45:59 +00:00
Alfred Perlstein
5c9c274a5f conditionally set WARNS via ?=. 2002-07-11 18:45:14 +00:00
Alfred Perlstein
bf117eda42 make mostly WARNS=4 clean.
constify, mark unsued args, fixup prototypes.
2002-07-11 17:55:14 +00:00
Alfred Perlstein
7a8d51f860 Log the IP of the machine if an invalid host is passed over the wire.
PR: bin/29406
2002-07-11 17:44:59 +00:00
Alfred Perlstein
a2015ce534 Fix return values in the sm_notify_1 service routine to return an answer
most of the time (unless fork fails).  This should fix the problem where
FreeBSD won't respond to a remote host and therefor the remote hosts
tries indefinitely to contact the FreeBSD hosts thereby irritating the
system administrator.

PR: misc/27810
2002-07-11 17:39:50 +00:00
Alfred Perlstein
51c8727aa7 Fix syslog format errors introduced in 1.6. 2002-07-11 17:36:09 +00:00
Alfred Perlstein
f49f84fa44 add includes for inet_ntoa prototype. 2002-07-11 17:33:47 +00:00
Alfred Perlstein
96e33c2107 include string.h for strcmp(3) prototype. 2002-07-11 17:32:16 +00:00
Alfred Perlstein
2b45ad94bd include stdlib.h for exit(3) prototype. 2002-07-11 17:31:15 +00:00
Alfred Perlstein
69b9f14163 Do not allow unsafe characters in monitored hostnames.
This is modified version of the fix posted in the PR, I've taken Wollman's
advice and used strvis(3) to properly show invalid hostnames.

PR: bin/39815
2002-07-11 17:11:42 +00:00
Alfred Perlstein
bc0381304d rename 'enum res' and 'struct status' to 'enum sm_res' and 'struct sm_status'
to avoid -Wshadow warnings in consumers of its generated header files.
2002-03-22 19:43:21 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Alfred Perlstein
4c96ae1554 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
2001-03-20 01:36:41 +00:00
Alfred Perlstein
8360efbd6c 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
2001-03-19 12:50:13 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00