]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 years agoConsolidate the device recognition code.
Josef Karthauser [Sun, 18 Aug 2002 00:24:03 +0000 (00:24 +0000)]
Consolidate the device recognition code.

22 years agoOops, last manual commit was to -stable, should have been to -current.
Matthew Dillon [Sat, 17 Aug 2002 20:44:24 +0000 (20:44 +0000)]
Oops, last manual commit was to -stable, should have been to -current.
No biggy, the code MFC to stable will catch up to the docs in a week.

X-MFC after:    -7 days

22 years agoMove wcwidth() to separate file, it doesn't belong to iswctype.c at all
Andrey A. Chernov [Sat, 17 Aug 2002 20:30:34 +0000 (20:30 +0000)]
Move wcwidth() to separate file, it doesn't belong to iswctype.c at all

22 years agoAccording to SUSv2, wcwidth() should return -1 for non-printing characters
Andrey A. Chernov [Sat, 17 Aug 2002 20:11:31 +0000 (20:11 +0000)]
According to SUSv2, wcwidth() should return -1 for non-printing characters

22 years agoCosmetic - remove unneded brackets and #undef
Andrey A. Chernov [Sat, 17 Aug 2002 20:03:44 +0000 (20:03 +0000)]
Cosmetic - remove unneded brackets and #undef

22 years agoNow that NEWCARD is gone, NEWCARD.hints is even less necessary.
Warner Losh [Sat, 17 Aug 2002 20:03:02 +0000 (20:03 +0000)]
Now that NEWCARD is gone, NEWCARD.hints is even less necessary.

Noticed by: bde

22 years agoImplement TCP bandwidth delay product window limiting, similar to (but
Matthew Dillon [Sat, 17 Aug 2002 18:26:02 +0000 (18:26 +0000)]
Implement TCP bandwidth delay product window limiting, similar to (but
not meant to duplicate) TCP/Vegas.  Add four sysctls and default the
implementation to 'off'.

net.inet.tcp.inflight_enable enable algorithm (defaults to 0=off)
net.inet.tcp.inflight_debug debugging (defaults to 1=on)
net.inet.tcp.inflight_min minimum window limit
net.inet.tcp.inflight_max maximum window limit

MFC after: 1 week

22 years agoIf we're using ancient (pre 1.17.0) 2100 f/w (for the cards that cannot
Matt Jacob [Sat, 17 Aug 2002 17:29:15 +0000 (17:29 +0000)]
If we're using ancient (pre 1.17.0) 2100 f/w (for the cards that cannot
load f/w images > 0x7fff words), set ISP_FW_ATTR_SCCLUN. We explicitly
don't believe we can find attributes if f/w is < 1.17.0, so we have to
set SCCLUN for the 1.15.37 f/w we're using manually- otherwise every
target will replicate itself across all 16 supported luns for non-SCCLUN
f/w.

Correctly set things up for 23XX and either fast posting or ZIO. The
23XX, it turns out, does not support RIO. If you put a non-zero value
in xfwoptions, this will disable fast posting. If you put ICBXOPT_ZIO
in xfwoptions, then the 23XX will do interrupt delays but post to the
response queue- apparently QLogic *now* believes that reading multiple
handles from registers is less of a win than writing (and delaying)
multiple 64 byte responses to the response queue.

At the end of taking a a good f/w crash dump, send the ISPASYNC_FW_DUMPED
event to the outer layers (who can then do things like wake a user
daemon to *fetch* the crash image, etc.).

22 years agoWe only do isp_reinit from isp_async if ISP_FW_CRASH_DUMP is defined-
Matt Jacob [Sat, 17 Aug 2002 17:23:15 +0000 (17:23 +0000)]
We only do isp_reinit from isp_async if ISP_FW_CRASH_DUMP is defined-
otherwise the core code does this.

22 years agoFix the incorrect parsing of the Risc2Host isr. For RIO_16,
Matt Jacob [Sat, 17 Aug 2002 17:21:54 +0000 (17:21 +0000)]
Fix the incorrect parsing of the Risc2Host isr. For RIO_16,
fast posting command completion, and fast post CTIO completion,
the upper half of Risc2Host is a copy of mailbox #1- *not*
mailbox #0.

MFC after: 1 day

22 years agoAdd ICBXOPT_ZIO definition.
Matt Jacob [Sat, 17 Aug 2002 17:19:29 +0000 (17:19 +0000)]
Add ICBXOPT_ZIO definition.

22 years agoAdd ISPASYNC_FW_DUMPED async event.
Matt Jacob [Sat, 17 Aug 2002 17:19:09 +0000 (17:19 +0000)]
Add ISPASYNC_FW_DUMPED async event.

add ISP_FW_NEWER_THAN macro- makes the code easier to read.

