Commit Graph

27303 Commits

Author SHA1 Message Date
imp
9461b07207 Many security improvements from OpenBSD:
implement mkdtemp
	improve man page for mk*temp
	use arc4random to seed extra XXX's randomly
	Optionally warn of unsafe mktemp uses
From various commits by theo de raadt and Todd Miller.
Obtained from: OpenBSD

This should go into 2.2 after a testing period.
1998-02-13 02:13:24 +00:00
julian
b31dde27bf Fixes from Jeremy Allison and Terry Lambert for pthreads:
specifically:
uthread_accept.c: Fix for inherited socket not getting correct entry in
                  pthread flags.
uthread_create.c: Fix to allow pthread_t pointer return to be null if
                  caller doesn't care about return.
uthread_fd.c: Fix for return codes to be placed into correct errno.
uthread_init.c: Changes to make gcc-2.8 thread aware for exception stack
                frames (WARNING: This is #ifdef'ed out by default and is
		different from the Cygnus egcs fix).
uthread_ioctl.c: Fix for blocking/non-blocking ioctl.
uthread_kern.c: Signal handling fixes (only one case left to fix,
                that of an externally sent SIGSEGV and friends -
		a fairly unusual case).
uthread_write.c: Fix for lock of fd - ask for write lock, not read/write.
uthread_writev.c: Fix for lock of fd - ask for write lock, not read/write.

Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix)
sample implementations.
1998-02-13 01:27:34 +00:00
bde
b28763a6b1 Fixed configuration and linkage of ext2_checkoverlap(). 1998-02-13 00:28:40 +00:00
bde
227f4a2d7c Removed unnecessary dependencies on KERNEL and DIAGNOSTIC. This was
more useful when opt_diagnostic.h had to be included.
1998-02-13 00:20:36 +00:00
bde
4358bb1ae6 Fixed a comment. The module size is (unfortunately) in K, but it is not
in pages.
1998-02-12 23:58:54 +00:00
bde
0b6b54525f Fixed disordering of MLINKS in previous commit. Fixed old disorder in
MLINKS.
1998-02-12 23:52:23 +00:00
bde
e1dfa900e4 Fixed staticization (the behaviour is undefined when something with
external linkage is redeclared as static).
1998-02-12 23:16:12 +00:00
bde
c4b1f98d98 Unstaticized. 1998-02-12 22:33:33 +00:00
phk
e19355cd15 Add support for VESA mode 0x102 (800x600x4) in syscons. You can activate
this using option "-b" to the boot blocks.  It is smartest to compile
a font into your kernel (See LINT), but not mandatory, but apart from
the cursor you will see nothing on the screen until you load a font.

This mode allows XF86_VGA16 to run in 800x600 mode on otherwise unsupported
graphics hardware.

A number of buglets in the cursor handling in syscons may become
visible this way.
1998-02-12 22:05:08 +00:00
bde
6c89270e25 Fixed initialization of the 4MB page. Kernels larger than about 2.75MB
(from _btext to _end) crashed in pmap_bootstrap().  Smaller kernels
worked accidentally.
1998-02-12 22:00:01 +00:00
bde
7da6f05e3f Only use the i586-optimized copying and zeroing functions if they are
actually faster (more than 20% faster for zeroing 1 MB at boot time).
This fixes pessimized copying and zeroing on K6's and perhaps on other
CPUs that are misclassified as i586's.
1998-02-12 21:41:10 +00:00
phk
796a7e782c Fix a white-space nit which I happened to notice. 1998-02-12 20:52:24 +00:00
phk
e5a46b0176 Add display of type KD_PIXEL. 1998-02-12 20:47:39 +00:00
wpaul
52d2adbd3e Fix _listmatch() again so that it works with group lists containing only
one group. Thanks to Dirk Froemberg for supplying a patch for this. I will
be closing out the PR and moving this to the 2.2.5 branch later: my login
sessions to freefall from Columbia are ridiculously spotty today.

