aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/xdr/xdr.c
Commit message (Collapse)AuthorAgeFilesLines
* libc(xdr.c): fix "discriminated" spellingrilysh2024-04-121-1/+1
| | | | | | | | From "descriminated" to "discriminated". Signed-off-by: rilysh <nightquick@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
* lib: Remove ancient SCCS tags.Warner Losh2023-11-271-4/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* libc: Purge unneeded cdefs.hWarner Losh2023-11-011-1/+0
| | | | | | | | | These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* xdr: store chars consistentlyBrooks Davis2023-01-121-4/+4
| | | | | | | | | | | | | | | | | | Cast char's through unsigned char before storing as an integer in xdr_char(), this ensures that the encoded form is consistently not sign-extended following Open Solaris's example. Prior to this change, platforms with signed chars would sign extend values with the high bit set but ones with unsigned chars would not so 0xff would be stored as 0x000000ff on unsigned char platforms and 0xffffffff on signed char platforms. Decoding has the same result for either form so this is a largely cosmetic change, but it seems best to produce consistent output. For more discussion, see https://github.com/openzfs/zfs/issues/14173 Reviewed by: mav, imp Differential Revision: https://reviews.freebsd.org/D37992
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* * limit size of buffers to RPC_MAXDATASIZEXin LI2017-06-011-5/+25
| | | | | | | | | | | | | | | | | | | * don't leak memory * be more picky about bad parameters From: https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt via NetBSD. Reviewed by: emaste, cem (earlier version) Differential Revision: https://reviews.freebsd.org/D10922 MFC after: 3 days Notes: svn path=/head/; revision=319369
* Use ANSI C prototypes.Craig Rodrigues2015-05-311-97/+37
| | | | Notes: svn path=/head/; revision=283833
* Replace Sun RPC license with a 3-clause BSD license. This license changeHiroki Sato2013-12-091-26/+26
| | | | | | | | was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Notes: svn path=/head/; revision=259118
* Implement support for RPCSEC_GSS authentication to both the NFS clientDoug Rabson2008-11-031-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=184588
* Enable building with LIBC_SCCS defined.David E. O'Brien2004-10-161-1/+1
| | | | | | | Bug submitted by: Andrea Campi <andrea+freebsd_current@webcom.it> Notes: svn path=/head/; revision=136582
* Spell void * as void * rather than caddr_t. This is complicated by theDag-Erling Smørgrav2002-04-281-4/+2
| | | | | | | | | fact that caddr_t is often misspelled as char *. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=95658
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-4/+4
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andAlfred Perlstein2001-03-191-114/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=74462
* Do proper byte swapping in 64bit routines.Sheldon Hearn2000-04-121-14/+23
| | | | | | | | | PR: 17681 Submitted by: "David E. Cross" <crossd@cs.rpi.edu> Obtained from: NetBSD Notes: svn path=/head/; revision=59165
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Add support for the RPC 64-bit integer type ``hyper''.David E. O'Brien1998-09-081-1/+57
| | | | Notes: svn path=/head/; revision=38952
* Resolve conflicts.Bill Paul1997-05-281-1/+1
| | | | Notes: svn path=/head/; revision=26218
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* - Missing prototypes, including pointers to functionsPeter Wemm1996-12-301-37/+177
| | | | | | | | | | | - 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. Notes: svn path=/head/; revision=21062
* minor cleanup, #includes.Poul-Henning Kamp1995-10-221-1/+2
| | | | Notes: svn path=/head/; revision=11669
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-9/+9
| | | | Notes: svn path=/head/; revision=8870
* Moving RPC stuff into libc, part 2.Garrett Wollman1994-08-071-0/+578
Notes: svn path=/head/; revision=1902