22 years agoSupport for VIA VT8233 audio controller.
Orion Hodson [Sat, 17 Aug 2002 16:23:44 +0000 (16:23 +0000)]
Support for VIA VT8233 audio controller.

22 years agoRemove support for the vt8233. Specs for chipset changed mid-revision
Orion Hodson [Sat, 17 Aug 2002 16:13:29 +0000 (16:13 +0000)]
Remove support for the vt8233.  Specs for chipset changed mid-revision
so this code was not working for the newer VIA chipsets.

22 years agowcwidth: fix espression to work correctly with SWIDTH0
Andrey A. Chernov [Sat, 17 Aug 2002 14:16:14 +0000 (14:16 +0000)]
wcwidth: fix espression to work correctly with SWIDTH0

22 years agoShow job control ID, command text, etc. when foreground processes are
Tim J. Robbins [Sat, 17 Aug 2002 13:57:47 +0000 (13:57 +0000)]
Show job control ID, command text, etc. when foreground processes are
suspended. This is a followup to rev. 1.51.

MFC after: 1 week

22 years agoAdd ut to xterm (which was removed from vt* it refers)
Andrey A. Chernov [Sat, 17 Aug 2002 12:34:59 +0000 (12:34 +0000)]
Add ut to xterm (which was removed from vt* it refers)

22 years agoIn continuation of early fileop credential changes, modify fo_ioctl() to
Robert Watson [Sat, 17 Aug 2002 02:36:16 +0000 (02:36 +0000)]
In continuation of early fileop credential changes, modify fo_ioctl() to
accept an 'active_cred' argument reflecting the credential of the thread
initiating the ioctl operation.

- Change fo_ioctl() to accept active_cred; change consumers of the
  fo_ioctl() interface to generally pass active_cred from td->td_ucred.
- In fifofs, initialize filetmp.f_cred to ap->a_cred so that the
  invocations of soo_ioctl() are provided access to the calling f_cred.
  Pass ap->a_td->td_ucred as the active_cred, but note that this is
  required because we don't yet distinguish file_cred and active_cred
  in invoking VOP's.
- Update kqueue_ioctl() for its new argument.
- Update pipe_ioctl() for its new argument, pass active_cred rather
  than td_ucred to MAC for authorization.
- Update soo_ioctl() for its new argument.
- Update vn_ioctl() for its new argument, use active_cred rather than
  td->td_ucred to authorize VOP_IOCTL() and the associated VOP_GETATTR().

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoCosmetic-only changes for readability.
Jeffrey Hsu [Sat, 17 Aug 2002 02:05:25 +0000 (02:05 +0000)]
Cosmetic-only changes for readability.

Reviewed by: (early form passed by) bde
Approved by: itojun (from core@kame.net)

22 years agoRevert change to detect multiply PHYs in mii code. There might be cases
Doug Ambrisko [Fri, 16 Aug 2002 23:19:16 +0000 (23:19 +0000)]
Revert change to detect multiply PHYs in mii code.  There might be cases
when this is needed.  Work around bogus second PHY in the DFE-580 card
via a change in the if_ste.c driver.

Suggested by: jdp
Reviewed by: jdp
MFC after: 3 days

22 years agoUpdates to cmd6workaround:
Nate Lawson [Fri, 16 Aug 2002 22:05:19 +0000 (22:05 +0000)]
Updates to cmd6workaround:
* Only update cdb in place if not CDB_POINTER
* Correctly check for QFRZ before restarting CCB
* More accurate printf message
* style(9) changes at end

Patch tested successfully on Maxtor 4 G120J6 GAK8.

22 years agoFurther improved the performance of sbreserve() by moving the calculation
David Greenman [Fri, 16 Aug 2002 18:41:48 +0000 (18:41 +0000)]
Further improved the performance of sbreserve() by moving the calculation
of the adjusted sb_max into a sysctl handler for sb_max and assigning it to
a variable that is used instead. This eliminates the 32bit multiply and
divide from the fast path that was being done previously.

22 years agoChange a POSIX conditional to use the new __BSD_VISIBLE macro.
Mike Barcroft [Fri, 16 Aug 2002 16:34:26 +0000 (16:34 +0000)]
Change a POSIX conditional to use the new __BSD_VISIBLE macro.

Fix the following style bugs:
o #ifdef, #ifndef, and #undef should be followed by a space, not a
  tab.
o The second level of indentation in prototypes is 4 characters even
  when the function names are indented 1 extra character.
