summaryrefslogtreecommitdiffstats
path: root/lib/libc/xdr
Commit message (Collapse)AuthorAgeFilesLines
* Add a HISTORY sectionkevlo2011-07-101-0/+5
| | | | Requested by: arundel
* - Add xdr_sizeof(3) to libckevlo2011-07-094-4/+22
| | | | | | - Document xdr_sizeof(3); from NetBSD Discussed with: kib
* Implement support for RPCSEC_GSS authentication to both the NFS clientdfr2008-11-032-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add an implementation of the RPCSEC_GSS authentication protocol for RPC. Thisdfr2008-08-061-12/+13
| | | | | | | | 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
* Don't assume that there is readable data on the stream after thedfr2008-03-301-0/+6
| | | | fragment header.
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-2/+4
|
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+45
| | | | Reviewed by: davidxu
* Fix prototypes.ru2005-11-241-2/+2
|
* Enable building with LIBC_SCCS defined.obrien2004-10-167-10/+7
| | | | Bug submitted by: Andrea Campi <andrea+freebsd_current@webcom.it>
* We use __arm__, not __arm32__.cognet2004-05-141-1/+1
|
* When writing/reading longs use explicit 32bit temporary values.mbr2004-01-241-3/+4
| | | | | | | | MFNetBSD rev. 1.15 + rev 1.16 PR: bin/60901 Submitted by: Logan Gabriel <gersh@sonn.com> Obtained from: NetBSD
* Fix amd(8) clients, if a FreeBSD mountd(8) server is used.mbr2003-05-281-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add __amd64__ to the list of things that use IEEEFPpeter2003-04-301-1/+1
|
* Clean up some signed/unsigned issues in the XDR code.nectar2003-03-072-11/+17
| | | | Obtained from: OpenBSD
* Eliminate 19 warnings in libc (at level WARNS=2) of thenectar2003-02-271-0/+1
| | | | `implicit declaration of function' variety.
* Reset the record lenght and received bytes once a recordmbr2003-01-271-0/+9
| | | | | | | | | | 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
* Implement non-blocking tcp-connections.mbr2003-01-161-13/+178
| | | | | | Reviewed by: rwatson Obtained from: NetBSD MFC after: 1 day
* mdoc(7) police: "The .Fa argument.".ru2002-12-191-13/+22
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-0/+2
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-3/+1
|
* Removed duplicated MLINKS which make(1) recently started warning about.bde2002-08-151-2/+0
|
* The fix applied to the XDR decoder in revision 1.11 was incorrect.nectar2002-08-011-1/+1
|
* Sort headers to reduce diffs between branches.nectar2002-07-311-1/+1
|
* some dolt forgot to add in an include for <limits.h>darrenr2002-07-311-0/+1
|
* Patch to fix bounds checking/overflow.darrenr2002-07-311-3/+4
| | | | Obtained from: OpenBSD
* Spell void * as void * rather than caddr_t. This is complicated by thedes2002-04-282-9/+7
| | | | | | fact that caddr_t is often misspelled as char *. Sponsored by: DARPA, NAI Labs
* Fix the style of the SCM ID's.obrien2002-03-228-25/+29
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove __P() usage.obrien2002-03-213-37/+37
|
* Add ifdefs for sparc64.jake2002-02-231-1/+1
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed various type errors in synopsis.bde2001-10-031-7/+7
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-2/+2
|
* Fix a comment within a comment warning due to a missing "*/".deischen2001-04-101-1/+1
|
* MAN[1-9] -> MAN.ru2001-03-271-1/+1
|
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-1910-406/+646
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use ieee floats on ia64.dfr2001-03-061-1/+1
|
* mdoc(7) police: print #ifdef/#endif literally,ru2001-02-081-3/+3
| | | | and as list items (to get the correct offset).
* Fixed errors in prototypes. Many were hiding under mdoc errors.bde2001-02-051-0/+4
|
* man(7) -> mdoc(7).ru2001-01-181-583/+475
|
* Do proper byte swapping in 64bit routines.sheldonh2000-04-121-14/+23
| | | | | | PR: 17681 Submitted by: "David E. Cross" <crossd@cs.rpi.edu> Obtained from: NetBSD
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-021-12/+24
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Close PR#16028. Make the sanity check saner. The condition that wewpaul2000-01-191-1/+1
| | | | | | | | | 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
* $Id$ -> $FreeBSD$peter1999-08-289-9/+9
|
* Add support for the RPC 64-bit integer type ``hyper''.obrien1998-09-081-1/+57
|
* Change the sanity test here. It's not correct to assume that the recordwpaul1998-05-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Patch RPC library to avoid possible denial of service attacks as describedwpaul1998-05-151-1/+7
| | | | | | | | | | | | 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.
* Cast a pointer to a long, not an int and make the arg passed to the functionjb1998-05-111-2/+2
| | | | a long too (it does have a proper prototype).
* Removed the subdirectory paths from the definitions of MAN[1-9]. Theybde1997-10-151-3/+2
| | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago.
* Restore Id.wpaul1997-05-281-0/+1
| | | | Pointed out by: bde
OpenPOWER on IntegriCloud