summaryrefslogtreecommitdiff
path: root/lib/libc/rpc
AgeCommit message (Collapse)Author
2015-09-02Delete 3 more stderr messages, right before returning a proper error.Theo de Raadt
Code from way in the past.
2015-09-02do not printf() on error from libc; ok millertTheo de Raadt
2015-09-01Remove all bogus writes to stderr. Only explicit requests shouldTheo de Raadt
go that way. ok miod beck
2015-09-01Remove calls to perror(); the error returns are sufficient, and theseTheo de Raadt
library may not assume stderr is useable. ok millert miod beck
2015-08-20All these files include <stdlib.h>, so do not need to castTheo de Raadt
malloc/calloc/realloc* returns.
2015-05-18swap calloc() arguments for clarityTheo de Raadt
2015-05-17Use fcntl() to set non-blocking-mode, rather ioctl(). This has a betterTheo de Raadt
chance of working in systrace restricted environments. ok guenther
2015-05-04Use the size of the buffer not the pointer in a call to mem_free().Jonathan Gray
ok miod@ and guenther@ who both pointed out this argument is unused.
2015-04-25Cut the aliases part of /etc/rpc lines before feeding them to strtonum(), forMiod Vallat
it will fail otherwise; ok deraadt@ millert@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2014-11-11Merge from NetBSD from 1999-03-25:"Philip Guenther
* don't close the socket unless it was opened by the function * note (in the comments) that the client is responsible for closing the socket if they opened it, or they didn't use CLNT_DESTROY() fixes a couple of unnecessary closing of already-closed sockets. noted by: Matthias Drochner <M.Drochner@fz-juelich.de>" tested by many in snaps ok schwarze@
2014-11-05missing pfd = newp, diagnosed by deraadt@Stuart Henderson
2014-11-04Fix memory leak on reallocarray() failure introduced by conversionTodd C. Miller
from calloc().
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
ok millert@
2014-10-22We prefer to use call reallocarray() with nmemb first and size second.Todd C. Miller
Requested by guenther@
2014-10-22Use reallocarray() instead of calloc() (originally was realloc).Todd C. Miller
OK deraadt@
2014-10-08obvious conversion of realloc() to reallocarray(). Luckily this isTheo de Raadt
using pollfd, because if this was fd_set... it would not be obvious (or easy)
2014-09-15When fopen()ing internal to libc (the API doesn't support the usePhilip Guenther
of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2013-11-261 << 31 cleanup. Eitan Adler pointed out that there has been aTheo de Raadt
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
2013-11-13bring in protoTheo de Raadt
2013-11-12insert the proper arguments into a prototypeTheo de Raadt
2013-11-12pull in missing includes (math.h, unistd.h, stdlib.h) needed forTheo de Raadt
prototypes
2013-06-05Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzeTed Unangst
2013-04-17add some prototypes, casts, includes, parenthesis, and whatnot toTed Unangst
silence some warnings.
2013-04-16Replace a realloc() + memcpy() with calloc() + memcpy().Todd C. Miller
We don't need to zero pfd but using calloc() gets us overflow protection for free. OK chl@ deraadt@
2013-04-15Back out r1.17 and its subsequent conversion to poll. OtherwiseTodd C. Miller
we can get into a svc_getreq_poll() -> readtcp() -> svc_getreq_poll() loop until we run out of stack. If we want to avoid blocking on the new fd in readtcp() we need to poll() in svc_getreq_poll(), which will require a more elaborate change. OK tedu@
2013-03-11handle ECONNABORTED errors from accept(). In many code blocks they can beTheo de Raadt
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories...
2012-09-27last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;
2012-03-04Drop the rpcauth(3) MLINK, there is no function of that name.Ingo Schwarze
Joint work with and OK haesbaert@ jmc@
2012-02-26Fix several manpage titles, from Lawrence Teo.Christiano F. Haesbaert
ok dcoppa@ jmc@ schwarze@.
2011-07-26At some point we've switched to the VFP floating-point--unlike FPAMartynas Venckus
it actually stores floats in natural-endian--therefore the existing checks became wrong. Take into account __VFP_FP__, effectively bringing back the old behavior. This way it will work now, and in the future when some of our platforms are switched to FPA, where it's much faster.
2011-07-26Assumptions about floating-point word order based on BYTE_ORDER areMartynas Venckus
wrong on ARM. A more elegant solution is pending, but this is good for now. OK miod@.
2010-10-29- the nroff workaround is no longer neededJason McIntyre
- use some Fn and \*(Gt
2010-09-07do not use .B, which is man(7), not mdoc(7); and stop .Tn abuseIngo Schwarze
feedback and ok jmc@, ok millert@
2010-09-01Oracle has re-licensed sunrpc under a three-clause BSD license.Todd C. Miller
Update our sources appropriately. OK deraadt@ jsg@
2010-07-17Correct the #includes to avoid warnings in <rpc/svc.h>Philip Guenthe
ok miod@
2009-12-14Keep all bits of __svc_fdset up to date, not just those beyond FD_SETSIZE.Ingo Schwarze
Bug found while auditing the same complaint by parfait, see the previous commit; still not shutting parfait up. "wow, that's nasty" deraadt@
2009-12-11__svc_fdsetsize is counted in bits, not in array elementsIngo Schwarze
When exceeding fd 1024, this bug cleared flag bits for all file descriptors except those <= 64. Found while auditing a (false positive) complaint by parfait. This bugfix does not shut parfait up, though. OK millert@ deraadt@
2009-06-07Modify the uc_entries allocation check such that the lhs is a constant.Todd C. Miller
OK deraadt@
2009-06-06correct error codes after malloc(3) failure, as 0 means RPC_SUCCESS;Ingo Schwarze
noticed by and OK deraadt@, ok millert@
2009-06-06use calloc() and realloc() more; ok schwarzeTheo de Raadt
2009-06-05use calloc() to provide size * nitems safetyTheo de Raadt
2009-06-05use calloc() to provide size * nitems safety; ok millertTheo de Raadt
2009-06-04Proper error handling in clntraw_create:Ingo Schwarze
Bail out and clean up after all errors, and report in libc/rpc style. Among others, this fixes a NULL pointer dereference in clntraw_call. Feedback and ok kjell@ and millert@.
2009-06-03State that clnt{raw,udp}_create can fail.Ingo Schwarze
"no objection" millert@
2009-06-03Don't postpone memory allocation for the error message to the error handler:Ingo Schwarze
That way, memory exhaustion simply cannot be reported because it would require to... allocate memory. Instead, really use a statical buffer as it is advertised in the manual. "looks good" millert@