Commit Graph

33302 Commits

Author SHA1 Message Date
Jordan K. Hubbard
c2e73c621f Finally eliminate evil version.h smashing in sysinstall. sysinstall
gets the initial release information from sysctl.
1998-11-24 00:17:50 +00:00
Bruce Evans
976d09b9f2 Untangled the Cyclades offsets a little. CY16_RESET and CY_CLEAR_INTR
were half of their physical offsets for ISA and 1/4 of their physical
offsets for PCI, while all other Cyclades offsets were physical/1 for
ISA and physical/2 for PCI.  Logically wrong macros were used to scale
CY16_RESET and CY_CLEAR_INTR to the correct physical offsets.

Fixed some style bugs (mostly long lines).
1998-11-23 13:58:55 +00:00
Joerg Wunsch
aa045fa499 Preprocessor support for `ipfw [-q] ... file'.
This allows for more flexible ipfw configuration files using
`variables' to describe frequently used items in the file, like the
local IP address(es), interface names etc.  Both m4 and cpp are useful
and supported; with m4 being a little more unusual to the common C
programmer, things like automatic rule numbering can be achieved
fairly easy.

While i was at it, i've also untangled some of the ugly style inside
main(), and fixed a bug or two (like not being able to use blank lines
when running with -q).

A typical call with preprocessor invocation looks like

	ipfw -p m4 -Dhostname=$(hostname) /etc/fwrules

Someone should probably add support for this feature to /etc/rc.firewall.
1998-11-23 10:54:28 +00:00
Poul-Henning Kamp
c2906d55d0 Make timecounters more resistant to badly behaved SW/HW which locks
out interrupts for too long.  If you still see the "calcru: negative
time..." message you can increase NTIMECOUNTER (see LINT).

Sideeffect is that a timecounter is required to not wrap around in
less than (1 + delta) seconds instead of the (1/hz + delta) required
until now.

Many thanks to: msmith, wpaul, wosch & bde
1998-11-23 09:59:02 +00:00
Søren Schmidt
8843cc3508 Add a kludge to prevent panicing when using VM86 and hitting here
with a NULL curproc.

