Commit Graph

2277 Commits

Author SHA1 Message Date
David E. O'Brien 7863f660a2 Add new NetBSD FFS with FDISK partition ID 0xa9
Obtained from:	Frank van der Linden <frank@wins.uva.nl>
1998-05-19 11:15:44 +00:00
Bill Paul 0a11c79d42 Toss publickey.c in the attic and remove it from the Makefile.
If we have it in libc, we don't need it here.
1998-05-18 21:59:53 +00:00
Bill Paul 14afd12e8c Replace the getpublickey() stub with the real thing. 1998-05-18 21:59:15 +00:00
Bill Paul a6e95b4420 Improve DoS avoidance in RPC stream oriented transports. The TCP transport
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.
1998-05-18 16:12:13 +00:00
Joseph Koshy 53e85f8664 Add warning about interaction of S/Key and login(1) for users without S/Key
passwords attempting to invoke login(1) on a pty.

PR: 3289
1998-05-18 09:36:31 +00:00
John Birrell 307253bb9f This library builds from libc source, so it also needs to know what
syscall style libc is using otherwise the library can contain calls
(like issetugid) that you don't find out until you build X programs.
1998-05-18 04:41:07 +00:00
Joseph Koshy c38eceafa4 kill.1: Remove reference to obsolete sigvec(2) man page. Removed
self reference in sigaction(2) man page.

Submitted by: Josh Gilliam <josh@quick.net>
PR: 6617
1998-05-18 03:33:11 +00:00
Bill Paul a9352e90f0 Patch RPC library to avoid possible denial of service attacks as described
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.
1998-05-15 22:57:31 +00:00
Bill Paul 9c69f26836 Patch RPC library to avoid possible denial of service attacks as described
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.
1998-05-15 22:53:47 +00:00
Andrey A. Chernov 59fcc4ce0f Low level use of 'vidattr()' can cause a NULL pointer to be
dereferenced.  This is because 'SP' is only initialized via 'newterm()'
(which is not required if you are going to interact with the 'terminfo'
database without using 'ncurses').

PR: 6648
Submitted by: Max Euston <meuston@jmrodgers.com>
1998-05-15 21:35:53 +00:00
David E. O'Brien 361854f773 Change an arbitarly hardcoded `10' to MAX_NO_DISKS, which is currently "20".
Otherwise can't see sd10 (obtained using wired down sd unit numbers),
reguardless of the number of actual disks you have.
1998-05-15 21:17:01 +00:00
John Birrell 4bf15af17e Remove a big hack after adding a small one to libc/gen/getcwd.c to
handle the lack of __getcwd syscall in NetBSD.
1998-05-15 12:01:06 +00:00
John Birrell efda37108b NetBSD doesn't have a __getcwd syscall, so set have__getcwd to `no'
when building libc with NetBSD syscalls.
1998-05-15 11:59:00 +00:00
John Birrell cfc1614a48 int -> long changes that reduce the diffs with the NetBSD version to
work in a 64-bit environment.
1998-05-14 21:45:18 +00:00
Andrey A. Chernov 01929df9e0 Remove reference to signanosleep 1998-05-14 14:39:58 +00:00
Peter Wemm f202e67dfe Nuke signanosleep() 1998-05-14 11:36:16 +00:00
John Birrell d788c4fb65 libtcl now builds (with lots of pointer to int cast warnings) on alpha. 1998-05-13 22:54:03 +00:00
John Birrell ae43c7299f Make -Werror i386 specific because gcc with -nostdinc on alpha belches
warnings about static inline functions that cause the build to fail.

