Commit graph

82362 commits

Author SHA1 Message Date
Robert Watson 6151efaa54 Trim extraneous #else and #endif MAC comments per style(9). 2002-10-28 21:17:53 +00:00
Robert Watson c4c30e32ac Correct a typo in a previously commented include entry that was made
visible in the recent commit.
2002-10-28 19:50:06 +00:00
Robert Watson f30a9615fd Remove all reference to 'struct oldmac', since it's no longer required
with the new VFS/EA semantics in the MAC framework.  Move the per-policy
structures out to per-policy include files, removing all policy-specific
defines and structures out of the base framework includes and
implementation, making mac_biba and mac_mls entirely self-contained.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-28 19:44:05 +00:00
Robert Watson 5ab0c4ceeb Clarify style(9) WRT comments following #endif, #else.
The closing comment is required only for long conditionally defined
code sections, with the exception of lint cases.  Attempt to document
also the logic for using '!' before the SOMETIMESSOMETHGINGHERE.
The goal of these comments is to make complex cases more
comprehensible, not to require them in all cases.  The rules here are
derived from behavior used in 90+% of the kernel source code.

Reviewed by and discussed with:	jhb, bde, mike
2002-10-28 19:33:22 +00:00
Robert Watson 6d65e3d4ca Add a return type for mac_biba_high_single(), apparently lost in an
earlier merge.  It's a 'static int'.
2002-10-28 19:18:29 +00:00
Robert Watson 566d99847b Rename mac_biba_subject_equal_ok() to mac_biba_subject_privileged()
to evolve the notion of Biba privilege a bit.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-28 19:17:39 +00:00
Robert Watson ee3bf1710a Zero the trusted_interface buffer before starting parsing.
Print a warning if a requested interface name is longer than
IFNAMSIZ.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-28 19:16:44 +00:00
Robert Watson 8b3a843438 An inappropriate ASSERT slipped in during the recent merge of the
reboot checking; remove.
2002-10-28 18:53:53 +00:00
Scott Long 3754626f78 Reduce namespace pollution to userland.
Spotted-by:	bde
2002-10-28 17:08:07 +00:00
Poul-Henning Kamp 1907a57b5f Fix a bug in the cherry-picker kkey generator routine.
WARNING:  You need to backup and restore the _unencrypted_ contents
WARNING:  of your GBDE disks when you take this update!

Sponsored by:	DARPA & NAI Labs.
2002-10-28 11:06:58 +00:00
Dag-Erling Smørgrav cf2d89d98b libfetch is now WARNS5 clean in the non-SSL case. 2002-10-28 10:37:31 +00:00
Tim J. Robbins ae95ea1a26 Cross-reference putc(3). 2002-10-28 10:35:18 +00:00
Dag-Erling Smørgrav a1d214e88b Allow the admin to specify a different NAS identifier than the hostname.
Submitted by:	Boris Kovalenko <boris@ntmk.ru>
2002-10-28 10:28:46 +00:00
Dag-Erling Smørgrav 32a4a82829 Fix an off-by-one error (> where >= should have been used) which caused
_fetch_writev() to incorrectly report EPIPE in certain cases.

Also fix a number of const warnings by using __DECONST(), plus a signed /
unsigned comparison by casting the rhs to ssize_t.

Submitted by:	fenner, Craig Rodrigues <rodrigc@attbi.com>
2002-10-28 10:19:03 +00:00
Tim J. Robbins 9805beec05 Simplify by using inference rules properly. 2002-10-28 09:05:43 +00:00
Ruslan Ermilov 60e155d99e Emptify. 2002-10-28 08:44:59 +00:00
Murray Stokely 954c60ea7d Move SCSI drivers to third floppy disk (drivers.flp) to give "make
release" a chance of finishing on the Alpha platform.

