History log of /freebsd-10.0-release/lib/libc/xdr/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

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

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


223903 10-Jul-2011 kevlo

Add a HISTORY section

Requested by: arundel


223877 09-Jul-2011 kevlo

- Add xdr_sizeof(3) to libc
- Document xdr_sizeof(3); from NetBSD

Discussed with: kib


184588 03-Nov-2008 dfr

Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager. I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by: Isilon Systems
MFC after: 1 month


181344 06-Aug-2008 dfr

Add an implementation of the RPCSEC_GSS authentication protocol for RPC. This
is based on an old implementation from the University of Michigan with lots of
changes and fixes by me and the addition of a Solaris-compatible API.

Sponsored by: Isilon Systems
Reviewed by: alfred


177736 30-Mar-2008 dfr

Don't assume that there is readable data on the stream after the
fragment header.


169092 29-Apr-2007 deischen

Use C comments since we now preprocess these files with CPP.


156613 13-Mar-2006 deischen

Add each directory's symbol map file to SYM_MAPS.


156608 13-Mar-2006 deischen

Add symbol maps and initial symbol version definitions to libc.

Reviewed by: davidxu


152749 24-Nov-2005 ru

Fix prototypes.


136582 16-Oct-2004 obrien

Enable building with LIBC_SCCS defined.

Bug submitted by: Andrea Campi <andrea+freebsd_current@webcom.it>


129201 14-May-2004 cognet

We use __arm__, not __arm32__.


124897 24-Jan-2004 mbr

When writing/reading longs use explicit 32bit temporary values.

MFNetBSD rev. 1.15 + rev 1.16

PR: bin/60901
Submitted by: Logan Gabriel <gersh@sonn.com>
Obtained from: NetBSD


115363 28-May-2003 mbr

Fix amd(8) clients, if a FreeBSD mountd(8) server is used.

Remove the special treatment of non-blocking mode in
the "look ahead function" xdrrec_eof(). It currently
assumes that the last read() in a row of several reads
does not have zero lenght. If this is the case, svc_vc_stat()
does return XPRT_MOREREQS, and the RPC-request aborts because
there is no data to read anymore.

To fix this, go back to the original version of the code
for non-blocking mode until NetBSD comes up with another
possible fix like this one in xdrrec_eof()

if (rstrm->last_frag && rstrm->in_finger == rstrm->in_boundry) {
return TRUE;
}

Return always FALSE in set_input_fragment() for non-blocking
mode. Since this was not used in FreeBSD, I omitted it at the
first time. Now we use this function and we should always
return FALSE for it.

Reviewed by: rwatson
Approved by: re


114322 30-Apr-2003 peter

Add __amd64__ to the list of things that use IEEEFP


111962 07-Mar-2003 nectar

Clean up some signed/unsigned issues in the XDR code.

Obtained from: OpenBSD


111618 27-Feb-2003 nectar

Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.


109950 27-Jan-2003 mbr

Reset the record lenght and received bytes once a record
is finished. This fixes clients doing two RPCs over the
same connection at the same time. Without this fix, we
could end with a reply to old data.

Submitted by: Frank van der Linden <fvdl@netbsd.org>
Reviewed by: rwatson
Obtained from: NetBSD


109359 16-Jan-2003 mbr

Implement non-blocking tcp-connections.

Reviewed by: rwatson
Obtained from: NetBSD
MFC after: 1 day


108087 19-Dec-2002 ru

mdoc(7) police: "The .Fa argument.".


108037 18-Dec-2002 ru

mdoc(7) police: "The .Fn function".


107052 18-Nov-2002 ru

libc_r wasn't so tied to libc for 22 months.


101916 15-Aug-2002 bde

Removed duplicated MLINKS which make(1) recently started warning about.


101147 01-Aug-2002 nectar

The fix applied to the XDR decoder in revision 1.11 was incorrect.


101067 31-Jul-2002 nectar

Sort headers to reduce diffs between branches.


101062 31-Jul-2002 darrenr

some dolt forgot to add in an include for <limits.h>


101045 31-Jul-2002 darrenr

Patch to fix bounds checking/overflow.

Obtained from: OpenBSD


95658 28-Apr-2002 des

Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by: DARPA, NAI Labs


92986 22-Mar-2002 obrien

Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.


92905 21-Mar-2002 obrien

Remove __P() usage.


91161 23-Feb-2002 jake