o Type qualifiers that appear next to a * need a seperating space so
  that the qualifier isn't easily confused with parameter names.
  (eg. `char * __restrict' instead of `char *__restrict')

Submitted by: bde (mostly)

22 years agoFix more breakage due to FSTYPENAMES/DKTYPENAMES split.
Bosko Milekic [Fri, 16 Aug 2002 16:08:36 +0000 (16:08 +0000)]
Fix more breakage due to FSTYPENAMES/DKTYPENAMES split.

Also submitted by: David Wolfskill <david@catwhisker.org>

22 years agoFix libc build breakage by defining FSTYPENAMES before including
Bosko Milekic [Fri, 16 Aug 2002 15:33:20 +0000 (15:33 +0000)]
Fix libc build breakage by defining FSTYPENAMES before including
disklabel.h; broken originally by 1.87 of sys/disklabel.h, which
made the split between DKTYPENAMES and FSTYPENAMES.
Someone who knows disklabel.c: do we still need DKTYPENAMES to be
defined here now?

22 years agoRegen:
Sheldon Hearn [Fri, 16 Aug 2002 14:55:51 +0000 (14:55 +0000)]
Regen:

* Hart: rev 321 of pcidevs.txt (2002-08-11)
* Boemler: vendors.txt (2002-08-10)

22 years agoComplete list of differences between ipfw1 and ipfw2.
Luigi Rizzo [Fri, 16 Aug 2002 14:27:22 +0000 (14:27 +0000)]
Complete list of differences between ipfw1 and ipfw2.

22 years agoWrap maintenance of varios nmac{objectname} counters in MAC_DEBUG so we
Robert Watson [Fri, 16 Aug 2002 14:21:38 +0000 (14:21 +0000)]
Wrap maintenance of varios nmac{objectname} counters in MAC_DEBUG so we
can avoid the cost of a large number of atomic operations if we're not
interested in the object count statistics.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoCorrect white space nits that crept in during my recent merges of
Robert Watson [Fri, 16 Aug 2002 14:12:40 +0000 (14:12 +0000)]
Correct white space nits that crept in during my recent merges of
trustedbsd_mac material.

22 years agoAdd swidth definitions and lex code to mklocale
Michael C . Wu [Fri, 16 Aug 2002 13:46:43 +0000 (13:46 +0000)]
Add swidth definitions and lex code to mklocale
After adding swidth support in iswctype.c and ctype.h

Submitted by: clkao@clkao.org
Reviewed by: keichii,ache
Obtained from: NetBSD
MFC after: 1 month

22 years agoAdd iswctype wcwidth function code
Michael C . Wu [Fri, 16 Aug 2002 13:45:23 +0000 (13:45 +0000)]
Add iswctype wcwidth function code

Submitted by: clkao@clkao.org
Reviewed by: keichii
Obtained from: NetBSD
MFC after: 1 month

22 years agoAdd swidth definition for wchar stuff
Michael C . Wu [Fri, 16 Aug 2002 13:42:59 +0000 (13:42 +0000)]
Add swidth definition for wchar stuff

Submitted by: clkao@clkao.org
Reviewed by: keichii
Obtained from: NetBSD
MFC after: 1 month

22 years agoMake similar changes to fo_stat() and fo_poll() as made earlier to
Robert Watson [Fri, 16 Aug 2002 12:52:03 +0000 (12:52 +0000)]
Make similar changes to fo_stat() and fo_poll() as made earlier to
fo_read() and fo_write(): explicitly use the cred argument to fo_poll()
as "active_cred" using the passed file descriptor's f_cred reference
to provide access to the file credential.  Add an active_cred
argument to fo_stat() so that implementers have access to the active
credential as well as the file credential.  Generally modify callers
of fo_stat() to pass in td->td_ucred rather than fp->f_cred, which
was redundantly provided via the fp argument.  This set of modifications
also permits threads to perform these operations on behalf of another
thread without modifying their credential.

Trickle this change down into fo_stat/poll() implementations:

- badfo_poll(), badfo_stat(): modify/add arguments.
- kqueue_poll(), kqueue_stat(): modify arguments.
- pipe_poll(), pipe_stat(): modify/add arguments, pass active_cred to
  MAC checks rather than td->td_ucred.
- soo_poll(), soo_stat(): modify/add arguments, pass fp->f_cred rather
  than cred to pru_sopoll() to maintain current semantics.
- sopoll(): moidfy arguments.
- vn_poll(), vn_statfile(): modify/add arguments, pass new arguments
  to vn_stat().  Pass active_cred to MAC and fp->f_cred to VOP_POLL()
  to maintian current semantics.
- vn_close(): rename cred to file_cred to reflect reality while I'm here.
- vn_stat(): Add active_cred and file_cred arguments to vn_stat()
  and consumers so that this distinction is maintained at the VFS
  as well as 'struct file' layer.  Pass active_cred instead of
  td->td_ucred to MAC and to VOP_GETATTR() to maintain current semantics.

- fifofs: modify the creation of a "filetemp" so that the file
  credential is properly initialized and can be used in the socket
  code if desired.  Pass ap->a_td->td_ucred as the active
  credential to soo_poll().  If we teach the vnop interface about
  the distinction between file and active credentials, we would use
  the active credential here.

Note that current inconsistent passing of active_cred vs. file_cred to
VOP's is maintained.  It's not clear why GETATTR would be authorized
using active_cred while POLL would be authorized using file_cred at
the file system level.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoMFNetBSD: 1.51
Josef Karthauser [Fri, 16 Aug 2002 12:16:07 +0000 (12:16 +0000)]
MFNetBSD: 1.51

Move a quirk tests so the message printed about directionality is
right.

22 years agoMFNetBSD: (1.50) Get rid of trailing white space.
Josef Karthauser [Fri, 16 Aug 2002 12:13:26 +0000 (12:13 +0000)]
MFNetBSD: (1.50) Get rid of trailing white space.

22 years agosys/netinet/ip_fw2.c:
Luigi Rizzo [Fri, 16 Aug 2002 10:31:47 +0000 (10:31 +0000)]
sys/netinet/ip_fw2.c:

    Implement the M_SKIP_FIREWALL bit in m_flags to avoid loops
    for firewall-generated packets (the constant has to go in sys/mbuf.h).

    Better comments on keepalive generation, and enforce dyn_rst_lifetime
    and dyn_fin_lifetime to be less than dyn_keepalive_period.

    Enforce limits (up to 64k) on the number of dynamic buckets, and
    retry allocation with smaller sizes.

    Raise default number of dynamic rules to 4096.

    Improved handling of set of rules -- now you can atomically
    enable/disable multiple sets, move rules from one set to another,
    and swap sets.

sbin/ipfw/ipfw2.c:

    userland support for "noerror" pipe attribute.

    userland support for sets of rules.

    minor improvements on rule parsing and printing.

sbin/ipfw/ipfw.8:

    more documentation on ipfw2 extensions, differences from ipfw1
    (so we can use the same manpage for both), stateful rules,
    and some additional examples.
    Feedback and more examples needed here.

22 years agoForgot to change branches for my src tree. MFS my birthdate.
Sean Chittenden [Fri, 16 Aug 2002 09:41:07 +0000 (09:41 +0000)]
Forgot to change branches for my src tree.  MFS my birthdate.

Pointed out by: maxim
Reviewed by: knu (mentor)
Approved by: knu (mentor)

22 years agoMFNetBSD:
Josef Karthauser [Fri, 16 Aug 2002 09:10:43 +0000 (09:10 +0000)]
MFNetBSD:
revision 1.127
date: 2002/08/07 20:03:19;  author: augustss;  lines: +4 -8
Fix some braindead calls to free memory (only encountered
under low memory conditions).  From OpenBSD.

22 years agomake the strings for tcptimers, tanames and prurequests const to silence
Alfred Perlstein [Fri, 16 Aug 2002 09:07:59 +0000 (09:07 +0000)]
make the strings for tcptimers, tanames and prurequests const to silence
warnings.

22 years agoforgot to actually commit the DK/FS TYPES split, do it now.
Alfred Perlstein [Fri, 16 Aug 2002 09:07:15 +0000 (09:07 +0000)]
forgot to actually commit the DK/FS TYPES split, do it now.

22 years agoNo need to include sys/time.h, this unbreaks a c89 warning about long long
Alfred Perlstein [Fri, 16 Aug 2002 08:19:15 +0000 (08:19 +0000)]
No need to include sys/time.h, this unbreaks a c89 warning about long long
constants as well.

22 years agofix comment typo: naem -> name
Alfred Perlstein [Fri, 16 Aug 2002 07:42:18 +0000 (07:42 +0000)]
fix comment typo: naem -> name

22 years agoDon't '#define DKTYPENAMES', we don't use the variable it exposes from
Alfred Perlstein [Fri, 16 Aug 2002 07:34:19 +0000 (07:34 +0000)]
Don't '#define DKTYPENAMES', we don't use the variable it exposes from
the header file.

22 years agoadd a check for GNUC < 3 to typedef bool because gcc 3 always seems to
Alfred Perlstein [Fri, 16 Aug 2002 07:33:14 +0000 (07:33 +0000)]
add a check for GNUC < 3 to typedef bool because gcc 3 always seems to
define it.

Suggested by: tjr

22 years agoHide 'struct ucred' behind '#ifdef _KERNEL', this should stop userland
Alfred Perlstein [Fri, 16 Aug 2002 07:01:43 +0000 (07:01 +0000)]
Hide 'struct ucred' behind '#ifdef _KERNEL', this should stop userland
from attempting to use it for good.  There is a catch, kvm_proc.c needs
to '#define _KERNEL' to get at the ucred.

Requested by: rwatson

22 years agoWhen a cluster entry for ``.'' is set to 0, msdosfs fails to handle it
Tom Rhodes [Fri, 16 Aug 2002 05:13:42 +0000 (05:13 +0000)]
When a cluster entry for ``.'' is set to 0, msdosfs fails to handle it
correctly.

PR: 24393
Submitted by: semenu
Approved by: rwatson (mentor)
MFC after: 1 week

22 years agoRewrote the space check algorithm in sbreserve() so that the extremely
David Greenman [Fri, 16 Aug 2002 05:08:46 +0000 (05:08 +0000)]
Rewrote the space check algorithm in sbreserve() so that the extremely
expensive (!) 64bit multiply, divide, and comparison aren't necessary
(this came in originally from rev 1.19 to fix an overflow with large
sb_max or MCLBYTES).
The 64bit math in this function was measured in some kernel profiles as
being as much as 5-8% of the total overhead of the TCP/IP stack and
is eliminated with this commit. There is a harmless rounding error (of
about .4% with the standard values) introduced with this change,
however this is in the conservative direction (downward toward a
slightly smaller maximum socket buffer size).

MFC after: 3 days

22 years agoRemove usbhidaction(1) manual page under SEE ALSO section. This will be
Tom Rhodes [Fri, 16 Aug 2002 05:01:11 +0000 (05:01 +0000)]
Remove usbhidaction(1) manual page under SEE ALSO section.  This will be
added again if/when we port the framework.

Submitted by: mwlucas
Approved by: joe

22 years agoBump document date for the -n option.
Johan Karlsson [Fri, 16 Aug 2002 03:13:59 +0000 (03:13 +0000)]
Bump document date for the -n option.

Approved by: sheldonh (mentor)

22 years agoBump document date for the 'beep only' change.
Johan Karlsson [Fri, 16 Aug 2002 03:08:25 +0000 (03:08 +0000)]
Bump document date for the 'beep only' change.

22 years agoAdd LOGIN_SETMAC, which will indicate to the user context management code
Robert Watson [Fri, 16 Aug 2002 02:14:21 +0000 (02:14 +0000)]
Add LOGIN_SETMAC, which will indicate to the user context management code
that it should also set the user's default MAC label, if available and
permitted.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoUse symbolic constants instead of magic address constants.
Jake Burkholder [Fri, 16 Aug 2002 01:37:49 +0000 (01:37 +0000)]
Use symbolic constants instead of magic address constants.

22 years agoMinor style. Removed unused declaration.
Jake Burkholder [Fri, 16 Aug 2002 01:35:00 +0000 (01:35 +0000)]
Minor style.  Removed unused declaration.

22 years agoRemoved unneeded pmap_initialized flag.
Jake Burkholder [Fri, 16 Aug 2002 01:33:03 +0000 (01:33 +0000)]
Removed unneeded pmap_initialized flag.

22 years agoDemark sections of code that need special fault handling with labels.
Jake Burkholder [Fri, 16 Aug 2002 00:57:37 +0000 (00:57 +0000)]
Demark sections of code that need special fault handling with labels.
Check if the trapped pc is inside of the demarked sections to implement
fault recovery for copyin etc, instead of pcb_onfault.  Handle recovery
from data access exceptions as well as page faults.

Inspired by: bde's sys.dif

22 years agoBah! Use the full name for Florida.
Joe Marcus Clarke [Thu, 15 Aug 2002 22:44:56 +0000 (22:44 +0000)]
Bah!  Use the full name for Florida.

22 years agoAdd myself.
Joe Marcus Clarke [Thu, 15 Aug 2002 22:43:01 +0000 (22:43 +0000)]
Add myself.

22 years agoUHCI_DEBUG -> USB_DEBUG.
Josef Karthauser [Thu, 15 Aug 2002 22:41:20 +0000 (22:41 +0000)]
UHCI_DEBUG -> USB_DEBUG.

22 years agoAdd myself.
David Greenman [Thu, 15 Aug 2002 22:34:45 +0000 (22:34 +0000)]
Add myself.

22 years agoFor some reason, the flags and td arguments in the fo_read prototype
Robert Watson [Thu, 15 Aug 2002 22:12:53 +0000 (22:12 +0000)]
For some reason, the flags and td arguments in the fo_read prototype
were reversed.  Correct this with no functional change.

22 years agoCode formatting sync to trustedbsd_mac: don't perform an assignment
Robert Watson [Thu, 15 Aug 2002 22:04:31 +0000 (22:04 +0000)]
Code formatting sync to trustedbsd_mac: don't perform an assignment
in an if clause.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:

22 years agoRemove a case of exposing 'struct ucred' to userspace. Use a struct xucred
Alfred Perlstein [Thu, 15 Aug 2002 21:52:22 +0000 (21:52 +0000)]
Remove a case of exposing 'struct ucred' to userspace.  Use a struct xucred
for LOCKD_MSG instead.

Requested by: rwatson

22 years agoRemove cam_extend.c from sources to unbreak modules.
Alfred Perlstein [Thu, 15 Aug 2002 21:41:59 +0000 (21:41 +0000)]
Remove cam_extend.c from sources to unbreak modules.

Missed by: kern/39809,njl

22 years agoCorrect a minor whitespace nit that sneaked in with my previous commit.
Robert Watson [Thu, 15 Aug 2002 21:41:20 +0000 (21:41 +0000)]
Correct a minor whitespace nit that sneaked in with my previous commit.

22 years agoFix typos: s/Ths/This, s/counties/countries
Marc Fonvieille [Thu, 15 Aug 2002 21:25:41 +0000 (21:25 +0000)]
Fix typos: s/Ths/This, s/counties/countries

PR: docs/39060
Submitted by: Nicola Vitale <nivit@libero.it>
MFC after: 3 days

22 years ago - Fix a bug that wrote one char behind the end of the
Robert Drehmel [Thu, 15 Aug 2002 21:19:31 +0000 (21:19 +0000)]
 - Fix a bug that wrote one char behind the end of the
   supplied buffer in case the size of it was equal to
   the number of characters the converted address consumed.
   The bug occurred when converting an AF_INET address.
 - Remove the SPRINTF macro and use sprintf instead.
 - Do not do string formatting using sprintf(3) and a
   temporary buffer which is copied when the supplied
   buffer provides enough space.  Instead, use snprintf(3)
   and the real destination buffer, thus avoid the copy.

Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1)
PR: misc/41289

