Commit Graph

96683 Commits

Author SHA1 Message Date
David E. O'Brien
144ca80367 /rescue/b{,un}zip exists, so build this dynamically now. 2003-11-17 05:19:37 +00:00
David E. O'Brien
13e85b308a /rescue/g{{,un}zip,zcat} exist, so build this dynamically now. 2003-11-17 05:18:36 +00:00
David E. O'Brien
270a7d5792 /rescue/tar exists, so build this dynamic now. 2003-11-17 05:16:26 +00:00
Bruce Evans
6a0d1abc5d Fixed pedantic warnings for statement-expressions using __extension__
and by not using a statement-expression for the non-expression
__PCPU_SET().
2003-11-17 04:40:58 +00:00
Warner Losh
c33df8b251 Copy ukbdmap.h rules from .i386.
# maybe this should be in files.

# This may fix sparc64 tinderbox.  I'll kinow in a few hours.
2003-11-17 04:38:14 +00:00
Jacques Vidrine
8d870a43f9 Baby steps. Set WARNS=1 for libc. 2003-11-17 04:20:02 +00:00
Jacques Vidrine
c91e947dbd Detect range errors when using the %s specifier. Previously, LONG_MAX
was rejected as a range error, while any values less than LONG_MIN
were silently substituted with LONG_MIN.  Furthermore, on some
platforms `time_t' has less range than `long' (e.g. alpha), which may
give incorrect results when parsing some strings.
2003-11-17 04:19:15 +00:00
Bruce Evans
81bbee5996 Fixed a pedantic syntax error (a stray semicolon at the end of
PCPU_MD_FIELDS).
2003-11-17 03:40:41 +00:00
Brian Feldman
633461295a Fix a few cases where MT_TAG-type "fake mbufs" are created on the stack, but
do not have mh_nextpkt initialized.  Somtimes what's there is "1", and the
ip_input() code pukes trying to m_free() it, rendering divert sockets and
such broken.
This really underscores the need to get rid of MT_TAG.

Reviewed by:	rwatson
2003-11-17 03:17:49 +00:00
Bruce Evans
6d800f89c4 Fixed pedantic syntax errors. Many macros didn't permit a semicolon after
their invocation in the !KLD_MODULE case, but a semicolon is provided after
all invocations and is required in the KLD_MODULE case.
2003-11-17 02:55:25 +00:00
Bruce Evans
ed9800b4de Avoid a warning for compiling with `gcc -Wbad-function cast'. (This
is the warning that points to the bug in `(char *)malloc(...)' where
malloc() is implicitly declared as returning int.  We do similar things
here, but they work because u_int is the same as uintptr_t on i386's.)
2003-11-17 02:11:13 +00:00
Don Lewis
88beb5c906 Print the dirpref avgfilesize and avgfpdir parameters.
MFC after:	2 weeks
2003-11-17 01:22:07 +00:00
Robert Watson
6afba1a91f Don't implement mpo_destroy() for Biba, LOMAC, and MLS, as they
aren't allowed to be unloaded.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-17 01:04:07 +00:00
Robert Watson
8accd36ef0 Update a comment about needing to fix NFS server credential use
by 5.0-RELEASE: make it now read 5.3-RELEASE to be realistic.  Still
needs fixing...
2003-11-17 00:56:53 +00:00
David Schultz
4240849261 Document nologin(8) as being insecure in conjunction with a dynamic
root and suggest alternatives.
2003-11-17 00:08:28 +00:00
Alan Cox
0ec3db3072 - Remove unnecessary synchronization from sf_buf_init(). (There is only
one active CPU when sf_buf_init() is performed.)
2003-11-16 23:40:06 +00:00
Robert Watson
b0323ea3aa Implement sockets support for __mac_get_fd() and __mac_set_fd()
system calls, and prefer these calls over getsockopt()/setsockopt()
for ABI reasons.  When addressing UNIX domain sockets, these calls
retrieve and modify the socket label, not the label of the
rendezvous vnode.

- Create mac_copy_socket_label() entry point based on
  mac_copy_pipe_label() entry point, intended to copy the socket
  label into temporary storage that doesn't require a socket lock
  to be held (currently Giant).

- Implement mac_copy_socket_label() for various policies.

- Expose socket label allocation, free, internalize, externalize
  entry points as non-static from mac_net.c.

- Use mac_socket_label_set() in __mac_set_fd().

MAC-aware applications may now use mac_get_fd(), mac_set_fd(), and
mac_get_peer() to retrieve and set various socket labels without
directly invoking the getsockopt() interface.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 23:31:45 +00:00
Bruce Evans
b9c29fa9ae Don't waste so much space for the latency debugging buffer. Its size
will now need editing except for spot checks.

