Commit Graph

24 Commits

Author SHA1 Message Date
Alan Somers
9039018c34 strcpy => strlcpy, strcat => strlcat
Reported by:	Coverity
CID:		1006703 978863 1006745 1347163
Reviewed by:	cem
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D10192
2017-04-04 19:46:23 +00:00
Don Lewis
16a9eab953 Simplify some overly complex code so that both humans and Coverity
have a better chance of understanding it.

Reported by:	Coverity
CID:		1009684, 1006931
2016-05-13 00:50:53 +00:00
Kevin Lo
482d883100 Use INADDR_NONE instead of -1 to check inet_addr() result.
Reviewed by:	glebius
2013-10-15 07:37:30 +00:00
Kevin Lo
b918e60351 Cleanup use of 'host' when running 'rpcinfo -p'.
Obtained from:	NetBSD
2012-08-18 16:14:50 +00:00
Ulrich Spörlein
487ac9ac21 Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
Xin LI
61382374d1 Constify a few string variables. While I'm there, also convert usage() to
use a prototype.

MFC after:	2 weeks
2011-05-13 22:35:06 +00:00
Rebecca Cran
6bccea7c2b Fix typos - remove duplicate "the".
PR:	bin/154928
Submitted by:	Eitan Adler <lists at eitanadler.com>
MFC after: 	3 days
2011-02-21 09:01:34 +00:00
Bruce Evans
83e6e8406c Fixed a misspelling of '\0' as NULL. 2004-03-11 10:22:25 +00:00
Philippe Charnier
003bc1d43e Add FBSDID. Use errx() instead of fprintf()/exit(). Call exit() at the end
of usage() and make the code aware of that.
2003-09-07 15:26:44 +00:00
Martin Blapp
fb4c80619a 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
2002-12-16 22:24:26 +00:00
Juli Mallett
3a7fc8ce59 Remove local prototypes for main(). 2002-08-19 03:07:56 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Alfred Perlstein
8858373f83 The clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix") hacks
were removed and replaced them with clnt_tp_create, now the af_local
support is fixed.

I also removed the hack how rpcinfo contacted rpcbind, now we can
relay on clnt_tp_create create the client-handle for us.  Only
rpcbind itself needs a hardcoded socket-path.

Submitted by: mbr

Also add $FreeBSD
2002-02-05 19:26:04 +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
Warner Losh
62f882d620 getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.
2000-09-04 06:09:54 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
2180733f75 #include <arpa/inet.h> 1998-06-12 12:37:15 +00:00
Warner Losh
a716ad6693 Don't assume that hp->h_lenght == 4. Be conservative in its use.
Submitted by:	 J. Assange a long time ago.
1998-06-09 04:31:02 +00:00
Philippe Charnier
81c44dca8a Use err(3), cosmetic in usage(). 1997-08-06 06:49:06 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Peter Wemm
c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Garrett Wollman
e99a5be395 Move rpcinfo program over from 1.1.5. Based on original work by J.T. Conklin
in 1.x.
1994-08-07 18:23:25 +00:00