Originally by: Tor Egge (IIRC)
1998-11-23 09:34:19 +00:00
Bruce Evans
f6233520ce Fixed a missing include. `SYSININT(...);' garbage in gave null garbage out. 1998-11-23 09:33:35 +00:00
KATO Takenori
76a505024d Sync with sys/i386/isa/sio.c revision up to 1.218. 1998-11-23 07:49:03 +00:00
KATO Takenori
94563b4513 Sync with sys/i386/boot/biosboot/Makefile revision 1.67. 1998-11-23 07:34:37 +00:00
Joseph Koshy
5f67a9c8a1 Don't mention exit(3) in explanation; _exit(2) is a better choice. 1998-11-23 03:23:14 +00:00
Justin T. Gibbs
08c6fbfa40 Change the delivery mechanism for incoming target commands. We now
use a 256 entry ring buffer of descriptersfor this purpose.  This allows
the use of a simple 8bit counter in the sequencer code for tracking start
location.

Entries in the ring buffer now contain a "cmd_valid" byte at their tail.
As an entry is serviced, this byte is cleared by the kernel and set by
the sequencer during its dma of a new entry.  Since this byte is the last
portion of the command touched during a dma, the kernel can use this
byte to ensure the command it processes is completely valid.

The new command format requires a fixed sized DMA from the controller
to deliver which allowed for additional simplification of the sequencer
code.  The hack that required 1 SCB slot to be stolen for incoming
command delivery notification is also gone.
1998-11-23 01:33:47 +00:00
Don Lewis
9d2b090975 We can't call fsetown() from sonewconn() because sonewconn() is be called
from an interrupt context and fsetown() wants to peek at curproc, call
malloc(..., M_WAITOK), and fiddle with various unprotected data structures.
The fix is to move the code that duplicates the F_SETOWN/FIOSETOWN state
of the original socket to the new socket from sonewconn() to accept1(),
since accept1() runs in the correct context.  Deferring this until the
process calls accept() is harmless since the process can't do anything
useful with SIGIO on the new socket until it has the descriptor for that
socket.

One could make the case for not bothering to duplicate the
F_SETOWN/FIOSETOWN state and requiring the process to explicitly make the
fcntl() or ioctl() call on the new socket, but this would be incompatible
with the previous implementation and might break programs which rely on
the old semantics.

This bug was discovered by Andrew Gallatin <gallatin@cs.duke.edu>.
1998-11-23 00:45:39 +00:00
Kenneth D. Merry
22b9c86cfd Fix a few problems that Bruce noticed about a month ago, and fix oup one
other problem.

- Hold onto splsoftcam() in the peripheral driver open routines until we
  have locked the periph.  This eliminates a race condition.

- Disallow opening the pass driver when securelevel > 1.

- If a user tries to open the pass driver with O_NONBLOCK set, return
  EINVAL instead of ENODEV.  (noticed by gibbs)
1998-11-22 23:44:47 +00:00
Nicolas Souchu
f8cf96db8f Remove broken and useless intr interface.
Submitted by: Doug Rabson <dfr@nlsystems.com>
	      Amancio Hasty <hasty@rah.star-gate.com>

Avoid compile warnings.
1998-11-22 22:01:42 +00:00
John Polstra
c273f24b99 Install PAM modules into ${SHLIBDIR}, not ${LIBDIR}.
Noticed by:	bde
1998-11-22 19:33:27 +00:00
John Polstra
1fc5cffd7b Explicitly depend on libcrypt and libmd for a.out too. Fixes a PAM
related problem on a.out systems.
1998-11-22 19:26:39 +00:00
Bruce Evans
a84c84f5b0 Reduce i/o overheads by not preserving the channel access register in
interrupt handlers.  Instead, load and use it atomically as necessary.
This reduces mode switching overhead for "polled" mode interrupt handling
from 5 i/o's to 3 (per service type, per port) so that polled mode is only
slightly more inefficient than "interrupt" mode.
1998-11-22 17:40:32 +00:00
Jordan K. Hubbard
efbcb4ae03 Better document the file format, add in support for nested {}'s in multi-line
property values.
1998-11-22 13:20:09 +00:00
Kazutaka YOKOTA
570f565d11 Oops, I forgot to update this file when I changed moused recently. 1998-11-22 11:57:59 +00:00
Bruce Evans
8280a33470 Deleted the workaround for lockup of certain (hopefully no longer used)
UARTs when their divisor latch registers are selected while they are
doing output.  Waiting for (some) output to drain is not permitted for
the TCSANOW case of tcsetattr().  NIST-PCTS easily detects bugs like
this by testing at at speeds that no one would want to use (50 bps).

Deleted stale comments related to flushing i/o.  Flushing works properly
for 16550s according to NIST-PCTS (it can't work properly for 16450s).
This finishes fixing all sio(16550)-related bugs found by NIST-PCTS.
1998-11-22 10:47:42 +00:00
Bruce Evans
121d04904e Fixed a comment in code that will soon go away. 1998-11-22 09:41:12 +00:00
Bruce Evans
1e1c37f1cd Return ENOTTY instead of EBADF for ioctls on dead vnodes. This fixes
tcsetpgrp() on controlling terminals that are no longer associated
with the session of the calling process, not to mention ioctl.2.
1998-11-22 09:19:07 +00:00
Bruce Evans
7dd89537f1 Fixed some missing cases in the check for ioctls that involve modification.
Many (mostly machine-dependent ones) are still missing.  NIST-PCTS found
this bug for all the ioctls used to implement the POSIX tc* functions
(TIOCCBRK, TIOCDRAIN, TIOCSPGRP, TIOCSBRK, TIOCSTART and TIOCSTOP), and
I found FIOASYNC, TIOCCONS, TIOCEXCL, TIOCHPCL, TIOCNXCL, TIOCSCTTY and
TIOCSDRAINWAIT by inspection.  TIOCSPGRP was ifdefed out for some reason.

Handle tcsetattr()'s historical speed conversions correctly and more
centrally:
- don't store speeds of 0 in the final termios struct.  Drivers can now
  depend on tp->t_ispeed and tp->t_ospeed giving the actual speed.
  Applications can now depend on tcgetattr() being POSIX.1 conformant.
- convert from a proposed input speed of 0 to the proposed output speed
  (except if that is 0, convert to the current output speed).  Drivers
  can now depend on the proposed input speed being nonzero.
- don't reject negative speeds.  Negative speeds can't happen now that
  speed_t is unsigned, and rejecting invalid speeds is a bug - tcsetattr()
  is supposed to succeed if it can "perform any of the requested actions",
  so it shouldn't fail in practice.
1998-11-22 09:04:09 +00:00
Robert Nordier
5103ed619b Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
1998-11-22 07:59:16 +00:00
Bruce Evans
ba924eaf7c Don't forget to use the appropriate __printf*like attribute for verr*
and vwarn*.

Sorted attributes.

UnFrom'ed vendor id.
1998-11-22 05:12:27 +00:00
Jordan K. Hubbard
f89dccd7b0 Doc fixes for CAM devices. If I ever truly understand the logic behind
this name change, I'll be a happy man.
1998-11-21 21:45:27 +00:00
Andrey A. Chernov
468b3a66d9 add -aout key to cc, size, strip - it not work for elf system 1998-11-21 21:07:17 +00:00
John Polstra
cc4b11542b Work around the problem that login won't link if NOSHARED=yes,
because libpam is built shared only.  There is a way to build PAM
into a static library that contains all (or a selected subset) of
the modules.  But our Makefiles don't support that yet.  Until I get
that working, just force NOSHARED=no in login's Makefile.  Of
course, it still won't work if NOPIC is set.

Submitted by:	bde
1998-11-21 18:27:15 +00:00
Jordan K. Hubbard
f21a1a1015 Indicate that the thing not found was not /bin/pwd but rather $CWD (or .). 1998-11-21 08:45:22 +00:00
John Polstra
e83348169b ATTENTION: INSTALL "/etc/pam.conf" FROM "src/etc"!!!
Change login to use PAM for authentication.  I kept the built-in
passwd/NIS authentication support, to handle cases where the system
is missing its "/etc/pam.conf" file.  S/Key and KerberosIV
authentication methods are removed from the login program, but
still available in PAM modules.
1998-11-21 02:22:14 +00:00
John Polstra
4700eb95cb Find "klogin.c" in "src/lib/libpam/modules/pam_kerberosIV" instead
of in "src/usr.bin/login".  The latter instance is going away.  As
soon as ftpd is PAMized, it won't need to use klogin.c at all.
1998-11-21 02:11:16 +00:00
Archie Cobbs
2b81bbcbef Eliminate compiler warning. 1998-11-21 01:57:48 +00:00
Archie Cobbs
3a8dbd82b3 Eliminate some ompiler warnings. 1998-11-21 01:54:50 +00:00
Dmitrij Tejblum
bad3d41d83 Support NT VFAT lower case flags.
PR:		8383
(Mostly) Submitted by:	Carl Mascott <cmascott@world.std.com>
1998-11-21 00:20:24 +00:00
John Polstra
d08484e099 Add a sample "/etc/pam.conf" file that configures the authentication
methods used by login.  Changes to "/usr/bin/login" to use it will
be committed later today.  The format of the file is described in
pam(8).

This sample file makes login behave in the traditional way.  To
wit, it enables authentication via S/Key and passwd/NIS lookups.
KerberosIV authentication is present in the sample file but commented
out.

As a safety net and a transition aid, login will fall back on
built-in passwd/NIS authentication if this configuration file is
missing or if some other fatal PAM error occurs.

This file will eventually replace "/etc/auth.conf", but not until
I've finished converting the other utilities, such as passwd and su.
1998-11-20 23:20:01 +00:00
Bill Paul
36c84dd2b3 Add missing return statement to rl_phy_writereg(). This bug didn't actually
hurt anything, but it's still a bug.

Pointed out by: Jason Wright <jason@thought.net>
1998-11-20 19:26:37 +00:00
Kazutaka YOKOTA
0e06fe21c6 - Added some configuration flags as workaround for not-so-compatible
keyboard/mouse/display switch products (console switches).  Some
  products claim they emulate the PS/2 mouse when the host computer
  talks to the mouse while the mouse is actually routed to another
  host.

	flags 0x200	Do not try to identify the mouse model. All
			mice will be recognized as "generic PS/2".
	      0x400	Do not reset the mouse.  Some switches' response
			to the reset command is too slow and the psm
			will timeout.
	      0x1000	Relax error checking when probing the mouse
			port.

- Added another flag for pad devices.

	flags 0x800	Assume the pad behaves like ALPS GlidePoint
			when the user `taps' the surface of the pad;
			it will be reported as the fourth button.