22 years agoRemove cam_extend.[ch] after all references to them were removed.
Nate Lawson [Thu, 15 Aug 2002 20:55:38 +0000 (20:55 +0000)]
Remove cam_extend.[ch] after all references to them were removed.

PR: kern/39809
Approved by: gibbs

22 years agoIn order to better support flexible and extensible access control,
Robert Watson [Thu, 15 Aug 2002 20:55:08 +0000 (20:55 +0000)]
In order to better support flexible and extensible access control,
make a series of modifications to the credential arguments relating
to file read and write operations to cliarfy which credential is
used for what:

- Change fo_read() and fo_write() to accept "active_cred" instead of
  "cred", and change the semantics of consumers of fo_read() and
  fo_write() to pass the active credential of the thread requesting
  an operation rather than the cached file cred.  The cached file
  cred is still available in fo_read() and fo_write() consumers
  via fp->f_cred.  These changes largely in sys_generic.c.

For each implementation of fo_read() and fo_write(), update cred
usage to reflect this change and maintain current semantics:

- badfo_readwrite() unchanged
- kqueue_read/write() unchanged
  pipe_read/write() now authorize MAC using active_cred rather
  than td->td_ucred
- soo_read/write() unchanged
- vn_read/write() now authorize MAC using active_cred but
  VOP_READ/WRITE() with fp->f_cred