And for some reason, alpha needs MD5. Find that out later!
1998-05-11 09:15:03 +00:00
John Birrell 9a6a1cbee4 Cast a pointer to a long, not an int and make the arg passed to the function
a long too (it does have a proper prototype).
1998-05-11 09:10:38 +00:00
John Birrell 36af80b1a0 Remove a 'const' because it was getting thrown away anyway. 1998-05-10 23:48:18 +00:00
John Birrell 43f3c8ed20 There is no alpha asm code like on i386, so all the functions that
the i386 builds with a __generic prefix need to have that stripped.
1998-05-10 23:46:01 +00:00
John Birrell adaa81ba92 Cast a pointer to a long, not an int before masking it. 1998-05-10 21:22:47 +00:00
John Birrell cc4473c104 Remove 'of type long' from a sentence talking about four 4-byte values
because that is wrong on alpha.
1998-05-10 21:21:01 +00:00
Bruce Evans 881b7b471b Fixed the usual missing dependencies on headers generated by rpcgen. 1998-05-10 15:54:22 +00:00
Bruce Evans ee4b699da3 Fixed the usual missing dependencies on headers generated by rpcgen.
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.
1998-05-09 15:10:53 +00:00
Brian Somers ec791cadb1 Add a BUGS section and describe a problem I've been having for
a few weeks now.
1998-05-09 14:45:06 +00:00
Bruce Evans 55554ef2c3 Simplified by using new yacc rules. 1998-05-08 06:43:07 +00:00
John Birrell 184fcab826 This is a hack to workaround source that is coded to use long variables
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.
1998-05-08 05:41:57 +00:00
John Birrell f9a8e5fafb Remote the NetBSD kludge for vfprintf.c 1998-05-08 05:17:11 +00:00
John Birrell 77af5d1ac8 Don't assign the va_list variable 'ap' directly to the argtable because
va_list is not a pointer on alpha. Instead, use the va_arg() macro
to return the address that is stored in the argtable.
1998-05-08 05:10:32 +00:00
John Birrell b2dd537249 Use the thread-aware errno definition all the time. 1998-05-05 22:07:02 +00:00
John Birrell 75831c5b8f Build the syscalls (in libc, not libc_r) with weak symbols so that
libpthread can override them as required.
1998-05-05 22:06:16 +00:00
John Birrell e659da100d Remove extern int errno and #include <errno.h> to get the proper definition. 1998-05-05 22:04:13 +00:00
John Birrell e095485cdb Remove leading underscores from the FILE lock functions that POSIX
specifies.
1998-05-05 22:02:29 +00:00
John Birrell 4c717fd74d Remove leading underscores for the functions (weak symbols here) that
POSIX defines.
1998-05-05 21:56:42 +00:00
John Birrell ffa54cc6bb The __set_ospeed() function is coded against the speed_t type declared
in termios.h, but it's prototype in termcap.h and the main file use
the underlying definition (which is now an int, not a long for
compatibility with NetBSD). Really termcap.h should use speed_t too,
but I guess that this might break sources that don't include termios.h
first.
1998-05-05 21:54:26 +00:00
John Birrell 9839f9695a Treat the lock value as volatile. 1998-05-05 21:47:58 +00:00
John Birrell f1daac6f22 In a threaded library, expect the lock field to be declared volatile,
so provide function prototypes that respect that, avoiding a gcc
warning that `volatile' is being thrown away.
1998-05-05 21:46:30 +00:00
Robert Nordier a55fccb456 Fix a few nits in quoted code fragments and elsewhere. 1998-05-04 23:16:50 +00:00
John Birrell ec7fa2a51e Force BOOTSTRAP mode all the time while the headers are broken on alpha
as the result of i386 changes.
1998-05-04 02:06:09 +00:00
James Raynard c52c933ddd Typo fixes 1998-05-03 22:59:47 +00:00
James Raynard b92f77cae9 Typo fix. 1998-05-03 22:50:14 +00:00
James Raynard 66c15901aa Pedantry (NULL -> NUL). 1998-05-03 22:42:45 +00:00
James Raynard e6488a0f2f Don't imply sigset_t == int. 1998-05-03 22:27:29 +00:00
Peter Wemm 8e3465ed9f Add libbind 1998-05-03 05:06:13 +00:00
Peter Wemm 17ee1b4919 Build libbind for named and friends (not installed in /usr/lib) 1998-05-03 05:04:21 +00:00
Peter Wemm 9e39714518 Resolve some unexpected differences when comparing with the 2.2 version.
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().
1998-05-02 15:51:54 +00:00
Peter Wemm c8d2fd6da8 Update libc dns code to 4.9.7-T1B level. This involved chopping out large
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.
1998-05-02 13:11:02 +00:00
John Birrell b1ad8d9155 Cleanup in the child, not the parent.
Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
1998-05-02 03:42:20 +00:00
Brian Somers 8d41a9efa3 Go back to version 1.16 - it was correct the way it was.
Pointed out by:	bde
1998-05-01 19:41:12 +00:00