M_ZERO the temp buffer in expand_name() otherwise if an error occurs
while logging we may pass a non NUL terminated string to log(9) for a
%s format arg.
Kelly Yancey [Tue, 7 May 2002 22:14:06 +0000 (22:14 +0000)]
Move ISO88025 source routing information into sockaddr_dl's sdl_data
field. This returns the sdl_data field to a variable-length field. More
importantly, this prevents a easily-reproduceable data-corruption bug when
the interface name plus the hardware address exceed the sdl_data field's
original 12 byte limit. However, token-ring interfaces may still overflow
the new sdl_data field's 46 byte limit if the interface name exceeds 6
characters (since 6 characters for interface name plus 6 for hardware
address plus 34 for source routing = the size of sdl_data). Further
refinements could overcome this limitation but would break binary
compatibility; this commit only addresses fixing the bug for
commonly-occuring cases without breaking binary compatibility with the
intention that the functionality can be MFC'ed to -stable.
See message ID's (both send to -arch): 20020421013332.F87395-100000@gateway.posi.net 20020430181359.G11009-300000@gateway.posi.net
for a more thorough description of the bug addressed and how to
reproduce it.
Approved by: silence on -arch and -net
Sponsored by: NTT Multimedia Communications Labs
MFC after: 1 week
Peter Wemm [Tue, 7 May 2002 21:54:47 +0000 (21:54 +0000)]
Re-remove kern_random.c and svr4_signal.c. Somehow dillon managed to keep
on committing to these while they were in the Attic after they had been
removed. I think this was because he had the file checked out and already
'modified' while markm cvs rm'ed them, and cvs screws up when trying to
"merge" the modifications with the "rm". And after that the client
state was sufficiently hosed to keep it messed up. Yay CVS! (CVS is
very fragile for adding and removing files remotely)
The existence of these files was pointed out by: ru
Peter Wemm [Tue, 7 May 2002 21:47:57 +0000 (21:47 +0000)]
Re-remove these files. Somehow obrien managed to revive them with a
Makefile cleanup sweep even after they were removed. cvs was very
confused because they were in the Attic still.
Juli Mallett [Tue, 7 May 2002 18:32:18 +0000 (18:32 +0000)]
Add a -i option to sed(1) to do inplace editing, to give us an alternative to
Perl for such things. The key difference to Perl is that a backup extension
*MUST* be specified, because on one hand it isn't recommended to have options
which optionally take a parameter, and on the other hand, it'd be slightly
unpleasent to implement proper handling for that.
The difference between this and the version posted to developers@ is that it
does handle multiple files in argv after the getopt(3) handling "correctly",
in that the inplace editing-specific code has been moved out to a function,
and that function is used beyond the first file in our linked list.
This option has been documented as FreeBSD-specific in the manpage.
Warner Losh [Tue, 7 May 2002 18:16:39 +0000 (18:16 +0000)]
MFOpenBSD: ibss and ibss-master.
ibss is the modern ad-hoc mode. ibss-master is the same, except that
it creates the ibss network. This distinction is necessary because
some supported cards (symbol) support the former without supporting
the latter.
A seprate commit will introduce a demo-adhoc mode so that we can
disentwingle the multiple, mutually exclusive meandings of adhoc in
the present state of affairs.
Michael C . Wu [Tue, 7 May 2002 16:50:15 +0000 (16:50 +0000)]
This is two new entries for Taiwanese 16bit PCMCIA cards.
The Blue Concentric CF 802.11b card is a compactflash form-factored card
that does 802.11b, including 128bit encryption.
The Zonet modem pccard is a simple FAX/Modem card.
Both are sold in Guang-Hua Market in Taipei, and functions perfectly
with -current and -stable.
Ruslan Ermilov [Tue, 7 May 2002 15:42:56 +0000 (15:42 +0000)]
Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets. This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.
o Add ar.lc to the pcb.
o Create pcb_save as the backend for savectx and cpu_switch.
o While here, use explicit bundling for pcb_save and optimize
for compactness (~87% density).
o Not part of the commit is a backend pcb_restore. restorectx()
still jumps halfway into cpu_switch().
Jeff Roberson [Tue, 7 May 2002 02:44:06 +0000 (02:44 +0000)]
Switch from just holding the interlock to holding the standard lock throughout
getnewvnode(). This is safer. In the future, we should investigate requiring
only the interlock to get the vnode object.
Make funsetown() take a 'struct sigio **' so that the locking can
be done internally.
Ensure that no one can fsetown() to a dying process/pgrp. We need
to check the process for P_WEXIT to see if it's exiting. Process
groups are already safe because there is no such thing as a pgrp
zombie, therefore the proctree lock completely protects the pgrp
from having sigio structures associated with it after it runs
funsetownlst.
Add sigio lock to witness list under proctree and allproc, but over
proc and pgrp.
Hajimu UMEMOTO [Mon, 6 May 2002 16:28:25 +0000 (16:28 +0000)]
Revised MLD-related definitions
- Used mld_xxx and MLD_xxx instead of mld6_xxx and MLD6_xxx according
to the official defintions in rfc2292bis
(macro definitions for backward compatibility were provided)
- Changed the first member of mld_hdr{} from mld_hdr to mld_icmp6_hdr
to avoid name space conflict in C++
This change makes ports/net/pchar compilable again under -CURRENT.
Mitsuru IWASAKI [Mon, 6 May 2002 10:55:42 +0000 (10:55 +0000)]
Add suspend/resume code mostly merged from fxp/rl driver.
This is temporary hack, better and generalized solution probably
should be implemented at lower layer(MII or PCI?).
Tested by: shoko.araki@soliton.co.jp
MFC after: 1 week
Alan Cox [Mon, 6 May 2002 06:20:04 +0000 (06:20 +0000)]
o Header files shouldn't depend on options: Provide prototypes
for uiomoveco(), uioread(), and vm_uiomove() regardless
of whether ENABLE_VFS_IOOPT is defined or not.
Jeff Roberson [Mon, 6 May 2002 04:47:43 +0000 (04:47 +0000)]
Hold the currently selected vnode's lock across the call to VOP_GETVOBJECT.
Don't try to create a vm object before the file system has a chance to finish
initializing it. This is incorrect for a number of reasons. Firstly, that
VOP requires a lock which the file system may not have initialized yet. Also,
open and others will create a vm object if it is necessary later.
Tim J. Robbins [Mon, 6 May 2002 04:33:04 +0000 (04:33 +0000)]
Affect the first of stdin, stdout and stderr that is attached to a terminal.
Write status information to stdout instead of stderr.
Exit status when an error occurs musn't be 1, that is reserved for
indicating that messages are disabled.
These changes bring mesg(1) up to SUSv3 conformance.
Juli Mallett [Mon, 6 May 2002 03:38:28 +0000 (03:38 +0000)]
-I and -J both set the same variable, replstr, to the string to replace with
a line of input, and both work differently, so prevent them from both being
passed to xargs(1).
Bruce Evans [Mon, 6 May 2002 03:13:08 +0000 (03:13 +0000)]
Include <sys/queue.h> so that this file provides its own namespace
pollution which is required for its includes of <sys/_lock.h> and
<sys/_mutex.h> to work.
Mark Peek [Mon, 6 May 2002 00:25:36 +0000 (00:25 +0000)]
- Properly initialize the count_win when the user turns the info window
back on (and count_win is recreated).
- Create info_win as the same size for all invocations.
Bruce Evans [Mon, 6 May 2002 00:05:44 +0000 (00:05 +0000)]
Restored db_elf.c from the Attic. This will be used for a quick fix for
the longstanding brokenness of symbols in ddb at boot time. It doesn't
compile and is not attached to the build yet.
Alan Cox [Sun, 5 May 2002 22:42:40 +0000 (22:42 +0000)]
o Condition the compilation of uiomoveco() and vm_uiomove()
on ENABLE_VFS_IOOPT.
o Add a comment to the effect that this code is experimental
support for zero-copy I/O.
Chris Costello [Sun, 5 May 2002 22:09:12 +0000 (22:09 +0000)]
Begin to turn some of the code in this man page into documentation.
Move the code that I have not yet finished documenting into the
`IMPLEMENTATION NOTES' section.
Sponsored by: DARPA, NAI Labs
Obtained from: TrustedBSD Project
Luigi Rizzo [Sun, 5 May 2002 21:34:10 +0000 (21:34 +0000)]
Fix a couple of problems which could cause panics at runtime:
+ setting a bandwidth too large for a pipe (above 2Gbit/s) could
cause the internal representation (which is int) to wrap to a
negative number, causing an infinite loop in the kernel;
+ (see PR bin/35628): when configuring RED parameters for a queue,
the values are not passed to the kernel resulting in panics at
runtime (part of the problem here is also that the kernel does
not check for valid parameters being passed, but this will be
fixed in a separate commit).
These are both critical fixes which need to be merged into 4.6-RELEASE.
Maxim Sobolev [Sun, 5 May 2002 21:03:25 +0000 (21:03 +0000)]
New feature: allow origins of all dependencies be recorded into package list
using new `@comment DEPORIGIN:...' directive. This would allow us to make
many neat things including:
- easier binary upgrades;
- source upgrades without using external tools by simply extending
bsd.port.mk and pkg_install tools;
- mixed-mode upgrades (source + binary);
- depreciate and deorbit silly +REQUIRED_BY files in the near future.
This feature is no-op until appropriate bsd.port.mk patch is committed, and
even when it is already committed packages generated will remain 100%
compatible with old set of pkg_install tools (module all those neat
features, of course).
Maxim Sobolev [Sun, 5 May 2002 20:50:27 +0000 (20:50 +0000)]
In a origin lookup mode (-O) don't bail out when encountering empty package
directory, because this prevent this option from being used from the
package-depends target of bsd.port.mk since it creates such empty dir
during its normal operation.
Luigi Rizzo [Sun, 5 May 2002 20:43:27 +0000 (20:43 +0000)]
Bring in a slightly older version of usr/bin/passwd which does not
require libpam and all the libraries that libpam brings in.
We have no room for those on picobsd images.
Maxime Henrion [Sun, 5 May 2002 13:47:21 +0000 (13:47 +0000)]
Add a KERNELDUMPMAGIC_CLEARED macro to unbreak savecore. Since
it is a "magic" value, what it expands to is not really important.
I set it to "Cleared Kernel Dump", but that can be changed later
if someone thinks it's not good enough.