Modify vn_rdwr() to accept two credential arguments instead of a
single credential: active_cred and file_cred.  Use active_cred
for MAC authorization, and select a credential for use in
VOP_READ/WRITE() based on whether file_cred is NULL or not.  If
file_cred is provided, authorize the VOP using that cred,
otherwise the active credential, matching current semantics.

Modify current vn_rdwr() consumers to pass a file_cred if used
in the context of a struct file, and to always pass active_cred.
When vn_rdwr() is used without a file_cred, pass NOCRED.

These changes should maintain current semantics for read/write,
but avoid a redundant passing of fp->f_cred, as well as making
it more clear what the origin of each credential is in file
descriptor read/write operations.

Follow-up commits will make similar changes to other file descriptor
operations, and modify the MAC framework to pass both credentials
to MAC policy modules so they can implement either semantic for
revocation.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoRemove usage of cam_extend.c, replace with dev->si_drv1
Nate Lawson [Thu, 15 Aug 2002 20:54:03 +0000 (20:54 +0000)]
Remove usage of cam_extend.c, replace with dev->si_drv1

PR: kern/39809
Approved by: gibbs

22 years agoPut each function argument on its own line to keep lines shorter
Robert Drehmel [Thu, 15 Aug 2002 20:33:44 +0000 (20:33 +0000)]
Put each function argument on its own line to keep lines shorter
than 80 columns.

