Commit Graph

36164 Commits

Author SHA1 Message Date
Kelly Yancey
247a32f22a Fix filt_soread() to properly flag a kevent when a 0-byte datagram is
received.

Verified by:	dougb, Manfred Antar <null@pozo.com>
Sponsored by:	NTT Multimedia Communications Labs
2002-11-05 18:48:46 +00:00
Robert Watson
0c93266b9c Correct merge-o: disable the right execve() variation if !MAC 2002-11-05 18:04:50 +00:00
Robert Watson
939b97cba6 Update policy modules for changes in arguments associated with support
for label access on the interpreter, not just the shell script.  No
policies currently present in the system rely on the new labels.
2002-11-05 17:52:42 +00:00
Robert Watson
670cb89bf4 Bring in two sets of changes:
(1) Permit userland applications to request a change of label atomic
    with an execve() via mac_execve().  This is required for the
    SEBSD port of SELinux/FLASK.  Attempts to invoke this without
    MAC compiled in result in ENOSYS, as with all other MAC system
    calls.  Complexity, if desired, is present in policy modules,
    rather than the framework.

(2) Permit policies to have access to both the label of the vnode
    being executed as well as the interpreter if it's a shell
    script or related UNIX nonsense.  Because we can't hold both
    vnode locks at the same time, cache the interpreter label.
    SEBSD relies on this because it supports secure transitioning
    via shell script executables.  Other policies might want to
    take both labels into account during an integrity or
    confidentiality decision at execve()-time.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 17:51:56 +00:00
Robert Watson
051c41caf1 Regen. 2002-11-05 17:48:04 +00:00
Robert Watson
21bb9ea225 Flesh out the definition of __mac_execve(): per earlier discussion,
it's essentially execve() with an optional MAC label argument.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 17:47:08 +00:00
Robert Watson
b317d6f0aa Since neither the Biba policy nor the MLS policy make use of
transitioning, remove their transition entry points.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 16:44:29 +00:00
Peter Wemm
c987342f8e Grab 181 for HP/Compaq ProLiant advanced server management driver 2002-11-05 16:12:31 +00:00
Robert Watson
4443e9ff4a Assert that appropriate vnodes are locked in mac_execve_will_transition().
Allow transitioning to be twiddled off using the process and fs enforcement
flags, although at some point this should probably be its own flag.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 15:11:33 +00:00
Robert Watson
ccafe7eb35 Hook up the mac_will_execve_transition() and mac_execve_transition()
entrypoints, #ifdef MAC.  The supporting logic already existed in
kern_mac.c, so no change there.  This permits MAC policies to cause
a process label change as the result of executing a binary --
typically, as a result of executing a specially labeled binary.

For example, the SEBSD port of SELinux/FLASK uses this functionality
to implement TE type transitions on processes using transitioning
binaries, in a manner similar to setuid.  Policies not implementing
a notion of transition (all the ones in the tree right now) require
no changes, since the old label data is copied to the new label
via mac_create_cred() even if a transition does occur.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 14:57:49 +00:00
Giorgos Keramidas
5f9ae8e026 Typo in comment: commmand -> command
Reviewed by:	jhb
2002-11-05 14:54:07 +00:00
Juli Mallett
69af598209 Wrap function prototype declarations in __BEGIN_DECLS to do the right thing
with them in non-C cases, outside of the kernel.

Include <sys/cdefs.h> for __BEGIN_DECLS/__END_DECLS as other headers seem
to do in this area.

Requested by:	Patrick Hartling <patrick@137.org>
2002-11-05 10:57:53 +00:00
Matthew N. Dodd
791e59f673 Remove undefined variable.
Somehow this didn't make it in the last commits.
2002-11-05 10:56:14 +00:00
Matthew N. Dodd
71c5ce8d59 Style/whitespace changes. 2002-11-05 10:12:03 +00:00
Matthew N. Dodd
ec5de1cce2 Fix for GEOM.
Tested on:	 i386
2002-11-05 09:50:15 +00:00
Matthew N. Dodd
6fe8789d6d - Convert to newbus, bus_space etc.
- Move to MI space.

