summaryrefslogtreecommitdiffstats
path: root/lib/libc/xdr
Commit message (Collapse)AuthorAgeFilesLines
* MFC r319369:delphij2017-06-061-5/+25
| | | | | | | | | | | | | | | * limit size of buffers to RPC_MAXDATASIZE * 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. Approved by: re (kib)
* libc/xdr: unsign some loop indexes.pfg2016-05-061-2/+2
| | | | | | Although usually small, values produced by nitems() are unsigned. Unsign inxdeing variables related to nitems() macros to avoid signed vs. unsigned comparisons.
* libc: do not include <sys/types.h> where <sys/param.h> was already includedavos2016-04-181-1/+0
| | | | | | According to style(9): > normally, include <sys/types.h> OR <sys/param.h>, but not both. (<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
* libc: make some more use of the nitems() macro.pfg2016-04-161-12/+8
| | | | | | | | We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
* libc: replace 0 with NULL for pointers.pfg2016-04-101-1/+1
| | | | | | | | | While here also cleanup some surrounding code; particularly drop some malloc() casts. Found with devel/coccinelle. Reviewed by: bde (previous version - all new bugs are mine)
* Bring in initial libc and libstand support for RISC-V.br2016-01-171-6/+0
| | | | | | | Reviewed by: andrew, emaste, kib Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4943
* Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.rodrigc2015-09-201-3/+1
|
* Use proper prototype for harmless().rodrigc2015-05-311-1/+1
|
* Make x_putlong() and x_putbytes() prototypes match therodrigc2015-05-311-2/+2
| | | | prototypes in <rpc/xdr.h>
* Use ANSI C prototypes.rodrigc2015-05-318-275/+116
|
* Add the start of libc and libstand for arm64. Not all of the machineandrew2015-04-071-1/+2
| | | | | | | | dependent functions have been implemented, but this is enough for world. Differential Revision: https://reviews.freebsd.org/D2132 Reviewed by: emaste Sponsored by: The FreeBSD Foundation
* Remove ia64.marcel2014-07-071-1/+1
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}marcel2014-03-041-2/+2
| | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc.
* Replace Sun RPC license with a 3-clause BSD license. This license changehrs2013-12-098-211/+211
| | | | | was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation.
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thiseadler2013-11-301-1/+1
| | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
* 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
|
OpenPOWER on IntegriCloud