22 years agoMove mac.h include to match the MAC tree location. Both locations
Robert Watson [Thu, 15 Aug 2002 19:02:17 +0000 (19:02 +0000)]
Move mac.h include to match the MAC tree location.  Both locations
are about equally as alphabetized.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoIntroduce experimental support for MAC in the AppleTalk/EtherTalk stack.
Robert Watson [Thu, 15 Aug 2002 18:58:44 +0000 (18:58 +0000)]
Introduce experimental support for MAC in the AppleTalk/EtherTalk stack.
Label link layer mbufs as they are created for transmission, check
mbufs before delivering them to sockets, label mbufs as they are created
from sockets, and preserve mbuf labels if mbufs are copied.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoUse one line for each function argument to keep the line
Robert Drehmel [Thu, 15 Aug 2002 18:57:57 +0000 (18:57 +0000)]
Use one line for each function argument to keep the line
width smaller than 80 columns.

Thanks to Ruslan for an explanation of multiple ways to
achieve this.

22 years agoRename mac_check_socket_receive() to mac_check_socket_deliver() so that
Robert Watson [Thu, 15 Aug 2002 18:51:27 +0000 (18:51 +0000)]
Rename mac_check_socket_receive() to mac_check_socket_deliver() so that
we can use the names _receive() and _send() for the receive() and send()
checks.  Rename related constants, policy implementations, etc.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoRename mac_check_socket_receive() to mac_check_socket_deliver() so that
Robert Watson [Thu, 15 Aug 2002 18:51:26 +0000 (18:51 +0000)]
Rename mac_check_socket_receive() to mac_check_socket_deliver() so that
we can use the names _receive() and _send() for the receive() and send()
checks.  Rename related constants, policy implementations, etc.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
MFC after:

