summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
Commit message (Collapse)AuthorAgeFilesLines
...
* Plug a leak.kib2012-05-081-2/+5
| | | | | Submitted by: Greg Bednarek <gbednarek averesystems com> MFC after: 1 week
* Fix several memory and lock leaks on the out of memory condition.kib2012-04-282-2/+22
| | | | | Reported by: Matt Miller <matt matthewjmiller net> MFC after: 1 week
* Remove unnecessary Xo/Xc.joel2012-03-291-10/+5
| | | | Reviewed by: brueffer
* Minor mdoc nit.joel2012-03-271-1/+1
|
* Globally replace u_int*_t from (non-contributed) man pages.ed2012-02-122-10/+10
| | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month
* 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
* In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicitdim2011-12-151-2/+2
| | | | | | | | | conversion between enum desdir/desmode from include/rpc/des.h, and enum desdir/desmode from include/rpcsvc/crypt.x. These are actually different enums, with different value names, but by accident the integer representation of the enum values happened to be the same. MFC after: 1 week
* Fix a bug in the userland rpc library, where it would use armacklem2011-04-101-1/+2
| | | | | | | | | | | | negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Submitted by: simon at comsys.ntu-kpi.kiev.ua MFC after: 2 weeks
* Revert most of r210764, now that mdocml does the rightuqs2010-12-281-1/+1
| | | | | | thing with empty quotation macros. Requested by: Alex Kozlov
* Move most of the remaining USD/PSD/SMM papers into share/docuqs2010-12-047-9696/+0
|
* mdoc: make sure to pass at least one argument to quotation macrosuqs2010-08-021-1/+1
|
* Fix a bug in the previous change: remove function-local definition ofjhb2010-03-111-1/+0
| | | | | | | tcp_key and udp_key that shadows the global definition. PR: threads/144558 Submitted by: Sam Robb
* Use thr_once() with once_t controls to initialize various thread_key_tjhb2010-03-108-64/+81
| | | | | | | | | | | | objects used to provide per-thread storage in the RPC code. Almost all of these used double-checking with a dedicated mutex (tsd_lock) to do this before. However, that is not always safe with more relaxed memory orders. There were also other bugs, such as one in __rpc_createrr() that caused a new key to be allocated each time __rpc_createrr() was invoked. PR: threads/144558 Reported by: Sam Robb samrobb of averesystems com (key leak) MFC after: 1 week
* Use the correct types to store uids and gids in the credential cache.brooks2010-01-091-4/+4
|
* Fix a double free().brueffer2010-01-051-1/+1
| | | | | | PR: 142339 Submitted by: Henning Petersen <henning.petersen@t-online.de> MFC after: 2 weeks
* The fd_mask type is an unsigned long, not an int, so treat the mask as ajhb2009-12-031-2/+2
| | | | | | | | | | long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. PR: amd64/141130 Submitted by: liujb of array networks MFC after: 3 days
* Style: use structure assignment rather than memcpy() to copy awollman2009-11-251-1/+1
| | | | structure.
* In clnt_raw_create(), avoid minor race condition initializing thewollman2009-11-251-4/+7
| | | | | | | file-scope variable clntraw_private. Found by: Clang static analyzer MFC after: 7 days
* In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTEDwollman2009-11-251-3/+2
| | | | | | | && SUCCESS case succeeds. The stack garbage might be zero. Found by: Clang static analyzer MFC after: 7 days
* Eliminate more dead stores.wollman2009-11-252-3/+3
| | | | | Found by: Clang static analyzer MFC after: 7 days
* Lock around access to nc_file and netconfig_info ("ni"). The RPCdelphij2009-06-241-3/+49
| | | | | | | | | part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun <snnn119 gmail com> MFC after: 2 weeks
* Rework the credential code to support larger values of NGROUPS andbrooks2009-06-192-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024 and 1023 respectively. (Previously they were equal, but under a close reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it is the number of supplemental groups, not total number of groups.) The bulk of the change consists of converting the struct ucred member cr_groups from a static array to a pointer. Do the equivalent in kinfo_proc. Introduce new interfaces crcopysafe() and crsetgroups() for duplicating a process credential before modifying it and for setting group lists respectively. Both interfaces take care for the details of allocating groups array. crsetgroups() takes care of truncating the group list to the current maximum (NGROUPS) if necessary. In the future, crsetgroups() may be responsible for insuring invariants such as sorting the supplemental groups to allow groupmember() to be implemented as a binary search. Because we can not change struct xucred without breaking application ABIs, we leave it alone and introduce a new XU_NGROUPS value which is always 16 and is to be used or NGRPS as appropriate for things such as NFS which need to use no more than 16 groups. When feasible, truncate the group list rather than generating an error. Minor changes: - Reduce the number of hand rolled versions of groupmember(). - Do not assign to both cr_gid and cr_groups[0]. - Modify ipfw to cache ucreds instead of part of their contents since they are immutable once referenced by more than one entity. Submitted by: Isilon Systems (initial implementation) X-MFC after: never PR: bin/113398 kern/133867
* In preparation for raising NGROUPS and NGROUPS_MAX, change basebrooks2009-06-191-6/+12
| | | | | | | | | | | | | | | | | | | | | | system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. MFC after: 2 weeks
* Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDRkan2009-06-182-21/+36
| | | | | | | | | | | | | 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
* Do not attempt to set source address on outgoing messageskan2009-06-081-2/+2
| | | | on UDP socket if we do not have a valid IP address.
* Match type for socket option (in practice, unnecessary, but stylistically ↵zml2009-05-281-1/+1
| | | | | | | it's a little nicer). Suggested by: jilles Approved by: dfr (mentor)
* Handle UDP RPC replies correctly on a multi-homed system, in userland RPC. ↵zml2009-05-272-6/+107
| | | | | | Corrects an issue with mountd replies to OS X. Approved by: dfr (mentor)
* Include a space between "send" and "broadcast".emaste2009-04-091-1/+1
|
* Remove a warning which is supposed to have been removed on 20030301.delphij2009-04-021-12/+0
|
* Fix async mode (required for ypbind in manycast mode).dfr2008-09-151-2/+2
|
* Initialise the SVCAUTH field for new transport structures when they aredfr2008-09-092-2/+3
| | | | | | | 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-0611-79/+347
| | | | | | | | 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 call xdrrec_skiprecord in the non-blocking case. Ifdfr2008-03-301-1/+2
| | | | | | | | | | | __xdrrec_getrec has returned TRUE, then we have a complete request in the buffer - calling xdrrec_skiprecord is not necessary. In particular, if there is another record already buffered on the stream, xdrrec_skiprecord will discard both this request and the next one, causing the call to xdr_callmsg to fail and the stream to be closed. Sponsored by: Isilon Systems
* Use intermediate pointers to avoid strict alias type check failuresjb2007-11-207-15/+47
| | | | | using gcc 4.2. This is required for tinderbox which doesn't have -fno-strict-aliasing in it's custom CFLAGS.
* Fix some improper handling of malloc failuresmatteo2007-09-205-30/+53
| | | | | | | PR: bin/83344 , kern/81987 Reviewed by: alfred Approved by: re (kensmith) MFC after: 1 week
* Use an array of size NGROUP_MAX for the getgroups() call instead of NGRP.harti2007-06-141-2/+4
| | | | | When NGROUP_MAX is larger than NGRP the call used to fail. Now the call succeedes, but only the first NGRP groups are actually used for authentication.
* Some libc symbol map cleanups.deischen2007-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | net: endhostdnsent is named _endhostdnsent and is private to netdb family of functions. posix1e: acl_size.c has been never compiled in, so there's no "acl_size". rpc: "getnetid" is a static function. stdtime: "gtime" is #ifdef'ed out in the source. some symbols are specific only to some architectures, e.g., ___tls_get_addr is only defined on i386. __htonl, __htons, __ntohl and __ntohs are no longer functions, they are now (internal) defines in <machine/endian.h>. Submitted by: ru
* endrpcent belongs with rpc name service db, not services.jon2007-05-171-1/+1
| | | | MFC after: 1 week
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-7/+11
|
* Disable RPC exponential back-off for FreeBSD.org systems (IE. hiddensimon2007-03-041-0/+7
| | | | | | | | | | | | | behind _FREEFALL_CONFIG). This is done mainly to make NIS even more resistant to packet loss. This is not enabled by default for "normal" FreeBSD since it might cause the server providing the RPC service to be hit heavily with RPC traffic in case of problems. freefall.FreeBSD.org and hub.FreeBSD.org have been running with a patch similar to this for a couple of weeks. MFC after: 1 week Discussed with: peter
* o Remove duplicate includes.maxim2007-01-202-2/+0
| | | | Obtained from: Slava Semushin via NetBSD
* Markup fixes.ru2006-09-171-1/+1
|
* Sync with NetBSD rev. 1.16 + 1.17mbr2006-09-091-2/+5
| | | | | | | | Coverity CID 2292: Plug memory leak. Coverity CID 2291: Move function call before allocating storage to prevent memory leak on error. MFC after: 1 month
* Sync with NetBSD rev. 1.29mbr2006-09-091-0/+4
| | | | | | Coverity CID 2293: Fix memory leak. MFC after: 1 month
* Sync with NetBSD rev. 1.6 + 1.7mbr2006-09-091-4/+4
| | | | | | Coverity CID 779 + 780: Avoid NULL pointer dereference. MFC after: 1 month
* Sync with NetBSD rev. 1.20 + 1.21mbr2006-09-091-6/+11
| | | | | | | Coverity CID 2284: Fix multiple memory leaks. Coverity CID 710: Remove unreachable code. MFC after: 1 month
* Sync with NetBSD rev. 1.10mbr2006-09-091-0/+1
| | | | | | Coverity CID 2276: Don't leak memory on error. MFC after: 1 month
* Sync with NetBSD rev. 1.15mbr2006-09-091-0/+1
| | | | | | Coverity CID 2275: Avoid memory leak on error. MFC after: 1 month
* Sync part of NetBSD rev. 1.14mbr2006-09-091-1/+1
| | | | | | | Fix unpaired sigblock which possibly leaves the process with all signals blocked. MFC after: 2 weeks
* Sync with NetBSD rev. 1.16 + 1.17mbr2006-09-091-1/+4
| | | | | | | Coverity CID 3651: Don't leak ifaddrs on getaddrinfo failure. Coverity CID 2283: Don't leak sys_auth on error. MFC after: 1 month
OpenPOWER on IntegriCloud