Robert Watson [Wed, 7 Aug 2002 20:15:29 +0000 (20:15 +0000)]
Correct a bug introduced in 1.26: M_PKTHDR is set in the 'flags'
argument, not the 'type' argument. As a result of the buf, the
MAC label on some packet header mbufs might not be set in mbufs
allocated using m_getcl(), resulting in a page fault.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Robert Watson [Wed, 7 Aug 2002 19:30:16 +0000 (19:30 +0000)]
Cache the credential provided during accton() for use in later accounting
vnode operations. This permits the rights of the user (typically root)
used to turn on accounting to be used when writing out accounting entries,
rather than the credentials of the process generating the accounting
record. This fixes accounting in a number of environments, including
file systems that offer revocation support, MAC environments, some
securelevel scenarios, and in some NFS environments.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Robert Watson [Wed, 7 Aug 2002 17:53:31 +0000 (17:53 +0000)]
Refresh the credential on the first initproc thread following divorcing
the initproc credential from the proc0 credential. Otherwise, the
proc0 credential is used instead of initproc's credentil when authorizing
start_init() activities prior to initproc hitting userland for the
first time. This could result in the incorrect credential being used
to authorize mounting of the root file system, which could in turn cause
problems for NFS when used in combination with uid/gid ipfw rules, or
with MAC.
Luigi Rizzo [Wed, 7 Aug 2002 16:08:54 +0000 (16:08 +0000)]
Use new interface for ether_input().
Remove some unnecessary assignments to mbuf fields in sis_newbuf(),
the "length" fields are of no use while the mbuf is in the receive ring.
Ruslan Ermilov [Wed, 7 Aug 2002 13:41:46 +0000 (13:41 +0000)]
Makefile.inc1 may eventually be merged with Makefile, so fix an
endless recursion bug similar to the one that has been fixed in
release/Makefile,v 1.698, in advance. A related fix to make(1)
has been committed in make/main.c,v 1.68.
Mitsuru IWASAKI [Wed, 7 Aug 2002 12:48:28 +0000 (12:48 +0000)]
Improve stack manipulation code of ACPI wakeup routine.
The new code just override stack top value with saved return address
rather than pop/push operation.
Ian Dowse [Tue, 6 Aug 2002 19:31:04 +0000 (19:31 +0000)]
Our awk does not implement the ARGIND variable, so we were attempting
to parse the binary .kld file as a list of symbols. Fix this by
simply deleting the unwanted argument from the ARGV[] array instead
of trying to skip over it.
Alan Cox [Tue, 6 Aug 2002 19:01:08 +0000 (19:01 +0000)]
Set the ident field of the struct kevent that is registered by _aio_aqueue()
to the address of the user's aiocb rather than the kernel's aiocb. (In other
words, prior to this change, the ident field returned by kevent(2) on
completion of an AIO was effectively garbage.)
Jake Burkholder [Tue, 6 Aug 2002 18:56:41 +0000 (18:56 +0000)]
Remove new console devices with cnremove before initializing them in
cninit. This allows a console driver to replace the existing console
by calling cninit again, eg during the device probe. Otherwise the
multiple console code sends output to both, which is unfortunate if
they're using the same hardware.
Don Lewis [Tue, 6 Aug 2002 11:28:09 +0000 (11:28 +0000)]
Don't automagically call vslock() from SYSCTL_OUT(). Instead, complain
about calls to SYSCTL_OUT() made with locks held if the buffer has not
been pre-wired. SYSCTL_OUT() should not be called while holding locks,
but if this is not possible, the buffer should be wired by calling
sysctl_wire_old_buffer() before grabbing any locks.
Greg Lehey [Mon, 5 Aug 2002 23:54:22 +0000 (23:54 +0000)]
Remove Australia from list of locations supposedly having a bank
holiday on 6 August. Since this claim isn't dependent on the weekday,
I have my strong doubts about the other locations too, but I can't
confirm, so I'm leaving them in.
Alan Cox [Mon, 5 Aug 2002 19:14:27 +0000 (19:14 +0000)]
o The introduction of kevent() broke lio_listio(): _aio_aqueue() thought
that LIO_READ and LIO_WRITE were requests for kevent()-based
notification of completion. Modify _aio_aqueue() to recognize LIO_READ
and LIO_WRITE.
Notes: (1) The patch provided by the PR perpetuates a second bug in this
code, a direct access to user-space memory. This change fixes that bug
as well. (2) This change is to code that implements a deprecated interface.
It should probably be removed after an MFC.
Max Khon [Mon, 5 Aug 2002 18:14:16 +0000 (18:14 +0000)]
Make driver portable:
- bus_space'ify
- generate fake ethernet address using read_random() instead of reading
from timer i/o ports
Other minor fixes:
- remove "hack" in connect_to_master()
- use M_ZERO
- remove unused variable in sbni_ioctl()
- properly release irq in sbni_attach_isa() on attach errors
Yaroslav Tykhiy [Mon, 5 Aug 2002 17:34:15 +0000 (17:34 +0000)]
1) Use "pathstring" instead of "STRING" consistently.
2) Remove unneeded "if not NULL" props from "pathstring",
which will never be NULL by the lexer design.
Ruslan Ermilov [Mon, 5 Aug 2002 16:46:14 +0000 (16:46 +0000)]
The side effect of revision 1.687 (env -i) was that many useful knobs
are no longer propagated to the chrooted environment, e.g. NOKERBEROS.
On the other hand, TMPDIR and MAKEOBJDIRPREFIX should no longer be.
Yaroslav Tykhiy [Mon, 5 Aug 2002 14:40:38 +0000 (14:40 +0000)]
Since GLOB_NOCHECK is set in the glob(3) call,
glob(3) will return at least one pathname unless
a system error has occured. It's not a "not found"
error otherwise.
Yaroslav Tykhiy [Mon, 5 Aug 2002 14:10:57 +0000 (14:10 +0000)]
Disallow invalid numeric mode values for SITE CHMOD.
Earlier, a decimal number (e.g., 890) could be passed
for mode, leading to dangerous permissions set:
-1, that is, 07777.
Tim J. Robbins [Mon, 5 Aug 2002 10:50:39 +0000 (10:50 +0000)]
Use In macro instead of Fd. Add crossref to wctype(3). Refer to 1003.1-2001
in STANDARDS section. Document functions which are extensions to the standard.
Tim J. Robbins [Mon, 5 Aug 2002 10:45:23 +0000 (10:45 +0000)]
Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),
towlower() and towupper() required by ISO C90 Amd. 1.
iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(),
iswrune() and iswspecial() have also been implemented for consistency
with the BSD extensions in <ctype.h>.
Reject encoding > ENCODING_LEN at early stage instead of truncating it.
Use ptr == NULL instead of !ptr in few places.
Move saverr declaration to global section.
Ruslan Ermilov [Mon, 5 Aug 2002 08:54:26 +0000 (08:54 +0000)]
An empty CPUTYPE now means ``the default CPUTYPE'' in bsd.cpu.mk.
If there was no CPUTYPE assignment in /etc/make.conf, this would
cause the ``CPUTYPE assignment type'' check to falsely fail.
Reported by: johan
Fixed this by making sure we always pass the non-empty CPUTYPE.
Also make sure we use the correct set of share/mk files in our
test.
Doug Barton [Mon, 5 Aug 2002 08:47:52 +0000 (08:47 +0000)]
Suppress spurious warning messages about rm -rf TEMPROOT failing
before chflags, and exit non-zero if the old TEMPROOT dir
can't be deleted for whatever reason.
Tim J. Robbins [Mon, 5 Aug 2002 08:04:58 +0000 (08:04 +0000)]
Manual pages for wide character classification (isw*) and case conversion
(tow*) functions from NetBSD, unmodified except for the addition of $FreeBSD$.
Warner Losh [Mon, 5 Aug 2002 07:36:11 +0000 (07:36 +0000)]
Add more (possibly useless) information to wicontrol's output (maybe
some of these need to be enabled for an extra verbose mode or
something):
o Try to print the dBm comms quality. This may or may not be available
for your card in your configuration.
o Print the PRI Id and STA Id. These are in the raw format, so might
be a little hard to read.
o Print CardID so that we can know exactly what kind of card the
user has (this is important if you download firmware to it).
o Regulatory domains are now printed for the card.
o Temp range is printed.
o If you define WI_EXTRA_INFO you get more garbage than is listed
here that you need the manual to decode.
o Channel list is now printed in hex for easier decoding. This has
lead to my discovery that my US symbol card supports channels 12-14
as well as 1-11, which is not allowed in the us/canada.
Warner Losh [Mon, 5 Aug 2002 07:24:02 +0000 (07:24 +0000)]
Differentiate between AT45DB011 compatible large serial flash parts
and the AT24C08 small serial flash parts. We still report these as
the same part (since we group things already), but now we recognize
the small serial versions as well.
Warner Losh [Mon, 5 Aug 2002 07:19:27 +0000 (07:19 +0000)]
Add a comment that says it looks like lucent cards have a primary
firmware revision as well (not sure which firmware versions are needed
for this, but the 6.x and 8.x 'software' versions that I have seem to
support it).
Add dBm comm quality RID. This is like the normal comm quality rid,
except the signal and noise numbers are normalized to dBm. Some
revisions of the prism firmware, however, don't support this RID, and
some that do support it return 0 for quality and/or noise. Your
milage may vary.
Add a macro for SLIST traversal 'SLIST_FOREACH_PREVPTR',
this macro keeps a pointer to the previous element's next
pointer to allow for search and O(1) removal.
Doug Barton [Mon, 5 Aug 2002 01:03:12 +0000 (01:03 +0000)]
Fix a couple DESTDIR related problems. Credit for the "Only in" section
goes to James <James_Bond_79@yahoo.com>, and Cyrille Lefevre
<cyrille.lefevre@laposte.net>. The make variables problem was found
by jon.
Luigi Rizzo [Sun, 4 Aug 2002 23:55:06 +0000 (23:55 +0000)]
Extend the interface to ether_input(): a NULL eh pointer means that
the mbuf contains the ethernet header (eh) as well, which ether_input()
will strip off as needed.
This permits the removal (in a backward compatible way) of the
header removal code which right now is replicated in all drivers,
sometimes in an inconsistent way. Also, because many functions
called after ether_input() require the eh in the mbuf, eventually
we can propagate the interface and handle outdated drivers just
in ether_input().
Individual driver changes to use the new interface will follow as
we have a chance to touch them.
NOTE THAT THIS CHANGE IS FULLY BACKWARD COMPATIBLE AND DOES NOT BREAK
BINARY COMPATIBILITY FOR DRIVERS.