Changed this buffer from a circular one to a linear one.  This is more
useful for some cases and the sysctl that prints it doesn't support
circular buffers.

Fixed (output) formatting bugs in this sysctl.  An off by 1 error caused
a garbage byte to be returned after annotation of large deltas, and
a race with the writer sometimes caused premature string termination.
2003-11-16 23:05:52 +00:00
Warner Losh
10b4620bf0 Gross kludge:
o when compiling lint, undefine certain things and redefine them so that the
  driver doesn't #error out.  Since lint kernels aren't supposed to be
  bootable, I'm no troubled by this breakage.

This fixes the tinderbox

Suggested by: rwatson
Approved by: bms
2003-11-16 22:33:42 +00:00
Simon L. B. Nielsen
52108daca2 Document NO_DYNAMICROOT.
Reviewed by:	gordon
2003-11-16 22:15:09 +00:00
Kris Kennaway
d5688560bf Fix build on alpha
Pointy hat to:	alfred
2003-11-16 21:53:05 +00:00
David Malone
de4aac0deb logerror is used in syslogd to log errors from syslogd itself. It
is possible for an error to occur while trying to log an error, and
this can result in infinite recursion (or at least until we run out
of stack).

Rather than this, we ignore requests to log an error while logging an
error.

PR:		51253
MFC after:	2 weeks
2003-11-16 21:51:06 +00:00
David Malone
3c453e20f9 Remove an argument to printf that is unused. 2003-11-16 21:42:00 +00:00
Gordon Tetlow
5257abea22 Invert the condition that installs the dynamic linker early, since
DYNAMICROOT is now the default. Also document -DNO_DYNAMICROOT since
that is going to be a documented feature.

Submitted by:	matusita, rushani
2003-11-16 21:17:43 +00:00
Bruce A. Mah
ab9c99bd65 Modified release note: dynamically linked /bin and /sbin is now the
default.
2003-11-16 20:34:46 +00:00
Robert Watson
237a5de859 Update mac_set.3 to account for new behavior of mac_set_fd() in the
context of sockets, and document EINVAL as a possible failure mode
based on the object selected, not just the label provided.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 20:21:21 +00:00
Robert Watson
920325ee1d Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET and
SO_PEERLABEL.  This provides an interface to query the label of a
socket peer without embedding implementation details of mac_t in
the application.  Previously, sizeof(*mac_t) had to be specified
by an application when performing getsockopt().

Document mac_get_peer(3), and expand documentation of the other
mac_get(3) functions.  Note that it's possible to get EINVAL back
from mac_get_fd(3) when pointing it at an inappropriate object.

NOTE: mac_get_fd() and mac_set_fd() support for sockets will
follow shortly, so the documentation is slightly ahead of the
code.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 20:18:24 +00:00
Robert Watson
c9ea2dcf62 Abstract the label checking and setting logic from
mac_setsockopt_label() into mac_socket_label_set(); make it non-static
so that it can be invoked from kern_mac.c for mac_set_fd().

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 20:01:50 +00:00
Robert Watson
0196273b2d Implement mpo_copy_{mbuf,pipe,vnode}_label() entry points for
mac_stub and mac_test.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 18:28:58 +00:00
Robert Watson
9e71dd0feb Reduce gratuitous redundancy and length in function names:
mac_setsockopt_label_set() -> mac_setsockopt_label()
  mac_getsockopt_label_get() -> mac_getsockopt_label()
  mac_getsockopt_peerlabel_get() -> mac_getsockopt_peerlabel()

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 18:25:20 +00:00
Poul-Henning Kamp
5c391f4d6b When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register
values after the jump and 0xf000 is compatible with the hardware reset
value.

This makes a difference if the BIOS does a near jump before a far jump.

Detective work and patch by:	 Adrian Steinmann <ast@marabu.ch>
2003-11-16 18:24:23 +00:00
Ceri Davies
ef7da08509 Add the ports/arabic category to the examples.
MFC After:	4 days
2003-11-16 17:55:54 +00:00
Ian Dowse
0ed25a9ad1 If the unmount by file system ID fails, don't warn before retrying
a non-fsid unmount if the file system ID is all zeros. This is a
temporary workaround for warnings that occur in the vfs.usermount=1
case because non-root users get a zeroed filesystem ID. I have a
more complete fix in the works, but I won't get it done for 5.2.
2003-11-16 16:48:18 +00:00
Simon L. B. Nielsen
f72375e102 mdoc(7) janitor:
- Use .Aq macro instead of <foo>.
- Kill EOL whitespace.
2003-11-16 15:16:19 +00:00
Maxim Sobolev
d09c47acd9 Pull latest changes from OpenBSD:
- improve sysinfo(2) syscall;
- add dummy fadvise64(2) syscall;
- add dummy *xattr(2) family of syscalls;
- add protos for the syscalls 222-225, 238-249 and 253-267;
- add exit_group(2) syscall, which is currently just wired to exit(2).

