mjacob [Thu, 10 May 2001 07:08:03 +0000 (07:08 +0000)]
The new order of things is that dwlpxN is now called pcibN- so hack around
*that* whilst we ponder the best way to decide how to register dwlpx interrupts
with TLSB.
imp [Thu, 10 May 2001 06:55:39 +0000 (06:55 +0000)]
Fix the panics for real this time. When something can't be allocated,
we need to delete the info from the list as well as zero out the res
pointer we saved in the code.
Also made a few style(9) changes while I was at it. Don't use if
(ptr) or if (!ptr), but compare against NULL. Compare against NULL
rather than 0. Don't have useless blocks.
There are likely other problems as well, but at least the wi based
wireless card with memory listed in its cis doesn't panic the system
when the card is inserted.
jhb [Wed, 9 May 2001 19:37:25 +0000 (19:37 +0000)]
Add in commented out entries for NEWCARD so that they are at least
documented. They cannot be turned on by default due to conflicting
symbols at link time between OLDCARD and NEWCARD.
wpaul [Wed, 9 May 2001 18:22:42 +0000 (18:22 +0000)]
The sk driver developed a bug when the multicast code was changed to
use TAILQ macros. The sk_attach_xmac() routine calls sk_init_xmac()
before doing the transceiver probe, but *before* ether_ifattach()
is called. This causes sk_init_xmac() to call sk_setmulti(), which
tries to do a TAILQ_FOREACH(), which it can't do because ether_ifattach()
hasn't done a TAILQ_INIT() yet. This causes a NULL pointer dereference
and panic in sk_setmulti() at driver load/initialization time.
Fixed by calling ether_ifattach() before the MII probe.
The code in RELENG_4 still uses the old way of enumerating the
multicast list and doesn't have this problem. Yet.
bsd [Wed, 9 May 2001 15:13:51 +0000 (15:13 +0000)]
* Simplify the population of the /etc memory filesystem. To avoid
the null mount, we currently create a temporary mfs on /tmp, copy
/etc to /tmp, then mount /etc as mfs and copy everything back from
/tmp, then delete the /tmp mfs.
The patch eliminates the temporary /tmp mfs and the subsequent
copying and simply populates the /etc mfs by copying from
/conf/default/etc. This requires that /conf/default/etc contain a
complete copy of all the /etc stuff instead of just overrides. I
don't think that is too much of an extra step in setting up a
diskless environment.
* Provide the ability to make /tmp a memory filesystem independent
of /var. This removes the requirement that /tmp be a symlink to
/var/tmp and this makes the diskless code work with the default
filesystem layout. If a seperate /tmp memory filesystem is
created, the 'tmpsize' environment variable is used to determine
its size (default to 10 Meg).
* Reduce diffs between the -current and -stable versions of these
files to a bare minimum. Only the definition of the shell
function 'mount_md' is different.
bde [Wed, 9 May 2001 14:30:49 +0000 (14:30 +0000)]
Fixed world breakage in previous commit. -lpam must never be used
directly (except in the definition of MINUSLPAM in bsd.libnames.mk)
since it doesn't give all the libraries necessary for static linkage.
bde [Wed, 9 May 2001 14:23:54 +0000 (14:23 +0000)]
Fixed world breakage in previous commit. -lpam must never be used
directly (except in the definition of MINUSLPAM in bsd.libnames.mk)
since it doesn't give all the lbraries necessary for static linkage.
Fixed new and old bugs in DPADD. ${LIBPAM} was missing, and the
library order was different from that in LDADD so `make checkdpadd'
reported a non-bug.
kris [Wed, 9 May 2001 08:37:18 +0000 (08:37 +0000)]
Patches from OpenBSD:
- check the msg.tsp_type value prior to using it as an
index into char *tsptype[]
- use strlcpy's instead of strcpy's
- & handle short packets properly.
Submitted by: "Andrew R. Reiter" <arr@watson.org>
Obtained from: OpenBSD
alfred [Wed, 9 May 2001 03:40:37 +0000 (03:40 +0000)]
Fix some of the handling in the pam module, don't unregister things
that were never registered. At the same time handle a failure from
pam_setcreds with a bit more paranioa than the previous fix.
Sync a bit with the "Portable OpenSSH" work to make comparisons a easier.
dmlb [Tue, 8 May 2001 22:51:05 +0000 (22:51 +0000)]
Add a sysctl pair for the pcic memory allocation range
machdep.pccard.pcic_mem_start
machdep.pccard.pcic_mem_end
and default the range to IOM_BEGIN/IOM_END.
This may prove useful to if_ray users (and others) on more modern
hardware that maps BIOS stuff into 0xd000-0xdffff.
schweikh [Tue, 8 May 2001 20:27:14 +0000 (20:27 +0000)]
Here comes the forgotten C source, oopsy.
Turned the shell script into a binary fixing several minor buglets.
Mention _POSIX_SOURCE feature test macro in man page.
PR: bin/19337
Submitted by: schweikh
Reviewed by: joerg, bde
MFC after: 2 weeks
schweikh [Tue, 8 May 2001 19:47:01 +0000 (19:47 +0000)]
Turned the shell script into a binary fixing several minor buglets.
Mention _POSIX_SOURCE feature test macro in man page.
PR: bin/19337
Submitted by: myself way back when I was a nobody :-) (schweikh)
Reviewed by: joerg, bde
MFC after: 2 weeks
alfred [Tue, 8 May 2001 09:09:18 +0000 (09:09 +0000)]
Remove an 'optimization' I hope to never see again.
The pipe code could not handle running out of kva, it would panic
if that happened. Instead return ENFILE to the application which
is an acceptable error return from pipe(2).
There was some slightly tricky things that needed to be worked on,
namely that the pipe code can 'realloc' the size of the buffer if
it detects that the pipe could use a bit more room. However if it
failed the reallocation it could not cope and would panic. Fix
this by attempting to grow the pipe while holding onto our old
resources. If all goes well free the old resources and use the
new ones, otherwise continue to use the smaller buffer already
allocated.
While I'm here add a few blank lines for style(9) and remove
'register'.
brian [Tue, 8 May 2001 07:55:33 +0000 (07:55 +0000)]
Remove all the mutex stuff - suggested by jhb
Tidy up includes, credit Slawa Olhovchenkov, John Prince and Eric Hernes
for their efforts and add a couple of missing parenthesis around return
expressions.
mckusick [Tue, 8 May 2001 07:42:20 +0000 (07:42 +0000)]
When running with soft updates, track the number of blocks and files
that are committed to being freed and reflect these blocks in the
counts returned by statfs (and thus also by the `df' command). This
change allows programs such as those that do news expiration to
know when to stop if they are trying to create a certain percentage
of free space. Note that this change does not solve the much harder
problem of making this to-be-freed space available to applications
that want it (thus on a nearly full filesystem, you may still
encounter out-of-space conditions even though the free space will
show up eventually). Hopefully this harder problem will be the
subject of a future enhancement.
mckusick [Tue, 8 May 2001 07:29:03 +0000 (07:29 +0000)]
Several fixes for units errors:
1) Do not assume that the superblock will be of size fs->fs_bsize.
This fixes a panic when taking a snapshot on a filesystem with
a block size bigger than 8K.
2) Properly calculate the number of fragments that follow the
superblock summary information. This fixes a bug with inconsistent
snapshots.
3) When cleaning up a snapshot that is about to be removed, properly
calculate the number of blocks that need to be checked. This fixes
a bug that created partially allocated inodes.
4) When moving blocks from a snapshot that is about to be removed
to another snapshot, properly account for the reduced number of
blocks in the snapshot from which they are taken. This fixes a
bug in which the number of blocks released from a snapshot did not
match the number that it claimed to have.
mckusick [Tue, 8 May 2001 07:13:00 +0000 (07:13 +0000)]
When syncing out snapshot metadata, we must temporarily allow recursive
buffer locking so as to avoid locking against ourselves if we need to
write filesystem metadata.
kris [Tue, 8 May 2001 06:58:25 +0000 (06:58 +0000)]
GC some dead code relating to running df on unmounted block devices,
and remove the setgid operator bit from the installed binary: if you want
to view free disk space on an unmounted device, you should have read
permissions to access it.
kris [Tue, 8 May 2001 06:19:06 +0000 (06:19 +0000)]
Sync up with OpenBSD. Too many changes to note, but the major features
are:
* Implement cpio compatibility mode when pax is invoked as cpio
* Extend tar compatibility mode to cover many of the GNU tar single-letter
options (bzip2 mode, aka -y/-j is not present in OpenBSD). When
invoked as tar, pax is now full-featured enough for use by the ports
collection to extract distfiles and create packages.
* Many bug fixes to the operation of pax and the tar compatibility modes
* Code fixes for things like correct string buffer termination.
I tried to preserve existing FreeBSD fixes to this utility; please let me
know if I have inadvertently spammed something.
imp [Mon, 7 May 2001 22:28:05 +0000 (22:28 +0000)]
Set the slot pointer in the pc98 case. Correct the name of the bridge
chip to the one that the Japanese use. Now we get insert/remove
events on my PC-9821Ne. More work in bus space is needed to make
drivers work.
horikawa [Mon, 7 May 2001 22:15:18 +0000 (22:15 +0000)]
Fix typos.
o replace `of possible' with `if possible'
o VOP_SETACL(9) is modified to say about `ACL' instead of `extended
attributed'
o EOPNOTSUPP of VOP_SETEXTATTR(9) is modified to say about
VOP_SETEXTATTR(9) instead of VOP_GETEXTATTR(9)
Reviewed by: Robert Watson <rwatson@FreeBSD.org>,
Chris Costello <chris@calldei.com>
msmith [Mon, 7 May 2001 21:46:44 +0000 (21:46 +0000)]
Minor updates:
- Rework of twe_report_request to use the command status value rather
than the flags register. (Joel Jacobson @ 3ware)
- Update to match some changes in -current vs. stable.
nsayer [Mon, 7 May 2001 20:38:39 +0000 (20:38 +0000)]
Add PAM support to SRA authentication. Cribbed mostly from ftpd. This
doesn't solve the problem of root being allowed to log in, but that sort
of thing is something PAM should be doing anyway.
knu [Mon, 7 May 2001 18:07:29 +0000 (18:07 +0000)]
Properly copy the P_ALTSTACK flag in struct proc::p_flag to the child
process on fork(2).
It is the supposed behavior stated in the manpage of sigaction(2), and
Solaris, NetBSD and FreeBSD 3-STABLE correctly do so.
The previous fix against libc_r/uthread/uthread_fork.c fixed the
problem only for the programs linked with libc_r, so back it out and
fix fork(2) itself to help those not linked with libc_r as well.
PR: kern/26705
Submitted by: KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
Tested by: knu, GOTOU Yuuzou <gotoyuzo@notwork.org>,
and some other people
Not objected by: hackers
MFC in: 3 days
imp [Mon, 7 May 2001 16:50:34 +0000 (16:50 +0000)]
Disable the card after sending the removed event up to the pccard
layer. This fixes an ordering problem that would cause the ISR for
the device to run with now power applied to the device. Most cards
failed to deal with this gracefully, and thus would hang on card
eject.
The power down event, for those keeping score, is what causes the
interrupt for the card.
Many folks in the Japanese nomads list have reported this, so I'll be
MFCing quickly for their benefit.
rwatson [Sun, 6 May 2001 16:15:42 +0000 (16:15 +0000)]
o First step in cleaning up authorization code for the posix4
implementation. Move from direct uid 0 comparision to using suser_xxx()
call with the same semantics. Simplify CAN_AFFECT() macro as passed
pcred was redundant. The checks here still aren't "right", but they
are probably "better".