Tested on:	 i386
2002-11-05 09:37:32 +00:00
Marcel Moolenaar
654684338d o Remove devices that are commented out.
o  Enable sc
o  Remove NO_GEOM. We need GEOM for GPT.
o  Remove NO_CPU_COPTFLAGS.
2002-11-05 08:35:37 +00:00
Marcel Moolenaar
356492b3e2 Remove mcclock. It's an Alpha left-over. 2002-11-05 08:23:26 +00:00
David Xu
1f82496322 Fix typo. ioport_rid should be irq_rid. 2002-11-05 04:03:42 +00:00
Hidetoshi Shimokawa
851c3ad031 Sony CXD3222 OHCI i.LINK chips needs more DELAY before starting SCLK
when no devices are connected.
2002-11-05 02:42:28 +00:00
Robert Watson
450ffb4427 Remove reference to struct execve_args from struct imgact, which
describes an image activation instance.  Instead, make use of the
existing fname structure entry, and introduce two new entries,
userspace_argv, and userspace_envv.  With the addition of
mac_execve(), this divorces the image structure from the specifics
of the execve() system call, removes a redundant pointer, etc.
No semantic change from current behavior, but it means that the
structure doesn't depend on syscalls.master-generated includes.

There seems to be some redundant initialization of imgact entries,
which I have maintained, but which could probably use some cleaning
up at some point.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-05 01:59:56 +00:00
Julian Elischer
b655e33d55 Slight redesign for fitting in with -current. 2002-11-05 01:08:11 +00:00
Alan Cox
ada2a050be Export the function vm_page_splay(). 2002-11-04 19:21:39 +00:00
Olivier Houchard
e33bee0756 Call pcm_chn_destroy() in pcm_killchan() so that channel mutexes are destroyed and struct pcm_channel freed.
Reviewed by:	cg
MFC after:	3 days
2002-11-04 19:12:02 +00:00
Robert Watson
743d9c6a2d Implement mpo_check_system_acct and mpo_check_system_settime() for Biba:
require Biba privilege to configure either, and require that accounting
files be high integrity.  Note that this does allow implicit information
flow from low to high integrity, but it also protects the integrity
of accounting data.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-04 17:50:52 +00:00
Robert Watson
1980cf9b79 Correct use of mac_biba_subject_privileged() in swapon() code.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-04 17:36:47 +00:00
Robert Watson
e5e820fd1f Permit MAC policies to instrument the access control decisions for
system accounting configuration and for nfsd server thread attach.
Policies might use this to protect the integrity or confidentiality
of accounting data, limit the ability to turn on or off accounting,
as well as to prevent inappropriately labeled threads from becoming nfs
server threads.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-04 15:13:36 +00:00
Robert Watson
3da87a65c7 Remove mac_cache_fslabel_in_vnode sysctl -- with the new VFS/MAC
construction, labels are always cached.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-04 14:55:14 +00:00
Poul-Henning Kamp
a9ed5e1173 Polish a bit here and there.
Reenable the geom.ctl device so people can play with gbde.

Sponsored by:	DARPA & NAI Labs
2002-11-04 09:31:02 +00:00
Poul-Henning Kamp
5afa461402 Run a revision on the GBDE encryption facility.
Replace ARC4 with SHA2-512.
Change lock-structure encoding to use random ordering rather for obscurity.
Encrypt lock-structure with AES/256 instead of AES/128.
Change kkey derivation to be MD5 hash based.
Watch for malloc(M_NOWAIT) failures and ditch our cache when they happen.
Remove clause 3 of the license with NAI Labs consent.

Many thanks to "Lucky Green" <shamrock@cypherpunks.to> and "David
Wagner" <daw@cs.berkeley.edu>, for code reading, inputs and
suggestions.

This code has still not been stared at for 10 years by a gang of
hard-core cryptographers.  Discretion advised.

NB: These changes result in the on-disk format changing: dump/restore needed.

Sponsored by:   DARPA & NAI Labs.
2002-11-04 09:27:01 +00:00
Kirk McKusick
5878393060 Add debug.doslowdown to enable/disable niced slowdown on I/O. Default
to off until locking interference issues get sorted out.

Sponsored by:   DARPA & NAI Labs.
2002-11-04 07:29:20 +00:00
Poul-Henning Kamp
4b787a3959 Reject slices where begin == end.
Remove clause 3 from the license with NAI Labs consent.

Sponsored by:	DARPA & NAI Labs
2002-11-04 06:30:38 +00:00
Poul-Henning Kamp
a5b0a0ca37 Remove clause 3 in the license with NAI's consent.
Reject slices with type==0.
Diddle the bootverbose printfs.