1998-11-20 11:46:43 +00:00
Kazutaka YOKOTA
1b11ca6c6b - Added support for Genius Kidspad tablet.
# `moused' is getting too over-loaded now.  If we want something
# more than simple mouse emulation for tablets or remote devices,
# we should start writing a separate daemon...

Submitted by: luigi
1998-11-20 11:22:17 +00:00
Kazutaka YOKOTA
9fb1d70c9d - Added a new option: -w N. The option makes the button N as the `wheel
mode' button.  Mouse movement will be treated as wheel movement while
  this button is held down.  Useful for mice with many buttons but
  without a wheel.

PR: bin/8001
Submitted by: Hideyuki Suzuki
1998-11-20 11:19:20 +00:00
Kazutaka YOKOTA
c49f79b7e2 - Reorganized a `if-else' close a bit for clarity. Purely cosmetic
change.  No functional difference.
1998-11-20 11:17:59 +00:00
David E. O'Brien
6ab6e16962 xfer typo
PR:				docs/8723
Submitted by:	Junji SAKAI <sakai@jp.freebsd.org>
1998-11-20 08:12:05 +00:00
David E. O'Brien
04bcfffb8b amq.8 contains typos
PR:				docs/8433
Reviewed by:	Kazuo Horikawa <horikawa@jp.freebsd.org>
1998-11-20 08:09:34 +00:00
David E. O'Brien
4e6fcaf46f Bad default value of ${fs} for type:=host in /etc/amd.map.
PR:		conf/7054
Submitted by:	Amakawa Shuhei <amakawa@sf.t.u-tokyo.ac.jp>
1998-11-20 07:36:29 +00:00
David E. O'Brien
8e075b1204 Not part of AM-UTILS any longer. Should be build from fixrmtab.in. 1998-11-20 05:21:40 +00:00
David E. O'Brien
a424235073 Fix version number. 1998-11-20 05:18:34 +00:00
Satoshi Asami
db0921e889 (1) Remove LOOP_VAR and LOOP_OPTIONS. It's a hack and just too many things
break one way or another.  With it goes the package-loop and the
    describe loop.

