summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Spelling corrections.jkoshy1998-06-063-4/+4
| | | | | PR: 6868 Submitted by: Josh Gilliam <josh@quick.net>
* Spelling nits.jkoshy1998-06-062-4/+4
| | | | Pointed out by: Sue Blake <sue@welearn.com.au>
* Fix handling more than 1 char with non-C localeache1998-06-051-16/+4
| | | | | | Misc. cleanup PR: 6825 Submitted by: Sergey Gershtein <sg@mplik.ru>
* Mention that tftpd(8) also uses syslog(3).jkoshy1998-06-051-2/+3
|
* Fix a bunch of spelling errors.steve1998-06-0410-18/+18
| | | | | PR: 6856 Submitted by: Josh Gilliam <josh@quick.net>
* Correct wrong claim about `telldir()' cookie lifetimes.jkoshy1998-06-031-16/+11
| | | | | PR: 4043 Submitted by: Joe Orthoefer <j_orthoefer@tia.net>
* Add a trivial mechanism for returning a useful default value if one ismsmith1998-06-011-1/+4
| | | | | | | | | available and the kernel MIB setting is zero. Return the result from getpagesize() if the p1003_1b.pagesize MIB value is zero. Suggested by: Joerg Schilling <schilling@fokus.gmd.de>
* Several sources including Unix98 say that semctl's fourthsteve1998-05-311-5/+24
| | | | | | | | | | parameter is optional except where: cmd == {IPC_SET || IPC_STAT || GETALL || SETVAL || SETALL} PR: 2448 Reviewed by: bde Submitted by: Tim Singletary <tsingle@sunland.gsfc.nasa.gov> Minor tweaks by: steve
* Remove references to getvfsbytype. Also remove getvfsbynamesteve1998-05-301-32/+13
| | | | | | as it has its own manpage. Discussed with: bde
* Remove a couple style bugs from the code snippet thatsteve1998-05-261-3/+3
| | | | | | slipped in on the previous commit. Submitted by: bde
* Update code example to reflect current practice.steve1998-05-251-12/+10
|
* 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).
* Change the sanity test here. It's not correct to assume that the recordwpaul1998-05-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | size we receive here should fit into the receive buffer. Unfortunately, there's no 100% foolproof way to distinguish a ridiculously large record size that a client actually meant to send us from a ridiculously large record size that was sent as a spoof attempt. The one value that we can positively identify as bogus is zero. A zero-sized record makes absolutely no sense, and sending an endless supply of zeroes will cause the server to loop forever trying to fill its receive buffer. Note that the changes made to readtcp() make it okay to revert this sanity test since the deadlock case where a client can keep the server occupied forever in the readtcp() select() loop can't happen anymore. This solution is not ideal, but is relatively easy to implement. The ideal solution would be to re-arrange the way dispatching is handled so that the select() loop in readtcp() can be eliminated, but this is difficult to implement. I do plan to implement the complete solution eventually but in the meantime I don't want to leave the RPC library totally vulnerable. That you very much Sun, may I have another.
* 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.
* kill.1: Remove reference to obsolete sigvec(2) man page. Removedjkoshy1998-05-181-2/+1
| | | | | | | self reference in sigaction(2) man page. Submitted by: Josh Gilliam <josh@quick.net> PR: 6617
* Patch RPC library to avoid possible denial of service attacks as describedwpaul1998-05-151-1/+7
| | | | | | | | | | | | recently in BUGTRAQ. The set_input_fragment() routine in the XDR record marking code blindly trusts that the first two bytes it sees will in fact be an actual record header and that the specified size will be sane. In fact, if you just telnet to a listening port of an RPC service and send a few carriage returns, set_input_fragment() will obtain a ridiculously large record size and sit there for a long time trying to read from the network. A sanity test is required: if the record size is larger than the receive buffer, punt.
* 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.
* Remove a big hack after adding a small one to libc/gen/getcwd.c tojb1998-05-152-232/+2
| | | | handle the lack of __getcwd syscall in NetBSD.
* NetBSD doesn't have a __getcwd syscall, so set have__getcwd to `no'jb1998-05-151-0/+4
| | | | when building libc with NetBSD syscalls.
* int -> long changes that reduce the diffs with the NetBSD version tojb1998-05-142-34/+34
| | | | work in a 64-bit environment.
* Remove reference to signanosleepache1998-05-141-1/+0
|
* Nuke signanosleep()peter1998-05-142-21/+3
|
* Cast a pointer to a long, not an int and make the arg passed to the functionjb1998-05-111-2/+2
| | | | a long too (it does have a proper prototype).
* Cast a pointer to a long, not an int before masking it.jb1998-05-101-1/+1
|
* Remove 'of type long' from a sentence talking about four 4-byte valuesjb1998-05-101-2/+1
| | | | because that is wrong on alpha.
* Fixed the usual missing dependencies on headers generated by rpcgen.bde1998-05-101-2/+2
|
* Fixed the usual missing dependencies on headers generated by rpcgen.bde1998-05-091-6/+6
| | | | | | | | | Use rpcgen's -C option, although using it for non-headers breaks K&R support. A local copy of yp.h is built to avoid adding -I/usr/include/rpcsvc to CFLAGS. This version of yp.h differed from <rpcsvc/yp.h> only in not declaring prototypes. Fixed style bugs.
* Add a BUGS section and describe a problem I've been having forbrian1998-05-091-1/+14
| | | | a few weeks now.
* This is a hack to workaround source that is coded to use long variablesjb1998-05-082-2/+2528
| | | | | | | | | | but also assumes that they are 32-bits. This is one place where I don't think it is appropriate to change 'long' to 'int'. I don't see why the code couldn't be fixed so that using natural long variables does the right thing. It's spaggetti code so it'll take some effort. Obviously NetBSD thought so too because they change 'long' to 'int32_t' etc and left it at that. As a temporary measure FreeBSD/Alpha can use the NetBSD code and put this on the list of things to fix.
* Remote the NetBSD kludge for vfprintf.cjb1998-05-081-9/+2
|
* Don't assign the va_list variable 'ap' directly to the argtable becausejb1998-05-081-19/+18
| | | | | va_list is not a pointer on alpha. Instead, use the va_arg() macro to return the address that is stored in the argtable.
* Use the thread-aware errno definition all the time.jb1998-05-052-44/+6
|
* Build the syscalls (in libc, not libc_r) with weak symbols so thatjb1998-05-052-6/+18
| | | | libpthread can override them as required.
* Remove extern int errno and #include <errno.h> to get the proper definition.jb1998-05-051-1/+1
|
* Remove leading underscores from the FILE lock functions that POSIXjb1998-05-051-3/+3
| | | | specifies.
* Remove leading underscores for the functions (weak symbols here) thatjb1998-05-051-4/+7
| | | | POSIX defines.
* In a threaded library, expect the lock field to be declared volatile,jb1998-05-051-5/+5
| | | | | so provide function prototypes that respect that, avoiding a gcc warning that `volatile' is being thrown away.
* Fix a few nits in quoted code fragments and elsewhere.rnordier1998-05-041-5/+4
|
* Typo fix.jraynard1998-05-031-2/+2
|
* Pedantry (NULL -> NUL).jraynard1998-05-031-1/+1
|
* Don't imply sigset_t == int.jraynard1998-05-031-1/+1
|
* Resolve some unexpected differences when comparing with the 2.2 version.peter1998-05-021-2/+10
| | | | | | One bug was relatively harmless (select's timeout had an uninitialized tv_usec), the other I'm not so sure.. (neglected to catch select returns less than zero). Both of these were irrelevant on kernels with poll().
* Update libc dns code to 4.9.7-T1B level. This involved chopping out largepeter1998-05-023-249/+753
| | | | | | chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver code. (There are no interface changes though) The other parts are better bounds checking related.
* Go back to version 1.16 - it was correct the way it was.brian1998-05-011-6/+6
| | | | Pointed out by: bde
* Fixed disordering and other style bugs in rev.1.50.bde1998-05-011-6/+4
|
* connect() returns -1 on error - not 0.brian1998-05-011-7/+7
|
* Add reference to setlocale(3)ache1998-04-301-2/+3
|
* Add reference to catopen(3)ache1998-04-301-1/+4
|
* Return -1 for invalid descriptor in catcloseache1998-04-301-2/+2
|
OpenPOWER on IntegriCloud