summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't call PunchFWHole() ifdef NO_FW_PUNCHbrian1998-06-063-0/+6
| | | | Pointed out by: "Steve Sims" <SimsS@IBM.Net>
* Fix this so that it compiles in the !__STDC__ case.steve1998-06-061-1/+5
| | | | | | Also be consistent about usage of #if ... Pointed out by: bde
* Add a warning message for a thread locking against itself. This isjb1998-06-063-9/+42
| | | | | not supposed to happen, but I have seen bogus g++ code that causes it.
* Simplify the handling of thread specific data. Only track if a keyjb1998-06-063-135/+99
| | | | | | is allocated or not, rather than keeping a count and attempting to know it it is in-use. POSIX says that once a key is deleted, using the key again results in undefined behaviour.
* Re-design the thread specific key structure.jb1998-06-063-9/+6
|
* I got the last commit back to front.jb1998-06-063-9/+9
|
* Spelling corrections.jkoshy1998-06-069-29/+29
| | | | | 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 the signal behaviour for internal states which set the threadjb1998-06-053-18/+153
| | | | | state to running despite the SA_RESTART flag which is really just for syscalls.
* 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
|
* Add missing uu_lock_txfr() prototypeache1998-06-051-1/+2
|
* Fix a bunch of spelling errors.steve1998-06-0410-18/+18
| | | | | PR: 6856 Submitted by: Josh Gilliam <josh@quick.net>
* No longer need the architecture specific include from libc now thatjb1998-06-031-7/+0
| | | | NetBSD syscalls are defined in sys.mk if they are being used.
* If using NetBSD syscalls the rtprio syscall doesn't exist, so justjb1998-06-031-1/+7
| | | | don't try to use it to set special priorities.
* 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>
* Trim a domain part for wtmp as same as showed by "netstat -r".amurai1998-06-012-3/+42
| | | | | | | | | | | | | Here is a some example for avoiding a confusion. It asssumes a logged host domain is "spec.co.jp". All example is longer than UT_HOSTNAMELEN value. 1) turbo.tama.spec.co.jp: 192.19.0.2 -> trubo.tama 2) turbo.tama.foo.co.jp : 192.19.0.2 -> 192.19.0.2 3) specgw.spec.co.jp : 202.32.13.1 -> specgw Submitted by: Atsushi Murai <amurai@spec.co.jp>
* I shouldn't do things early in the morning.jb1998-06-015-152/+3
| | | | | | I shouldn't do things early in the morning. [...] I shouldn't do things early in the morning.
* send and recv are wrappered in libc, so they shouldn't appear here.jb1998-06-013-9/+9
|
* Remove some syscalls that should have been renamed (libc_r doesn't needjb1998-05-313-18/+18
| | | | to wrapper them) and add a couple that should have been there.
* Add some missing syscall wrappers.jb1998-05-317-3/+301
|
* Remove some stale code.jb1998-05-313-3/+3
| | | | Pointed out by: Amancio
* Don't restart a syscall when a SIGCHLD is received by a thread waitingjb1998-05-313-3/+18
| | | | on a child process.
* Allow this to include from C++ programs.steve1998-05-311-1/+3
| | | | | PR: 2382 Submitted by: Peter Jeremy <perer.jeremy@alcatel.com.au>
* Fixed double slashes in pathnames.bde1998-05-311-2/+2
|
* 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
* Add uu_lock_txfr() to transfer ownership of a successfulbrian1998-05-284-10/+62
| | | | uu_lock() to another process.
* Turn on the rcsid storage so that it's easier to tell the differencepeter1998-05-281-2/+2
| | | | between libscrypt.a and libdescrypt.a
* If building and installing libdescrypt, do it first so that the symlinkspeter1998-05-271-3/+4
| | | | | | | | point to it rather than libscrypt. This was how it was done prior to libscrypt being added in. This should stop more people getting burnt with the /usr/lib -> /usr/lib/aout transition, and the same when the ELF libs come online.
* Don't use absolute path.jkh1998-05-271-1/+1
| | | | Submitted by: jhay
* Make a copy of the caller's iovec array, mallocing if necessary,jb1998-05-273-42/+186
| | | | | and modify that if the writev() syscall does not completely write all bytes in a single call.
* Remove error check from call to set the file descriptor to non-blockingjb1998-05-271-12/+9
| | | | | instead of explicitly ignoring some errors. This allows for the case where a device is naturally non-blocking.
* ELF preparation step 2:sos1998-05-261-2/+2
| | | | | | | | | | | | | | Move a.out libraries to /usr/lib/aout to make space for ELF libs. Make rtld usr /usr/lib/aout as default library path. Make ldconfig reject /usr/lib as an a.out library path. Fix various Makefiles for LIBDIR!=/usr/lib breakage. This will after a make world & reboot give a system that no longer uses /usr/lib/*, infact one could remove all the old libraries there, they are not used anymore. We are getting close to an ELF make world, but I'll let this all settle for a week or two...
* Remove a couple style bugs from the code snippet thatsteve1998-05-261-3/+3
| | | | | | slipped in on the previous commit. Submitted by: bde
* When doing a blocking write, keep looping until all the bytes arejb1998-05-256-60/+318
| | | | | | | written without returning to the caller. This only occurs on pipes where either the number of bytes written is greater than the pipe buffer or if there is insufficient space in the pipe buffer because the reader is reading slower than the writer is writing.
* Update code example to reflect current practice.steve1998-05-251-12/+10
|
* Allow setting of idle or realtime processing priorities persteve1998-05-251-5/+22
| | | | | | | login class. PR: 6636 Submitted by: Jason Young <doogie@forbidden-donut.anet-stl.com>
* Primary verison of NetBIOS over TCP/IP. Now you can connect Windowsamurai1998-05-245-4/+622
| | | | | | | DOMAIN as DOMAIN user through NAT function. See also RFC1002 for futher detail of SMB structure. Submitted by: Atsushi Murai <amurai@spec.co.jp>
* 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.
* Add new NetBSD FFS with FDISK partition ID 0xa9obrien1998-05-191-1/+2
| | | | Obtained from: Frank van der Linden <frank@wins.uva.nl>
* Toss publickey.c in the attic and remove it from the Makefile.wpaul1998-05-182-174/+2
| | | | If we have it in libc, we don't need it here.
* 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.
* Add warning about interaction of S/Key and login(1) for users without S/Keyjkoshy1998-05-181-0/+9
| | | | | | passwords attempting to invoke login(1) on a pty. PR: 3289
* This library builds from libc source, so it also needs to know whatjb1998-05-181-0/+7
| | | | | syscall style libc is using otherwise the library can contain calls (like issetugid) that you don't find out until you build X programs.
* 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.
OpenPOWER on IntegriCloud