The actual split between drivers on disks 2 and 3 should be optimized
so that most users don't need the third disk, but for now, I'm just
trying to get it working.
2002-10-28 08:34:48 +00:00
Tim J. Robbins c5929b304e Handle boundary cases more correctly; mblen(s, 0) and mbtowc(NULL, s, 0)
return -1 regardless of what s points to, mbtowc(&w, s, 1) sets w to a
null wide character when s points to a null byte. This seems to be closer
to what most other implementations do, but the C99 standard contradicts
itself for these cases.
2002-10-28 08:24:46 +00:00
Poul-Henning Kamp 8c847e9020 Add more compatibility junk. 2002-10-28 07:50:47 +00:00
David Xu 72465621ff Close a race window in kse_create(): signal delivered after SIGPENDING call
but before we call kse_link().
2002-10-28 07:37:06 +00:00
Luigi Rizzo 9a96729c64 Remove stale information from these two manpage, and point the readers
to the one up-to-date page which is ipfw(8).

MFC after: 3 days
2002-10-28 07:24:58 +00:00
Luigi Rizzo 4d5fe224c6 Misc fixes from Chris Pepper, plus additional explainations on
dummynet operation.

MFC after: 3 days
2002-10-28 07:03:56 +00:00
Chris Costello d25beabfca Remove a line that reflected behavior that does not actually exist.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-28 03:46:32 +00:00
Matthew N. Dodd c7f718ec6a Handle hints for the atspeaker device.
Document same.
2002-10-28 02:00:09 +00:00
Marcel Moolenaar d506d5dc0e Remove mf.a from sapic_read() and sapic_write(). We only care
about ordering and not acceptance. The removal of mf.a leaves
behind the mf that accompanied it.
2002-10-28 01:59:27 +00:00
Bill Fenner 8497092d00 Up WARNS to 3 if not building with crypto.
Approved by:	des
2002-10-28 01:41:28 +00:00
Marcel Moolenaar 9c156e012e Remove mf.a (the acceptance form of the memory fence instruction)
from all low-level bus space support functions. There's no need
to actually force the read/write to be accepted by the platform
before we can do anything else. We still have the mf instruction
there, which forces ordering. This too is not required given the
semantices of the bus space I/O functions, but it's not at all
clear to me if there are any poorly written device drivers that
depend on the strict ordering by the processor. The motto here is
to take small steps...
2002-10-28 01:00:57 +00:00
Marcel Moolenaar 84903f7f4e Make vmstat -i work:
o  Properly set the pointer to the counter for each interrupt and
   update the intrnames table.
o  Remove Alpha cruft from intrcnt.h.
o  Create INTRNAME_LEN as the single entity that defines the width
   of the names in the intrnames table (incl. terminatinf '\0').
2002-10-28 00:50:39 +00:00
Garrett Wollman c9885518de Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
Ian Dowse 4e08ccb2ff Fix a case in kern_rename() where a vn_finished_write() call was
missed. This bug has been present since the vn_start_write() and
vn_finished_write() calls were first added in revision 1.159. When
the case is triggered, any attempts to create snapshots on the
filesystem will deadlock and also prevent further write activity
on that filesystem.
2002-10-27 23:23:51 +00:00
Marcel Moolenaar 36cb272078 In ipi_send(), perform a mf instruction prior to initiating the IPI.
This guarantees that loads and stores emitted before the fence are
made visible before the IPI becomes pended.
Remove the mf.a instruction after initiating the IPI. There's no
guarantee that the IPI becomes pended prior to subsequent reads or
writes. Even if there was a guarantee, it would mostly be without
any benefit.
2002-10-27 23:00:46 +00:00
Sebastien Gioria d7da171b0d Serial + Parallel + Ethernet + NFS section translation 2002-10-27 20:26:56 +00:00
Nate Lawson c115dd45a4 Take care of the case for the default speed (no -s option) also. 2002-10-27 19:44:57 +00:00
Garrett Wollman 1d1971ac38 Implement the new 1003.1-2001 pathconf() keys, including the Advisory
Information option.  Other filesystem implementations should do something
similar.