(2) Add new variable MASTERDIR to make it easier to share files between ports.
    bsd.port.mk will find things like ${PKGDIR} underneath
    ${MASTERDIR} (which defaults to ${.CURDIR}).

(3) Do not allow MD5_FILE to be renamed.  Funny things can happen if
    you do that.

(4) Use a few more absolute paths in the bsd.port.pre.mk part.  I
    can't use absolute paths for sysctl because it moved recently.
1998-11-20 04:00:38 +00:00
Archie Cobbs
a8c0f6e542 Fix misallocation of buffer bug (too short) 1998-11-20 02:57:41 +00:00
John Polstra
127a2cfaf4 Make sure libskey is built before libpam. It is required for one of
the PAM modules.

Fix the comments describing the PAM dependencies to be consistent
with other related comments.
1998-11-20 02:03:52 +00:00
John Polstra
60da54eec3 Make sure libskey is built before libpam. It is required for one of
the PAM modules.

Fix the comments describing the PAM dependencies to be consistent
with other related comments.

Restructure the library-building loop slightly, per suggestion from
bde.
1998-11-20 02:03:45 +00:00
Satoshi Asami
51d2851063 Change sd -> da in examples.
Inspired by:	a mail by Scott Smyth <smyth@bashful.realminfo.com>
1998-11-19 20:22:10 +00:00
Paul Richards
9abd5d84ac This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00