22 years agoOops, add -false to the operators list in the manual page for find(1), as added
Juli Mallett [Thu, 15 Aug 2002 18:30:13 +0000 (18:30 +0000)]
Oops, add -false to the operators list in the manual page for find(1), as added
in revision 1.17 of option.c.

MFC after: 1 week

22 years agoAdd support for -false instead of '!' cause it can be hard to use that in
Juli Mallett [Thu, 15 Aug 2002 18:24:55 +0000 (18:24 +0000)]
Add support for -false instead of '!' cause it can be hard to use that in
some shells, etc., and also for GNU compatability (lack of this broke the
Mono CVS build for me).

MFC after: 1 week

22 years agoFix return case for negative namelen by jumping to normal exit processing
Robert Watson [Thu, 15 Aug 2002 17:34:03 +0000 (17:34 +0000)]
Fix return case for negative namelen by jumping to normal exit processing
rather than immediately returning, or we may not unlock necessary locks.

Noticed by: Mike Heffner <mheffner@acm.vt.edu>

22 years agoReset dupack count in header prediction.
Jeffrey Hsu [Thu, 15 Aug 2002 17:13:18 +0000 (17:13 +0000)]
Reset dupack count in header prediction.
Follow-on to rev 1.39.

Reviewed by: jayanth, Thomas R Henderson <thomas.r.henderson@boeing.com>, silby, dillon

22 years agoKernel support for a dummynet option:
Luigi Rizzo [Thu, 15 Aug 2002 16:53:43 +0000 (16:53 +0000)]
Kernel support for a dummynet option:
When a pipe or queue has the "noerror" attribute, do not report
drops to the caller (ip_output() and friends).
(2 lines to implement it, 2 lines to document it.)

This will let you simulate losses on the sender side as if they
happened in the middle of the network, i.e. with no explicit feedback
to the sender.

manpage and ipfw2.c changes to follow shortly, together with other
ipfw2 changes.

Requested by: silby
MFC after: 3 days

22 years agoOn MAC check failure for readdir, use 'goto out' to use the common exit
Robert Watson [Thu, 15 Aug 2002 15:46:10 +0000 (15:46 +0000)]
On MAC check failure for readdir, use 'goto out' to use the common exit
handling, rather than returning directly to prevent leaking of vnode
reference/lock.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoo Backout rev. 1.40 and rev. 1.49.
Maxim Konovalov [Thu, 15 Aug 2002 14:53:20 +0000 (14:53 +0000)]
o Backout rev. 1.40 and rev. 1.49.
o Add argv[] boudary check.

PR: bin/40117
Reviewed by: silence on -audit
MFC after: 2 months

22 years agoIt's now sufficient to rely on a nested include of _label.h to make sure
Robert Watson [Thu, 15 Aug 2002 14:34:45 +0000 (14:34 +0000)]
It's now sufficient to rely on a nested include of _label.h to make sure
all structures in ip_var.h are defined, so remove include of mac.h.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoPerform a nested include of _label.h if #ifdef _KERNEL. This will
Robert Watson [Thu, 15 Aug 2002 14:34:02 +0000 (14:34 +0000)]
Perform a nested include of _label.h if #ifdef _KERNEL.  This will
satisfy consumers of ip_var.h that need a complete definition of
struct ipq and don't include mac.h.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoAdd mac.h -- raw_ip.c was depending on nested inclusion of mac.h which
Robert Watson [Thu, 15 Aug 2002 14:27:46 +0000 (14:27 +0000)]
Add mac.h -- raw_ip.c was depending on nested inclusion of mac.h which
is no longer present.

