Commit Graph

42597 Commits

Author SHA1 Message Date
David E. O'Brien
f06f71af59 Don't ask about SCO/IBSC2 binary support on the Alpha. 1999-11-18 03:03:01 +00:00
John Polstra
e2e3d0a401 For the TCP transport, put the listening socket in non-blocking
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
1999-11-18 03:01:06 +00:00
Julian Elischer
1815eed869 fix up a whitespace screwup I made. 1999-11-18 01:23:06 +00:00
Warner Losh
e1a0be5f8c o Remove #if XXX from around the probe code.
o Rewrite probe code to work in the newbus world.
o Add preliminary pnp support.  I have no clue what the pnp ids for
  the older ISA machines/cards.  I don't have any of these cards/machines
  so I'll have to rely on the user community to give me help.
o Minor code reformatting.

Attach hasn't been touched, and there may be some config issues that
we need to deal with as well.  These will follow in time.
1999-11-17 23:54:39 +00:00
Greg Lehey
26909c8019 Allow octal or hex input.
Suggested-by:	Geoff Steckel <gwes@sitaranetworks.com>
1999-11-17 23:42:09 +00:00
Nick Hibma
bdf1e3f204 Add the entry for usb (as opposed to usb<number>). It's minor is equivalent
to usb255 and will be used for the event queue of the usb daemon.
1999-11-17 23:02:34 +00:00
Nick Hibma
f83cfc1b03 Change the name of the modules from <name>_mod to <name>
Suggested by:	David O'Brien <obrien@FreeBSD.ORG>
1999-11-17 22:47:11 +00:00
Andrey A. Chernov
08221ae7d5 Add network pass4 - after all local (/usr/local/etc/rc.d f.e.)
daemons started. Move log_in_vain option there. It is needed to avoid
lot of connections to port 80 logged on production WWW server prior
Apache started from /usr/local/etc/rc.d
1999-11-17 22:38:02 +00:00
Nick Hibma
3241be7550 Synchronisation with NetBSD as of 1999/11/16:
Cleaning up the code:
- Declare many functions static
- Change variable names to make them more self explanatory
- Change usbd_request_handle -> usbd_xfer_handle
- Syntactical changes
- Remove some unused code
- Other KNF changes

Interrupt context handling
- Change delay to usbd_delay_ms were possible (takes polling mode into
  account)
- Change detection mechanism for interrupt context

Add support for pre-allocation DMA-able memory by device driver

Add preliminary support for isochronous to the UHCI driver (not for OHCI
yet).

usb.c, uhci.c, ohci.c
- Initial attempt at detachable USB host controllers
- Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.

usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c
- Make sure an aborted pipe is marked as not running.
- Start queued request in the right order.
- Insert some more DIAGNOSTIC sanity checks.
- Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.

usb.c, usb_subr.c
- Add an event mechanism so that a userland process can watch devices
  come and go.

ohci.c
- Handle the case when a USB transfer is so long that it crosses two
  page (4K) boundaries.  OHCI cannot do that with a single TD so we make
  a chain.

ulpt.c
- Use a bigger buffer when transferring data.
- Pre-allocate the DMA buffer.  This makes the driver slightly more
  efficient.
- Comment out the GET_DEVICE_ID code, because for some unknown reason it
  causes printing to fail sometimes.

usb.h
- Add a macro to extract the isoc type.
- Add a macro to check whether the routine has been entered after splusb
  and if not, complain.

usbdi.c
- Fix a glitch in dequeueing and aborting requests on interrupt pipes.
- Add a flag in the request to determine if the data copying is done by
  the driver or the usbdi layer.
1999-11-17 22:33:51 +00:00
Poul-Henning Kamp
6a54425c86 "b_unused1" was.
Fix comment for b_caller[12] fields.