PR:	5610
Submitted by:	Dirk Froemberg <ibex@physik.TU-Berlin.DE>
1998-02-12 19:29:05 +00:00
eivind
e51227b005 Make NO_LKM a new-style option.
Forgotten by:	dima
1998-02-12 18:02:07 +00:00
yokota
6f7f019629 Add an entry for the Brazilian keymap with accent key definitions
in the keymap menu.
1998-02-12 17:53:19 +00:00
yokota
9aede4687e - Add Brazilian keymap with accent definitions.
- Better Portuguese language support for kbdmap(1).
PR: misc/5723
Submitted by: Daniel C. Sobral
1998-02-12 17:06:47 +00:00
yokota
7fbfde19dc Oops, sorry, a #define line for my debugging session slipped into
the last commit ;-<
1998-02-12 16:35:11 +00:00
kato
419016b39d Sync with sys/i386/isa/syscons.c revision 1.251. 1998-02-12 08:16:34 +00:00
kato
8c6334b4b9 Sync with sys/i386/conf/options.i386 revision 1.72. 1998-02-12 08:15:51 +00:00
ache
9b9818fac3 Replace non-existent ip_forwarding with ipforwarding
(compilation error)
1998-02-12 03:37:45 +00:00
nate
ec6f970a86 - Bump the minor # due to the addition of the stringlist functions.
Reviewed by:	asami
1998-02-12 01:44:53 +00:00
jdp
4911b4c5bd Explicitly describe the rules the shell uses to search for a file
sourced by the "." command.
1998-02-12 01:23:11 +00:00
alex
0fbf800481 Alter ipfw's behavior with respect to fragmented packets when the packet
offset is non-zero:

  - Do not match fragmented packets if the rule specifies a port or
    TCP flags
  - Match fragmented packets if the rule does not specify a port and
    TCP flags

Since ipfw cannot examine port numbers or TCP flags for such packets,
it is now illegal to specify the 'frag' option with either ports or
tcpflags.  Both kernel and ipfw userland utility will reject rules
containing a combination of these options.

BEWARE: packets that were previously passed may now be rejected, and
vice versa.

Reviewed by:	Archie Cobbs <archie@whistle.com>
1998-02-12 00:57:06 +00:00
wosch
95821ff4ba pwd_mkdb option '-c' was renamed to -C some weeks ago.
PR: bin/5715
Submitted by:  dannyman <dannyman@arh0300.urh.uiuc.edu>
1998-02-11 23:31:24 +00:00
dima
8175420eed I'm not sure whether this is a correct way to do it,
but here's a new kernel option - "NO_LKM"

If anyone has better ideas - please let me know.
1998-02-11 20:47:55 +00:00
dg
fa872f3d14 Fix a && that should be an &.
Reviewed by:	"John S. Dyson" <dyson@FreeBSD.ORG>
Submitted by:	jwd@unx.sas.com (John W. DeBoskey)
1998-02-11 20:06:48 +00:00
jdp
b9a3bec4b4 Removing boggle due to trademark violations. 1998-02-11 19:58:04 +00:00
jdp
70250f0cc5 Disable boggle. It is being removed due to trademark violations. 1998-02-11 19:52:53 +00:00
wpaul
02d038fd99 Fix a bug in the database handle caching. This has to do with the way the
underlying database code works. When dealing with first/next queries, you
have the notion of a database 'cursor,' which is essentially a file pointer
for the database. To select the first entry, you do a fetch with the
R_FIRST flag set, then you can use the R_NEXT flag to enumerate the other
entries in the database. Unfortunately, doing a direct fetch with no flag
does _not_ set the 'cursor,' so you can't do a direct fetch and then
enumerate the table from there.

The bug is that cached handles generated as the result of a YPPROC_MATCH
were being treated as though they were the same as handles generated by
a YPPROC_FIRST, which is not the case. The manifestation is that if you
do a 'ypmatch first-key-in-map map' followed by a yp_first()/yp_next()
pair, the yp_first() and yp_next() both return the first key in the
table, which makes the entry appear to be duplicated.

A couple smaller things since I'm here:

- yp_main.c and yp_error.c both have a global 'int debug' in them.
  For some reason, our cc/ld doesn't flag this as a multiply defined
  symbol even though it should. Removed the declaration from yp_main.c;
  we want the one in yp_error.c.

- The Makefile wasn't installing ypinit in the right place.
1998-02-11 19:15:32 +00:00
guido
2f8caa4fd6 Only forward source routed packets when ip_forwarding is set to 1.
This means that a FreeBSD will only forward source routed packets
when both net.inet.ip.forwarding and net.inet.ip.sourceroute are set
to 1.

You can hit me now ;-)
Submitted by:	Thomas Ptacek
1998-02-11 18:43:42 +00:00
yokota
7dc03c77e7 Remove description on the flags for psm. They are adequately
documented in the man page for psm(4).
1998-02-11 17:37:55 +00:00
yokota
23da380985 Added SC_DISABLE_REBOOT and SC_MOUSE_CHAR. 1998-02-11 16:22:30 +00:00
jkh
9445349bd7 Clean up comments describing Luigi's alternate sound driver. 1998-02-11 15:36:46 +00:00
yokota
34f61944a9 - Move the mouse cursor to the center of the screen after video
mode switch in ioctl.
Possibly related to PR: kern/4271