Obtained from:  OpenBSD
MFC after:      2 weeks
2003-11-16 15:07:10 +00:00
Daniel Eischen
5303e94607 Back out last change and go back to using KSE locks instead of thread
locks until we know why this breaks ia64.

Reported by:	marcel
2003-11-16 15:01:26 +00:00
Simon L. B. Nielsen
a013513add Add the following devices to the list of supported devices, to sync
manual page with the source code:
- HAL Corporation Crossam2+USB IR commander
- RATOC REX-USB60
- SOURCENEXT KeikaiDenwa 8 (with and without charger)
2003-11-16 14:02:37 +00:00
Bruce Evans
095ab45bde Restored the call to schedsofttty() (now spelled swi_sched(...)) again.
Its restoration in rev.1.102 was mistranslated to the equivalent of
setsofttty() in rev.1.105.  This increased overheads by causing a
context switch to the SWI handler after almost every interrupt.  The
increase was approx. 50% on a Celeron 366 (from 23 usec to 34 usec
per interrupt).
2003-11-16 13:31:45 +00:00
Shunsuke Akiyama
24ad0a6e4e Fix comment typo.
Noticed by:	simon
2003-11-16 13:13:16 +00:00
Andre Oppermann
be7e82e44a Make two casts correct for all types of 64bit platforms.
Explained by:	bde
2003-11-16 12:50:33 +00:00
Shunsuke Akiyama
565f53bbaa Make interrupt pipe interval time configurable.
- Add kernel options: {UPLCOM,UVSCOM}_INTR_INTERVAL
- Add sysctl variables: 'hw.usb.{uplcom,uvscom}.interval'

MFC after:	1 week
2003-11-16 12:26:10 +00:00
Shunsuke Akiyama
6702d85006 Apply some fixups in the driver_t's.
MFC after:	1 week
2003-11-16 12:13:39 +00:00
Shunsuke Akiyama
a6c22ecd4d Regen. 2003-11-16 12:07:01 +00:00
Shunsuke Akiyama
74745f66de Add vendor IDs, and device IDs supported by uplcom(4).
- SOURCENEXT Corp. KeikaiDenwa 8 [1]
- SOUECENEXT Corp. KeikaiDenwa 8 with charger [2]
- HAL Corp. Crossam2+USB [3]

Submitted by:	[1] Ryo ONODERA <ryo3327@netscape.net>
		[2] Masaki Mizutani <m-saki@rr.iij4u.or.jp>
		[3] FUJISHIMA Satsuki <sf@FreeBSD.org>
MFC after:	1 week
2003-11-16 12:05:11 +00:00
Shunsuke Akiyama
2fbe4b5149 Add missing ioctl functions.
MFC after:	1 week
2003-11-16 11:58:21 +00:00
Shunsuke Akiyama
6ee806e35e Add rue(4) into list of miibus-using drivers and reference.
MFC after:	1 week
2003-11-16 11:52:26 +00:00
Nate Lawson
b1df3c5e22 Remove an annoying printf that somehow leaked into rev 1.21. 2003-11-16 08:41:24 +00:00
Brian Feldman
75504450a1 As mentioned by warner, previous revision (opt_ddb.h) was just a fluke --
I'm having bad luck with different parts of the sys tree being checked
out at slightly different times.  Back it out, noting it doesn't cause
harm in any case.  Tinderbox also makes these things more fun.
2003-11-16 08:10:59 +00:00
Kirk McKusick
d46b52859a Convert the live dump command (`dump -L') to use mksnap_ffs instead
of trying to directly create the snapshot itself. This change allows
users logged into the system as operator to run live dumps.

Note that dump no longer tries to create the snapshot in the root of
the filesystem, but rather in a .snap directory in the root of the
filesystem. The reason is that the operator is usually not permitted
to write into the root of the filesystem. The newfs command and
background fsck have both been modified to create a .snap directory
in the root of the filesystem, but if neither of these have been run,
then the .snap directory must be created manually by the superuser
before a live dump can be run. The .snap directory should be owned
by user root and group operator and set to mode 770.
2003-11-16 08:01:58 +00:00
Brian Feldman
5e36d52bef It appears opt_global.h may cause opt_ddb.h to be needed. Adding it
with the full path on the command line like with -include opt_global.h
currently unbreaks tinderbox.
2003-11-16 07:50:14 +00:00