summaryrefslogtreecommitdiffstats
path: root/include/rpc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258578, r258580, r258581 (by hrs):mav2014-01-2224-641/+596
| | | | | Replace Sun RPC license in TI-RPC library with a 3-clause BSD license with the explicit permissions.
* rpc: convert all uid and gid variables to u_int.pfg2012-10-042-7/+7
| | | | | | | | | | | After further discussion, instead of pretending to use uid_t and gid_t as upstream Solaris and linux try to, we are better using u_int, which is in fact what the code can handle and best approaches the range of values used by uid and gid. Discussed with: bde Reviewed by: bde
* RPC: Convert all uid and gid variables of the type uid_t and gid_t.pfg2012-10-022-8/+7
| | | | | | | | This matches what upstream (OpenSolaris) does. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) MFC after: 3 days
* Complete revert of r239963:pfg2012-09-272-7/+8
| | | | | | | | | | | | | | | The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. After many hours of selective experiments and inconsistent results the conclusion is that it's better to just revert everything and restart in a future time with a much smaller subset of the changes. ____ MFC after: 3 days Reported by: David Wolfskill Tested by: David Wolfskill
* Revert r240060: (Partial)pfg2012-09-0216-127/+1
| | | | | | | | | | | __BEGIN_DECLS and __END_DECLS in cdefs.h take care of the __cplusplus mangling issues so most of the definitions were redundant. In the few places where they were not redundant we should use BSD style instead of the guards used upstream. Reported by: Yuri Pankov
* Fix RPC headers for C++pfg2012-09-0216-11/+137
| | | | | | | | | C++ mangling will cause trouble with variables like __rpc_xdr in xdr.h so rename this to XDR. While here add proper C++ guards to RPC headers. PR: 137443 MFC after: 2 weeks
* Bring some changes from Bull's NFSv4 libtirpc implementation.pfg2012-09-012-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We especifically ignored the glibc compatibility changes but this should help interaction with Solaris and Linux. ____ Fixed infinite loop in svc_run() author Steve Dickson Tue, 10 Jun 2008 12:35:52 -0500 (13:35 -0400) Fixed infinite loop in svc_run() ____ __rpc_taddr2uaddr_af() assumes the netbuf to always have a non-zero data. This is a bad assumption and can lead to a seg-fault. This patch adds a check for zero length and returns NULL when found. author Steve Dickson Mon, 27 Oct 2008 11:46:54 -0500 (12:46 -0400) ____ Changed clnt_spcreateerror() to return clearer and more concise error messages. author Steve Dickson Thu, 20 Nov 2008 08:55:31 -0500 (08:55 -0500) ____ Converted all uid and gid variables of the type uid_t and gid_t. author Steve Dickson Wed, 28 Jan 2009 12:44:46 -0500 (12:44 -0500) ____ libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed These fields in the rpcbind GETADDR call are being passed uninitialized to CLNT_CALL. In the case of x86_64 at least, this usually leads to a segfault. On x86, it sometimes causes segfaults and other times causes garbage to be sent on the wire. rpcbind generally ignores the r_owner field for calls that come in over the wire, so it really doesn't matter what we send in that slot. We just need to send something. The reference implementation from Sun seems to send a blank string. Have ours follow suit. author Jeff Layton Fri, 13 Mar 2009 11:44:16 -0500 (12:44 -0400) ____ libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. author Jeff Layton Fri, 13 Mar 2009 11:47:36 -0500 (12:47 -0400) Obtained from: Bull GNU/Linux NFSv4 Project MFC after: 3 weeks
* Change some headers such that lang/gcc* ports no longer patch them.tijl2012-02-141-3/+3
| | | | | | | The lang/gcc* ports patch headers where they think something is non-standard. These patched headers override the system headers which means you have to rebuild these ports whenever you do installworld to make sure they contain the latest changes.
* Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessordim2012-02-071-1/+1
| | | | | | set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week
* Spelling fixes for include/uqs2012-01-071-1/+1
|
* Revert the previous change and add xdr_sizeofkevlo2011-07-101-39/+37
| | | | Requested by: bde
* - Add xdr_sizeof(3) to libckevlo2011-07-091-37/+40
| | | | | | - Document xdr_sizeof(3); from NetBSD Discussed with: kib
* Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDRkan2009-06-181-0/+1
| | | | | | | | | | | | | dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI users will be using it. Back out my previous commit to mountd. Turns out the problem was affecting more than one binary so it needs to me addressed in generic rpc code in libc in order to fix them all. Reported by: lstewart Tested by: lstewart
* Implement support for RPCSEC_GSS authentication to both the NFS clientdfr2008-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Initialise the SVCAUTH field for new transport structures when they aredfr2008-09-091-0/+2
| | | | | | | allocated instead of waiting for the first request. This fixes an issue with rpcbind's support for PMAPPROC_CALLIT. Reviewed by: markm
* Add an implementation of the RPCSEC_GSS authentication protocol for RPC. Thisdfr2008-08-064-3/+239
| | | | | | | | 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
* Move rpc/types.h under sys/, as this is used by ZFS kernel module.pjd2007-04-102-107/+1
| | | | Repo-copied by: simon
* Comment the token after #endif, like we do everywhere else.schweikh2007-02-021-6/+6
| | | | | | Static analyzers like FlexeLint complain about it. MFC after: 7 days
* English grammar fix in comment.ume2006-04-291-1/+4
| | | | Submitted by: keramida
* - Extend the nsswitch to support Services, Protocols and Rpcume2006-04-281-6/+1
| | | | | | | | databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
* Const'ify arguments to a couple of functions to fix breakagedeischen2006-02-281-1/+1
| | | | with -O2.
* Change the definition of NULL on ia64 (for LP64 compilations) frommarcel2003-12-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | an int constant to a long constant. This change improves consistency in the following two ways: 1. The first 8 arguments are always passed in registers on ia64, which by virtue of the generated code implicitly widens ints to longs and allows the use of an 32-bit integral type for 64-bit arguments. Subsequent arguments are passed onto the memory stack, which does not exhibit the same behaviour and consequently do not allow this. In practice this means that variadic functions taking pointers and given NULL (without cast) work as long as the NULL is passed in one of the first 8 arguments. A SIGSEGV is more likely the result if such would be done for stack-based arguments. This is due to the fact that the upper 4 bytes remain undefined. 2. All 64-bit platforms that FreeBSD supports, with the obvious exception of ia64, allow 32-bit integral types (specifically NULL) when 64-bit pointers are expected in variadic functions by way of how the compiler generates code. As such, code that works correctly (whether rightfully so or not) on any platform other than ia64, may fail on ia64. To more easily allow tweaking of the definition of NULL, this commit removes the 12 definitions in the various headers and puts it in a new header that can be included whenever NULL is to be made visible. This commit fixes GNOME, emacs, xemacs and a whole bunch of ports that I don't particularly care about at this time...
* Replace the old SCM_CREDS cred procedures. They can now bembr2003-06-151-5/+0
| | | | | | | | | replaced just fine with getpeereid() and the whole code gets a lot simpler. We don't break the ABI, since all server programms use __rpc_get_local_uid(), and we just change library internals. Reviewed by: des
* Clean up some signed/unsigned issues in the XDR code.nectar2003-03-071-1/+1
| | | | Obtained from: OpenBSD
* unifdef -D_THREAD_SAFEfjoe2003-01-241-4/+0
|
* Implement non-blocking tcp-connections.mbr2003-01-162-1/+8
| | | | | | Reviewed by: rwatson Obtained from: NetBSD MFC after: 1 day
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-013-3/+3
| | | | especially in troff files.
* remove #pragma identalfred2002-09-041-2/+0
|
* Remove duplicated '__BEGIN_DECLS' which obviated compilingrobert2002-07-211-1/+0
| | | | | | C++ sources that use this header. Reported by: Jan Stocker <Jan.Stocker@t-online.de>
* clnt_vc_create() has const scalar arguments that wind up being modified,alfred2002-07-141-1/+1
| | | | | | fix it (make them non-const) and update the associated documentation. Submitted by: mbr
* Add functions allowing for the user to specify a timeout for rpc functions.alfred2002-07-111-9/+67
| | | | | | Update copyrights to reflect where this code was lifted from. (tirpc '99) Submitted by: mbr
* Added new bsd.incs.mk which handles installing of header filesru2002-05-121-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to handle symlinking include files. Allow for multiple groups of include files to be installed, with the powerful INCSGROUPS knob. Documentation to follow. Added standard `includes' and `incsinstall' targets, use them in Makefile.inc1. Headers from the following makefiles were not installed before (during `includes' in Makefile.inc1): kerberos5/lib/libtelnet/Makefile lib/libbz2/Makefile lib/libdevinfo/Makefile lib/libform/Makefile lib/libisc/Makefile lib/libmenu/Makefile lib/libmilter/Makefile lib/libpanel/Makefile Replaced all `beforeinstall' targets for installing includes with the INCS stuff. Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS, and for compatibility with NetBSD. Similarly for INCOWN, INCGRP, and INCMODE. Consistently use INCLUDEDIR instead of /usr/include. gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes were only lightly tested due to the missing contrib/libstdc++-v3. I fully tested the pre-WIP_GCC31 version of this patch with the contrib/libstdc++.295 stuff. These changes have been tested on i386 with the -DNO_WERROR "make world" and "make release".
* Spell void * as void * rather than caddr_t. This is complicated by thedes2002-04-284-20/+20
| | | | | | fact that caddr_t is often misspelled as char *. Sponsored by: DARPA, NAI Labs
* Breath deep and take __P out of the system include files.imp2002-03-2320-285/+265
| | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure.
* Constify the first arg to callrpc(3).alfred2002-03-221-1/+1
|
* Tokens after #endif are not strict ISO.obrien2002-03-131-1/+1
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix cc -Wall, fix rcsid warnings, add missing prototypes,alfred2002-02-052-4/+14
| | | | | | | | | change prototypes to be the same as in the original sun tirpc code. Remove ()P macro in a file where the mayority had ()P already removed. Add them if the mayority use ()P macros. Submitted by: mbr Requested by: bde
* Move arguments in prototype out of application namespace.des2002-02-051-1/+1
| | | | Sponsored by: DARPA, NAI Labs
* Add compatibility functions for the AF_LOCAL RPC transport stuffwpaul2001-10-042-0/+15
| | | | | that used to live in RPC 4.0. This is needed for yppasswd and rpc.yppasswdd to work correctly. Patch supplied by Martin Blapp.
* Stop gcc's fixincludes making an exception for this filepeter2001-09-101-2/+3
|
* Add a new clnt_control() request `CLSET_CONNECT' that controlsiedowse2001-06-231-0/+1
| | | | | | | | | | whether or not connect(2) is used for UDP client sockets. The default is not to connect(), so existing clients will see no change in behaviour. The use of connect(2) for UDP clients has a number of advantages: only replies from the intended address are received, and ICMP errors pertaining to the connection are reported back to the application.
* Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transportwpaul2001-03-271-0/+1
| | | | | | | | | | | | | | | | | | to make asynchronous RPCs. This is needed to help fix ypbind, which can no longer override the clnt_dg_call() method (formerly the clntudp_call() method) due to all the internal descriptor locking code in TI-RPC. Turning on this flag allows us to send an RPC request, then return immediately, and handle a reply later, rather than being forced to do the request and reply in a single function call. Also fix a byte ordering bug: when clnt_dg_call() increments the XID prior to transmitting a request, it uses the raw value, which is wrong. The XID is stored in network byte order, i.e. big-endian. The CLSET_XID and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get the byte ordering right, but because clnt_dg_call() does not do this, using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap properly when doing the increment.
* fix: text following `#else' violates ANSI standardalfred2001-03-261-1/+1
| | | | Pointed out by: ${BDECFLAGS}
* change callrpc() from taking "char *" args, I'm quite sure they really meantalfred2001-03-231-2/+2
| | | | | | to use "void *". remove a duplicate prototype for callrpc() from libexec/ypxfr/ypxfr_extern.h
* forgot prototyle for __rpc_get_local_uid()alfred2001-03-221-0/+2
|
* Unbreak LINT.alfred2001-03-201-0/+2
| | | | | | | | | | because rpcb_clnt.h is generated during buildworld and only installed into /usr/include/rpc (and not present in src/include/rpc) we can fix it by simply not including it when _KERNEL is defined. this isn't the most elegant, way and might deserve some revisiting later. Pointed out by: bde
* The TI-RPC spammed over a '#ifdef _KERNEL' hack for the xdrproc_t typedefalfred2001-03-201-1/+6
| | | | | | revert the spammage Pointed out by: bde
* comment out #pragma directive containing Sun SCM tagsalfred2001-03-201-1/+1
|
* Add missing comma when KERBEROS is defined.alfred2001-03-191-1/+2
|
OpenPOWER on IntegriCloud