- A kludge: initialize scp->xpixel and ypixel even in the text mode.
If the console enters the `unknown' graphics mode via the ioctl KDSETMODE
(KD_GRAPHICS), these fields are not set (because syscons cannot know
the correct values), but set_mouse_pos() need to refer to these field
to adjust the mouse position.

- Turn off MOUSE_VISIBLE when switching video mode by ioctl.

- another new option: SC_MOUSE_CHAR
Define the first character code of four consecutive codes to be used for
the mouse cursor.  Default codes are 0xd0 through 0xd3.  Beware that
if you decide to use any codes outside the range of 0xc0-0xdf,
the mouse cursor may not look good, because of the way VGA displays
characters in 9-dot-wide character cells.
Requested by several people.

(This patch was tested by a person who recently reported, in the -current
ML, a page fault problem in the kernel (draw_mouse_iamge()) after
X server shutdown. The patch cured his problem.)
1998-02-11 15:02:40 +00:00
yokota
9f236893a5 - A new semaphore: font_loading_in_progress.
Don't touch/update the screen while manipulating font data.
Possibly related to PR: kern/4271

- Set up VGA in alphanumeric mode rather than graphics mode when
loading font into video memory. This will drastically reduce flicker.
PR: bin/2977

- Set up scp->font_size properly during video mode switch caused by
ioctl.
1998-02-11 15:00:24 +00:00
yokota
a742bed246 - Break scrn_timer() into two pieces. Now screen update is done in a
separate routine: scupdate() called from scrn_timer().

- Make sure that the screen is updated for the low-level console
routines sccngetc() and sccncheckc().  A new routine, sccnupdate(),
is introduced and will call scupdate() above.
Requested by: bde and msmith

OKed by: sos
1998-02-11 14:58:15 +00:00
yokota
9f03d5e495 - Ignore KBD_RAW_MODE and KBD_CODE_MODE in scgetc() when it's called
from the low-level console routines sccngetc() and sccncheckc().
Submitted by: bde (a long time ago)

- Don't try to ring bell and immediately return from do_bell() while
device probe is in progress at boot time; the timeout queue is not
functional yet.
PR: kern/2424

- Stop running the screen saver after panic() is called: check
if `panicstr' is non-NULL during scrn_timer().
PR: kern/5314

- A new option: SC_DISABLE_REBOOT
The reboot key (usually Ctl-Alt-Del) will be ignored if this option
is defined. You may still have the reboot key defined in the keymap and
it won't cause error when the keymap is loaded, but it will be quietly
treated as nop.

OKed by: sos
1998-02-11 14:56:02 +00:00
eivind
db84a320ea spelling
Obtained from:  OpenBSD (src/bin/chio/chio.c rev 1.7) by todd@openbsd.org
1998-02-11 06:34:38 +00:00
jdp
00357bb1bc Replace bogus "@(#)err.h 8.1 (Berkeley) 6/2/93" with RCS Id keyword.
Somebody must have blindly copied the leader comment when they
created this file.
1998-02-11 05:19:10 +00:00
jdp
a73c0d4a85 Remove the include of <dlfcn.h> from crt0.c; it is not needed now
that the dl* trampolines have been moved into libc.

Move dlfcn.h from src/lib/csu/i386 into src/include.  Nothing in
src/lib/csu/i386 uses it any more.
1998-02-11 04:57:25 +00:00
asami
961b4eea9b Fix printing for bytes read > 4G.
Reviewed by:	bde
1998-02-11 02:23:31 +00:00
eivind
5cb8382644 De-staticize enough to make all the LKMs work again. Add comments where
deemed relevant.
1998-02-11 01:46:50 +00:00
eivind
feb116808c Include SIMPLELOCK_DEBUG functions even if SMP if compiling LINT; give
an error for the combination if _not_ compiling LINT.
1998-02-11 00:05:26 +00:00
brian
78287d51b2 Move handle_signals() to before the FD_SETs. handle_signals()
may result in a our modem closing after it's made its way into
the fd_set, resulting in a program exit (with select(): bad file
descriptor) rather than a dropped link.
1998-02-10 22:33:43 +00:00
eivind
5eba76ed2e Back out statification and restore a declaration that got lost. 1998-02-10 21:51:00 +00:00
guido
746524c17b Do signal handlig he Posix way
Obtained from: NetBSD (after complains from Bruce)
1998-02-10 20:05:15 +00:00
jkh
c852558573 Form device names correctly with new unit# syntax. 1998-02-10 18:43:11 +00:00
jkh
7ef8a69bf6 Totally change the way that devices are made in the MFS and subsequently
probed in sysinstall.  Rather than make template devices and use up lots
of inodes, also restricting the number of devices that can be dealt with,
mknod all necessary devices as necessary using built-in information.
This removes a number of constraints on the number and type of devices
that sysinstall can see.
1998-02-10 18:31:27 +00:00
eivind
77f6cc7d27 Staticize. (Diffs by me & and Simon in cooperation.) 1998-02-10 17:36:44 +00:00