summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
Commit message (Collapse)AuthorAgeFilesLines
* whitespace cleanupalfred2001-03-201-16/+14
|
* Fixed some typos.ru2001-03-203-3/+3
|
* This manpage is heavily based on the old rpc.3 manpage, andru2001-03-201-1355/+1139
| | | | | | | should have been repo-copied from it in the first place. Apply all of our fixes up to and including revision 1.14 to the original rpc.3 manpage, including conversion to mdoc(7).
* Removed the second copy of the manual page!ru2001-03-201-311/+0
|
* Removed duplicate $FreeBSD$.ru2001-03-201-1/+0
|
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-1980-6851/+16088
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Submitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>dec2001-03-082-0/+2
| | | | | | | | | | | | | Reviewed by: David Cross <dec@freebsd.org>, jkh <jkh@freebsd.org> Approved by: jkh <jkh@freebsd.org> Obtained from: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org> We have been running this patch on a production NIS server for 2.5 weeks now. Normally we would have ypserv die at least once a week, and often many times a day. This patch treats and error from select as zeroing out the FD_SET to indicate that no fds are ready for reading. This is safe because the rpc code always re-inits the FDSET before calling select.
* mdoc(7) police: C types should be declared with either .Ft or .Vt.ru2001-02-081-1/+3
|
* Fixed errors in prototypes. Many were hiding under mdoc errors.bde2001-02-051-5/+30
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-2421-78/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* man(7) -> mdoc(7).ru2001-01-175-1416/+1143
|
* rstat(1) and rstat_svc(8) are the early versions ofru2001-01-173-88/+0
| | | | the rup(1) and rpc.rstatd(8) manpages respectively.
* Prepare for mdoc(7)NG.ru2000-12-291-1/+1
|
* mdoc(7) police: added missing .Os call.ru2000-12-142-0/+2
|
* Upgrade to groff 1.16.1.ru2000-12-061-8/+1
|
* Eliminate groff(1) warnings.ru2000-11-247-49/+77
|
* mdoc(7) police: fixed warning.ru2000-11-201-1/+1
|
* mdoc(7) police: Nm -> Fn where appropriate.ru2000-11-201-1/+1
|
* strtok() -> strsep() (no strtok() in libraries allowed)ache2000-08-292-16/+26
| | | | | | small cleanup in nearby area: pointer 0 -> NULL, according to manpages hardcoded constant -> sizeof(buf)
* Calculate the string length of a u_long at compile-time, instead of using akris2000-08-041-5/+17
| | | | hardcoded value.
* Correct string length bounds checking.kris2000-08-041-3/+5
|
* Don't overflow the internal buffer in clnt_sperror()kris2000-08-041-1/+1
|
* Replace structure copy form ifreq obtained by SIOCGIFADDRshin2000-03-032-2/+2
| | | | | | to memcpy(), to avoid unaligned access trap on alpha. Approved by: jkh
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-026-48/+96
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Grammar fix: ``Different than'' should really be ``different from''.chris2000-01-291-1/+1
|
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-2715-36/+36
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* Fixed wrong includes in synopsis.bde2000-01-271-8/+11
| | | | | | | | | | | Updated date. 1987 was a while ago. Removed trailing comma in NAME section. Uncapitalised Bindresvport and Bindresvport_sa in DESCRIPTION section. Don't use .Nm there either. Added bindresvport_sa() to the RETURN VALUES and ERROR sections.
* bindresvport related changesshin2000-01-263-73/+136
| | | | | | | | | | -changed bindresvport2 to bindresvport_sa -merged the man into bindresvport.3 All discussion between Jean-Luc Richier <Jean-Luc.Richier@imag.fr>, Theo de Raadt <deraadt@cvs.openbsd.org>, itojun, is reflected to this code. (Actually Theo de Raadt write the code simultaneously as the discussion change.)
* libc rcmd update for IPv6.shin2000-01-133-18/+63
| | | | | | | | A new function bindresvport2(), AF independent version of bindresvport() is also added. Reviewed by: sumikawa Obtained from: KAME project
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-1215-36/+40
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-292-4/+9
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Commented outnik1999-12-141-1/+1
| | | | | | | | | | | | | MAN8+= rstat_svc.8 The file it talks about doesn't exist on FreeBSD, so there's no point in installing the manual page. There was already a comment to this effect in this file, but the entry hadn't been commented out. rstat.1 and rstat_svc.8 can probably actually be removed. PR: docs/13767 Submitted by: Seth <seth@freebie.dp.ny.frb.org>
* For the TCP transport, put the listening socket in non-blockingjdp1999-11-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | mode. This addresses a well-known race condition that can cause servers to hang in accept(). The relevant case is when somebody connects to the server and then immediately kills the connection by sending a TCP reset. On the server this causes select to report a ready condition on the socket, after which the accept call blocks because there is no longer any pending connection to accept. In -current there is already a work-around for this in the kernel. It was merged into -stable some time ago, but then David Greenman reverted it because it seemed to be causing a socket leak in some cases. (See uipc_socket.c revision 1.51.2.3.) Hence this userland fix is needed in -stable, and I plan to merge it into that branch soon because it fixes a potential DoS attack. It may also be needed in -current if the suspected socket leak turns out to be real. In any case, after thinking it over I believe the fix belongs in userland. An application shouldn't assume that a ready return from select guarantees that the subsequent I/O operation cannot block. A lot can happen between the select and the accept. A similar fix should most likely be applied to the Unix domain socket transport too. Submitted by: peter Reviewed by: jdp
* Fix a bug in the hack that protects against FTP bounce attacks.jdp1999-11-171-3/+2
| | | | | | | | | It used to loop back up to the accept() call and block there, shutting out all other transports until a new connection came in. Now it returns instead after dropping the connection. That will take it back to the select() loop where all transports can be serviced. I intend to MFC this within a day or two since it fixes a DoS vulnerability.
* $Id$ -> $FreeBSD$peter1999-08-2850-51/+51
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-1212-1/+20
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Document type for 'req' argument to clnt_control.alex1999-01-311-0/+1
|
* s/yellow pages/NIS/phk1998-09-171-3/+2
| | | | | | PR: 7949 Reviewed by: phk Submitted by: Norihiro Kumagai <kuma@jp.freebsd.org>
* Fixed printf format errors.bde1998-06-302-5/+5
|
* Fixed scanf format errors. The error handling is not quite bug for bugbde1998-06-301-7/+4
| | | | | | compatible. I think small negative uids are handled compatibly but other out of bounds ones are truncated differently for certain sizes of uid_t.
* Fix potential resource leak: when call to des_crypt_1() fails, rememberwpaul1998-06-091-2/+3
| | | | to destroy the RPC CLIENT handle before returning.
* The incorrect select() timeout calculation that I fixed in svc_tcp.cwpaul1998-05-211-2/+2
| | | | | also exists here (the timeout can expire much sooner than it's supposed to).
* Replace the getpublickey() stub with the real thing.wpaul1998-05-181-33/+160
|
* Improve DoS avoidance in RPC stream oriented transports. The TCP transportwpaul1998-05-182-34/+70
| | | | | | | | | | | | | | | | | | | | | | uses readtcp() to gather data from the network; readtcp() uses select(), with a timeout of 35 seconds. The problem with this is that if you connect to a TCP server, send two bytes of data, then just pause, the server will remain blocked in readtcp() for up to 35 seconds, which is sort of a long time. If you keep doing this every 35 seconds, you can keep the server occupied indefinitely. To fix this, I modified readtcp() (and its cousin, readunix() in svc_unix.c) to monitor all service transport handles instead of just the current socket. This allows the server to keep handling new connections that arrive while readtcp() is running. This prevents one client from potentially monopolizing a server. Also, while I was here, I fixed a bug in the timeout calculations. Someone attempted to adjust the timeout so that if select() returned EINTR and the loop was restarted, the timeout would be reduced so that rather than waiting for another 35 seconds, you could never wait for more than 35 seconds total. Unfortunately, the calculation was wrong, and the timeout could expire much sooner than 35 seconds.
* Patch RPC library to avoid possible denial of service attacks as describedwpaul1998-05-152-2/+4
| | | | | | recently in BUGTRAQ. If a stream oriented transport fails to properly decode an RPC message header structure where there should be one, it should mark the stream as dead so that the connection will be dropped.
* Fixed the usual missing dependencies on headers generated by rpcgen.bde1998-05-101-2/+2
|
* Fixed wrong prototypes. Most of the prototypes had missing return types,bde1998-01-161-9/+19
| | | | or missing const's or `short *' instead of `[ug]id_t *' in argument types.
* Convert to mdoc format.charnier1998-01-051-248/+146
|
* In clntudp_call(), it is possible that xdr_replymsg() might failwpaul1997-10-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | partway through its attempt to decode the result structure sent by the server. If this happens, it can leave the result partially populated with dynamically allocated memory. In this event, the xdr_replymsg() failure is detected and RPC_CANTDECODERES is returned, but the memory in the partially populated result struct is not free()d. The end result is that memory is leaked when an RPC_CANTDECODERES error occurs. (This condition can occur if a CLIENT * handle is created using clntudp_bufcreate() with a receive buffer size that is too small to handle the result sent by the server.) Fixed by setting reply_xdrs.x_op to XDR_FREE and calling xdr_replymsg() again to free the memory if an RPC_CANTDECODERES error is detected. I suspect that the clnt_tcp.c, clnt_unix.c and clnt_raw.c modules may ha a similar problem, but I haven't duplicated the condition with those yet. Found by: dbmalloc
* Sorted lists.bde1997-10-211-23/+22
|
OpenPOWER on IntegriCloud