Pointed out by: bmilekic
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

22 years agoMake m_flags an int instead of a short, this is consistent with the
Bosko Milekic [Thu, 15 Aug 2002 14:09:16 +0000 (14:09 +0000)]
Make m_flags an int instead of a short, this is consistent with the
type of the 'flags' argument m_getcl() was using anyway; m_extadd()
needed to be changed to accept an int instead of a short for 'flags.'
This makes things more consistent and also gives us more bits to
use for m_flags in the future (we have almost run out).

Requested by: sam (Sam Leffler)

22 years agoFix typo.
Maxime Henrion [Thu, 15 Aug 2002 13:11:35 +0000 (13:11 +0000)]
Fix typo.

22 years agoRemoved duplicated MLINKS which make(1) recently started warning about.
Bruce Evans [Thu, 15 Aug 2002 12:31:01 +0000 (12:31 +0000)]
Removed duplicated MLINKS which make(1) recently started warning about.

22 years agoInclude <stdlib.h> to have abort() and exit() declared.
Robert Drehmel [Thu, 15 Aug 2002 11:58:24 +0000 (11:58 +0000)]
Include <stdlib.h> to have abort() and exit() declared.

22 years ago - For compliance with IEEE Std 1003.1-2001, add the 'restrict'
Robert Drehmel [Thu, 15 Aug 2002 10:28:52 +0000 (10:28 +0000)]
 - For compliance with IEEE Std 1003.1-2001, add the 'restrict'
   qualifier to function prototypes and definitions where
   appropriate using the '__restrict' macro.
 - Update the manual page.

22 years ago - Introduce the 'restrict' qualifier to function prototypes and
Robert Drehmel [Thu, 15 Aug 2002 09:47:10 +0000 (09:47 +0000)]
 - Introduce the 'restrict' qualifier to function prototypes and
   definitions to comply with IEEE Std 1003.1-2001.
 - Update the manual pages.

22 years ago - Add the 'restrict' qualifier to the function prototypes and
Robert Drehmel [Thu, 15 Aug 2002 09:25:04 +0000 (09:25 +0000)]
 - Add the 'restrict' qualifier to the function prototypes and
   definitions of the functions that convert strings to numbers
   and are defined by IEEE Std 1003-1.2001.
 - Use ANSI-C function definitions for all of the functions
   mentioned above plus strtouq and strtoq.
 - Update the prototypes in the manual pages.

22 years agoDocument the effect of contrib/gcc/c-lex.c,v 1.2 commit.
Ruslan Ermilov [Thu, 15 Aug 2002 08:51:24 +0000 (08:51 +0000)]
Document the effect of contrib/gcc/c-lex.c,v 1.2 commit.

22 years agoMerge gcc.295/cccp.c,v 1.9: don't let gcc(1) hide warnings in system headers.
Ruslan Ermilov [Thu, 15 Aug 2002 08:45:49 +0000 (08:45 +0000)]
Merge gcc.295/cccp.c,v 1.9: don't let gcc(1) hide warnings in system headers.

Reviewed by: bde

Original 2.95 change was subject to:

Approved by: obrien

22 years agomdoc(7) police: fixed indentation in synopsis.
Ruslan Ermilov [Thu, 15 Aug 2002 08:20:07 +0000 (08:20 +0000)]
mdoc(7) police: fixed indentation in synopsis.

Submitted by: bde

22 years agopccbb->cbb
Warner Losh [Thu, 15 Aug 2002 08:05:40 +0000 (08:05 +0000)]
pccbb->cbb

22 years agoNo longer needed
Warner Losh [Thu, 15 Aug 2002 08:04:06 +0000 (08:04 +0000)]
No longer needed

22 years agopccbb -> cbb
Warner Losh [Thu, 15 Aug 2002 08:02:23 +0000 (08:02 +0000)]
pccbb -> cbb

22 years agoRename the pccbb device to cbb.
Warner Losh [Thu, 15 Aug 2002 08:01:24 +0000 (08:01 +0000)]
Rename the pccbb device to cbb.

22 years agoMove the symbol firmware loading routines into if_wi.
Warner Losh [Thu, 15 Aug 2002 07:13:17 +0000 (07:13 +0000)]
Move the symbol firmware loading routines into if_wi.
Define some basic firmware downloading commands.