Add ifdefs for sparc64.


90868 18-Feb-2002 mike

o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm


84426 03-Oct-2001 bde

Fixed various type errors in synopsis.


84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


75366 10-Apr-2001 deischen

Fix a comment within a comment warning due to a missing "*/".


74870 27-Mar-2001 ru

MAN[1-9] -> MAN.


74462 19-Mar-2001 alfred

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


73884 06-Mar-2001 dfr

Use ieee floats on ia64.


72157 08-Feb-2001 ru

mdoc(7) police: print #ifdef/#endif literally,
and as list items (to get the correct offset).


72048 05-Feb-2001 bde

Fixed errors in prototypes. Many were hiding under mdoc errors.


71216 18-Jan-2001 ru

man(7) -> mdoc(7).


59165 12-Apr-2000 sheldonh

Do proper byte swapping in 64bit routines.

PR: 17681
Submitted by: "David E. Cross" <crossd@cs.rpi.edu>
Obtained from: NetBSD


57686 02-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


56273 19-Jan-2000 wpaul

Close PR#16028. Make the sanity check saner. The condition that we
check for on the server may arise legitimately on the client. The
correct way to check for a zero record length is to check for it
without the LAST_FRAG marker in it, since it's legal to send a LAST_FRAG
marker with 0 bytes of data.

PR: misc/16028


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


38952 08-Sep-1998 obrien

Add support for the RPC 64-bit integer type ``hyper''.


36257 20-May-1998 wpaul

Change the sanity test here. It's not correct to assume that the record
size we receive here should fit into the receive buffer. Unfortunately,
there's no 100% foolproof way to distinguish a ridiculously large record
size that a client actually meant to send us from a ridiculously large
record size that was sent as a spoof attempt.

The one value that we can positively identify as bogus is zero. A
zero-sized record makes absolutely no sense, and sending an endless
supply of zeroes will cause the server to loop forever trying to
fill its receive buffer.

Note that the changes made to readtcp() make it okay to revert this
sanity test since the deadlock case where a client can keep the server
occupied forever in the readtcp() select() loop can't happen anymore.
This solution is not ideal, but is relatively easy to implement. The
ideal solution would be to re-arrange the way dispatching is handled
so that the select() loop in readtcp() can be eliminated, but this is
difficult to implement. I do plan to implement the complete solution
eventually but in the meantime I don't want to leave the RPC library
totally vulnerable.

That you very much Sun, may I have another.


36087 15-May-1998 wpaul

Patch RPC library to avoid possible denial of service attacks as described
recently in BUGTRAQ. The set_input_fragment() routine in the XDR record
marking code blindly trusts that the first two bytes it sees will in fact
be an actual record header and that the specified size will be sane. In
fact, if you just telnet to a listening port of an RPC service and send a
few carriage returns, set_input_fragment() will obtain a ridiculously large
record size and sit there for a long time trying to read from the network.

A sanity test is required: if the record size is larger than the receive
buffer, punt.


35941 11-May-1998 jb

Cast a pointer to a long, not an int and make the arg passed to the function
a long too (it does have a proper prototype).


30447 15-Oct-1997 bde

Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.


26249 28-May-1997 wpaul

Restore Id.

Pointed out by: bde


26218 28-May-1997 wpaul

Resolve conflicts.


26217 28-May-1997 wpaul

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


25401 03-May-1997 jb

Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.


22993 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

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.


21062 30-Dec-1996 peter

- Missing prototypes, including pointers to functions
- 64 bit long type safe (wire protocols specified in explicit sized types)
- Support systems that don't do unaligned accesses
- Support for explicit int16 and int32 sizes in xdr

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.


21061 30-Dec-1996 peter

xdr manpage links

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.


18718 05-Oct-1996 wosch

delete doubled words, e.g.: "the the" -> "the"


14040 12-Feb-1996 mpp

Minor cleanup of the rpc man pages to silence manck.


11669 22-Oct-1995 phk

minor cleanup, #includes.


9645 22-Jul-1995 bde

Confirmed to work by: rcarter@geli.com (Russell Carter)

Enable xdr_float.c. I believe it works on i386's although it isn't
portable enough to be in a machine-independent directory.


8870 30-May-1995 rgrimes

Remove trailing whitespace.


1916 07-Aug-1994 wollman

More directory cleanup after YP merge.


1902 07-Aug-1994 wollman

Moving RPC stuff into libc, part 2.