Commit Graph

9 Commits

Author SHA1 Message Date
Xin LI
c3fc0d96f3 Remove unused includes. 2018-01-01 09:41:18 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Enji Cooper
6ee7c85891 Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT
Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as
it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x:

> include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];

The proposed change also matches the rest of the rtype upper bound checks in the
file, so the original change was likely a typo.

MFC after: 2 weeks
Reported by: Coverity
CID: 1007567
Reviewed by: truckman
Sponsored by: EMC / Isilon Storage Division
2016-06-08 12:45:22 +00:00
Hiroki Sato
a7c51fa1a0 Replace Sun RPC license with a 3-clause BSD license, with the explicit
permission of Sun Microsystems in 2009.
2013-11-25 16:44:02 +00:00
Xin LI
07de1c52db Use prototype. While I'm there, add a pair of parenthesis to mark an if
statment's border.

MFC after:	1 month
2011-07-14 07:28:49 +00:00
Martin Blapp
545fbf37df Don't compare a char to NULL.
Obtained from:  NetBSD
2003-10-29 09:30:37 +00:00
Alfred Perlstein
4180788ff0 WARNS=3 safety (mostly), use __unused for unused params and unsigned where
needed to avoid warnings about comparing signed and unsigned values.
2002-10-07 02:56:59 +00:00
Ian Dowse
09d4f7789e This is a selection of essentially cosmetic changes:
- Use '\0' for a char instead of NULL.
- Explicitly compare against the global `nullstring' to determine if
  a non-NULL uaddr is not malloc'd.
- Remove some unnecessary casting of the argument to free().
- In rpcbproc_callit_com(), move the freeing of m_uaddr to the
  cleanup code at the end of the function.
- To avoid confusion and  possible alignment problems, change
  netbufdup() to allocate the netbuf struct and the sockaddr buffer
  separately, and change netbuffree() accordingly. This makes it
  produce netbufs that are consistent with all other netbufs in
  rpcbind.
2001-07-14 17:46:52 +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