Spotted by:     grog
1999-11-17 21:43:00 +00:00
Poul-Henning Kamp
119ce71e82 Do timeouts in terms of hz
Spotted by:     julian
1999-11-17 21:40:14 +00:00
Poul-Henning Kamp
6153cb2048 Make proc/*/cmdline use the cached argv if available.
Submitted by:   Paul Saab <paul@mu.org>
Reviewed by:    phk
1999-11-17 21:35:07 +00:00
Poul-Henning Kamp
3cf5d0fd07 The function `procfs_getattr()' in procfs doesn't set the value of
vap->va_fsid, so we cannot get valid information about procfs.

Submitted by:   SAWADA Mizuki miz@pa.aix.or.jp
Reviewed by:    phk
PR:     1654
1999-11-17 21:33:25 +00:00
Brian Somers
b08210f5fa modfind(char *) -> modfind(const char *)
Reminded by:	dfr
1999-11-17 21:32:40 +00:00
Brian Somers
cf0a39401d Fix ``set proctitle'' by using setproctitle(). 1999-11-17 21:12:35 +00:00
Brian Somers
0675e24de0 Make setproctitle(NULL) restore all of the original arguments
(if it's able).
1999-11-17 21:12:17 +00:00
Poul-Henning Kamp
12b4fd063c The logic for blackhole processing does not free mbufs if the
blackhole flag is set.

PR:		14958
Submitted by:	Larry Baird <lab@gta.com>
Reviewed by:	phk
1999-11-17 20:57:49 +00:00
Andrey A. Chernov
0e98576f36 purity change for name length checking code 1999-11-17 20:51:35 +00:00
Andrey A. Chernov
2053e9a314 Merge with OpenBSD whois (with bugfixes missed there)
New features are:
Automatic lookup using *.whois-servers.net
Recursive lookup using Registrar's name
Fallback to InterNIC for non-domains
-m for RADB database
-Q to turn recursion/fallback off

Obtained from:	OpenBSD
1999-11-17 19:11:51 +00:00
Warner Losh
1a50e0c7fe gcc 2.95.2 1999-11-17 18:06:56 +00:00
Archie Cobbs
4e256e6e1b When allocating a new PKTHDR mbuf, always set m->m_pkthdr.rcvif = NULL. 1999-11-17 17:41:22 +00:00
Matt Jacob
44198f294c Fix a couple of boo-boos in the last delta. 1999-11-17 17:11:21 +00:00
Martin Cracauer
6d9efc2432 The pipleline problem introduced in version 1.22 wasn't fully fixed in
1.23. This revision should work for long pipes both in
here-documents/backquote and in normal cases.

Fix works for jmz, bde.
1999-11-17 16:53:34 +00:00
David Nugent
dc7c1750c2 Reduce max length of user names to 15 characters to reflect reality.
This also prevents the line-wrap and messed up display that occurs
when there happens to be one or more names with 15 chars.
1999-11-17 16:31:51 +00:00
David E. O'Brien
5918196236 Build genrtl.h before print-rtl.o.
Submitted by:	John Hay <jhay@mikom.csir.co.za> (basic idea, changed by me)
1999-11-17 15:50:45 +00:00
Peter Wemm
6ff4ec180d Use the same technique as ps(1) to avoid the need for setgid. (ie: use
/dev/null as the default kernel and /dev/mem filenames, but still allow
the usual overrides)
1999-11-17 15:28:45 +00:00
Peter Wemm
821079e9be I'm probably jumping the gun, but what the heck, this is -current.
Turn off setgid-kmem for /bin/ps, it's now quite functional without it.
ps no longer needs /dev/*mem or /proc.  (It will still use some /proc
files if they are available for -e, but it's not required, so it'll
happily run in a jail or chroot).

The proc stats are now part of eproc (obtained via sysctl) and no longer
needs to beat up the u-page reading code and the problems with that.

This also has the side effect of disabling 'ps -e' for normal users
*EXCEPT* when looking at their own processes.  ie: they can see
environments in processes with their uid, enforced by the ownership of
/proc/*/mem.  Root can still see them all, as it can open all /proc/*/mem.
1999-11-17 13:37:30 +00:00
Peter Wemm
602a69d61e Use eproc.e_stats, not a series of crude hacks to fetch it from the u-area.
Also, fix some indentation that got messed up somehow..
1999-11-17 12:52:42 +00:00
Peter Wemm
e29e202c41 Add e_stats (p->p_stats, from struct user->u_stats) to eproc so it's
fetchable via sysctl.  This saves ps having to read the u-area for stats.
Be sure to recompile libkvm, ps, w, top and the usual suspects.
1999-11-17 12:49:22 +00:00
Alexey Zelkin
b1915357ce Fix invalid option name: DIVERT -> IPDIVERT 1999-11-17 12:34:35 +00:00
Sheldon Hearn
ea97bd380d Add perlopentut.pod, perlreftut.pod and perlthrtut.pod to the list of
pod files to be converted to and installed as manual pages.

These were probably overlooked in the last minor version number upgrade
to perl5.  This change was approved by the perl5 maintainer.

PR:		14649
Submitted by:	Andy Farkas <andyf@speednet.com.au>
1999-11-17 12:22:51 +00:00
David E. O'Brien
e91a7e08cf Allow sub-Makefile's to determine the version of the OS we are make'ing on. 1999-11-17 07:42:40 +00:00
David E. O'Brien
312af410fe Add `mkstemp.c' to the mix if we are building on something older than
__FreeBSD_version < 400004.

This allows -STABLE to build -CURRENT sources.

[mkstemps() was added to -current just before the version bump to 400004
(a matter of hours in this case), so the test is as exact as possible.]

Submitted by:	marcel
1999-11-17 07:39:51 +00:00
David E. O'Brien
54d477a4f1 Make "-mpreferred-stack-boundary=2" the default on the i386.
This reduces the size of the kernel and modules when compiled with GCC 2.95.
1999-11-17 07:30:35 +00:00
David E. O'Brien
a8d46c3a99 Pay attention to the "KEEP THIS IN SYNC" comment, and sync the `tm.h'
header with src/gcc/usr.bin/cc/cc_tools/Makefile.
1999-11-17 07:20:27 +00:00
David E. O'Brien
32458f8c01 * Remove a trailing ";" from a macro.
* Style cleanup.
1999-11-17 07:18:25 +00:00
David E. O'Brien
9df17bd3c2 This temperary file can die now. 1999-11-17 07:03:32 +00:00
Matt Jacob
387c08f0e8 Fix for 11815 (at mount time do a throwaway read of the front of the
tape to force the drive to do a media access so it knows what media
may be inserted).

Also Ken's make_dev patches- relatively untested.
1999-11-17 06:05:09 +00:00
Kenneth D. Merry
273a1a3da7 Get rid of some trailing commas in enumerated types that cause gcc to
complain when some warnings are turned on.

Requested by:	Bertrand Petit <elrond@phoe.frmug.org>
1999-11-17 05:06:52 +00:00
Kenneth D. Merry
73d2691976 Convert the xpt, pass, pt and target drivers to use the new
make_dev()/destroy_dev() interface.
1999-11-17 04:59:09 +00:00
Peter Wemm
0b8c4709dc Put the listening socket into non-blocking mode before doing an
accept(2).  This is a not really problem on -current as the accept race
is fixed, however it is a MFC candidate for -stable.

This could possibly be slightly more efficient and leave the listening
socket permanently in non-blocking mode, but I wasn't certain that I
could catch all the stream/wait (not nowait) mode implications.
1999-11-17 03:32:05 +00:00
Bruce Evans
a8224b82fd Fixed sorting on time. On i386's, time differences of more than 2147
seconds caused overflow.  Use a type-safe but slightly slower comparison.
Comparisons for other fields are still fragile.

Fixed rounding of cputime (don't do extra work to get it slightly wrong
by first converting without rounding to milliseconds).

Removed dead code for setting cputime.

Fixed comments about cputime.
1999-11-17 03:25:54 +00:00
John Polstra
6b2bdf2c08 Fix a bug in the hack that protects against FTP bounce attacks.
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.
1999-11-17 01:54:17 +00:00
Nick Hibma
98af7850dd Remove -O from CFLAGS 1999-11-17 01:40:24 +00:00
Peter Wemm
0e6c8cb9da Don't complain loudly about unknown termcap capabilities, eg:
{vladivostok:/usr/home/ken:1:0} echo |more
"TERMCAP", line 0, col 60, terminal 'screen': unknown capability 'G0'
"TERMCAP", line 0, col 806, terminal 'screen': unknown capability 'AX'

Submitted by:	Kenneth D. Merry <ken@kdm.org>
1999-11-17 01:01:02 +00:00
Archie Cobbs
6e874711cf Add option NETGRAPH_KSOCKET. 1999-11-16 23:49:07 +00:00
Archie Cobbs
48e9417499 Add option NETGRAPH_KSOCKET. 1999-11-16 23:30:05 +00:00
Archie Cobbs
8be226ccde Add reference to new netgraph node type "ksocket". 1999-11-16 23:27:37 +00:00
Archie Cobbs
f7045ac0eb New Netgraph node type "ksocket".
Obtained from:  Whistle source tree
1999-11-16 23:27:10 +00:00
Archie Cobbs
cb3c7a5d3b New netgraph node type "ksocket".
Obtained from:	Whistle source tree
1999-11-16 23:25:11 +00:00