With advice from:	mckusick, phk
2002-10-27 18:09:49 +00:00
Garrett Wollman c7047e5204 Change the way support for asynchronous I/O is indicated to applications
to conform to 1003.1-2001.  Make it possible for applications to actually
tell whether or not asynchronous I/O is supported.

Since FreeBSD's aio implementation works on all descriptor types, don't
call down into file or vnode ops when [f]pathconf() is asked about
_PC_ASYNC_IO; this avoids the need for every file and vnode op to know about
it.
2002-10-27 18:07:41 +00:00
Garrett Wollman 7303fe0613 As promised, downgrade the #error into a #warning. 2002-10-27 18:03:53 +00:00
Garrett Wollman 188c541ceb Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys.  Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong.  They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago.  (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
2002-10-27 18:03:02 +00:00
Garrett Wollman cd9a4d5d7a Add used #include <limits.h>. 2002-10-27 17:46:53 +00:00
Garrett Wollman 688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Nate Lawson cfe6d7e913 Move speed units conversion to right before it is used. This catches the
case when the -s option is not used.
2002-10-27 17:43:22 +00:00
Dag-Erling Smørgrav eb87c5a73a Don't complain about not knowing the remote file size when working in
quiet mode.

PR:		bin/37079
Submitted by:	Nicolas Rachinsky <list@rachinsky.de>
2002-10-27 17:33:08 +00:00
Jake Burkholder 1bc796d774 Don peril sensitive sun glasses and change the default system call vector
for sparc64 from trap #9 to trap #65.  This is one of the ABI "blessed"
system call vectors and is different from any other system that we might
want to emulate, making the emulation easier by reducing the number of
code paths that need to be shared.  Compatibility with old applications
is provided with COMPAT_FREEBSD4.
Add defines for a few special traps that we may need to implement for
compatibility with 32bit applications, and add comments on which vectors
are used for what in other systems, and which are available.
Pass magic flags to trap() for deprecated or unimplemented system call
vectors so they will deliver SIGSYS instead of SIGILL.

This piggy backs nicely with the recent sigaction(2) system call number
change, and provided the rules are followed for upgrading past it, this
change should not be noticed.
2002-10-27 17:22:43 +00:00
Dag-Erling Smørgrav 1a5424b137 Slight amendment to rev 1.34: instead of considering any short read an
error, only report an error if no data was read at all (unless len was
0 to start with).  Otherwise, the final read of practically any transfer
will end in a fatal error.
2002-10-27 17:20:49 +00:00
Maxime Henrion 7ab4b95b67 Don't roll our own clean target, the default one
works better.
2002-10-27 17:06:03 +00:00
Yoshihiro Takahashi 5c4ff91fbb Merged various changes from src/sbin/fdisk/fdisk.c revisions up to 1.66. 2002-10-27 16:43:59 +00:00
Dag-Erling Smørgrav 2761348f78 Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet).  Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().

This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.

PR:		bin/44123
Submitted by:	fenner
2002-10-27 16:11:21 +00:00
Robert Watson 9e913ebd0a Centrally manage enforcement of {reboot,swapon,sysctl} using the
mac_enforce_system toggle, rather than several separate toggles.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-27 15:50:49 +00:00
Dag-Erling Smørgrav 9f788e9c90 Eliminate two cases of undefined behaviour: total in _fetch_write() was
not initialized before use, and _http_growbuf() did not return a value
on success.

Reported by:	Peter Edwards <pmedwards@eircom.net>
MFC after:	2 weeks
2002-10-27 15:43:40 +00:00
Dag-Erling Smørgrav 97727a7dc1 Whitespace and indentation cleanup. 2002-10-27 15:32:51 +00:00
Dag-Erling Smørgrav 0c6d34af10 Forgot to disable alarms after fetchXGet() in previous commit. 2002-10-27 15:32:06 +00:00