Sponsored by:	DARPA & NAI Labs
2002-11-04 06:29:05 +00:00
Warner Losh
518792d85c Detach the pccard bus children when we eject a 16-bit card, not the
32-bit ones.  This was introduced in the last commit.
2002-11-04 03:01:56 +00:00
Robert Watson
372360693d Update licenses and wording: NAI has authorized the removal of clause three
of their BSD-style license; also, carry out the NAI Labs -> Network
Associates Laboratories renaming in these files.
2002-11-04 02:35:46 +00:00
Robert Watson
dc858fcabe License and wording updates: NAI has authorized the removal of clause
three from their BSD-style license.  Also, s/NAI Labs/Network Associates
Laboratories/.
2002-11-04 01:53:12 +00:00
Robert Watson
6201265be7 License clarification and wording changes: NAI has approved removal of
clause three, and NAI Labs now goes by the name Network Associates
Laboratories.
2002-11-04 01:42:39 +00:00
Marcel Moolenaar
fb584e4841 Add GPT entry types for partitions we're likely to encounter in the
wild. These include MS partitions and Linux partitions. At this time
there's no evidence that HP-UX uses GPT.
2002-11-03 23:53:42 +00:00
Scott Long
fb404d6fcf Hook the aic7xxx modules up. This requires some extra care since aicasm
is a compiler tool and needs to be compiled by the host compiler.  I've
tested this in i386->sparc cross-build, 4.7->current upgrade, normal
buildkernel target, and normal /sys/i386/compile/GENERIC configurations.

Submitted by:	ru
2002-11-03 23:48:14 +00:00
Alan Cox
c71f01affe - Remove the memory allocation for the object/offset hash table
because it's no longer used.  (See revision 1.215.)
 - Fix a harmless bug: the number of vm_page structures allocated wasn't
   properly adjusted when uma_bootstrap() was introduced.  Consequently,
   we were allocating 30 unused vm_page structures.
 - Wrap a long line.
2002-11-03 22:20:42 +00:00
Poul-Henning Kamp
fb8b107e52 Correctly recognize both bogus and genuine BSD disklabels.
Don't expect me to participate in a discussion which is which.

Sponsored by:	DARPA & NAI Labs.
2002-11-03 21:47:55 +00:00
Mitsuru IWASAKI
9bb04eb483 Add status initialization code for acpi_cmbat and acpi_acad,
acpi_cmbat_init_battery() and acpi_cmbat_init_acline() respectively.
Call acpi_cmbat_init_battery() from acpi_cmbat_resume() too just in
case.
This is a workaround for embedded controller operations which is
unstable for about a minute (typically 30 or 40 sec.) at boot time.
2002-11-03 10:49:24 +00:00
Hidetoshi Shimokawa
3592796a98 Enable if_fwe. 2002-11-03 10:41:30 +00:00
Yoshihiro Takahashi
7fa62ecb09 Add hints for wd1, wd2 and wd3. 2002-11-03 06:52:43 +00:00
Robert Watson
4b8d5f2d97 Introduce mac_check_system_settime(), a MAC check allowing policies to
augment the system policy for changing the system time.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-03 02:39:42 +00:00
Robert Watson
0d89ccd7d5 Change privilege model for mac_partition such that BSD superuser can change
the partition once a partition has been set.  This is required for correct
operation of sendmail between partitions.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-03 00:53:03 +00:00
Robert Watson
fabb3caa9e Sync to src/sys/kern/syscalls.master 2002-11-02 23:55:30 +00:00
Robert Watson
01ce3b5661 Regen from yesterday's system call placeholder rename. 2002-11-02 23:54:36 +00:00
Warner Losh
bcaa6b0541 MFp4:
o Always release the resources on device detach.
o Attach resources the same with driver added as we do we do in the insert
  case (maybe this should be a routine).
o signal the wakeup of the thread on resume instead of trying to force an
  interrupt.
o Minor debug hacks.
o use 0xffffffff instead of -1 for uint32_t items.
o Don't complain when we're asked to detach no cards.  This is normal.
o Eliminate the now worthless second parameter to card_detach_card.
o minor style(9)isms

Some of these patches may be from: iwasaki-san, jhb, iadowse
2002-11-02 23:00:28 +00:00
Alan Cox
151113a946 Catch up with the removal of the vm page buckets spin mutex. 2002-11-02 22:42:18 +00:00