markm [Fri, 18 Oct 2002 08:23:24 +0000 (08:23 +0000)]
When a user gets refused because the password is wrong, use the
older "BAD SU" syslog message that folks prefer. There is quite
a bit more tweaking that can be done with other similar messages.
pirzyk [Fri, 18 Oct 2002 04:53:46 +0000 (04:53 +0000)]
Backout my previous "brain cramp" commit.
Requested by: Most developers
Apologies to: Most developers, with special note to <ken@kdm.org>
Collabroation in the future with: Kenneth D. Merry <ken@kdm.org>
marcel [Fri, 18 Oct 2002 04:46:36 +0000 (04:46 +0000)]
Cover the ELF headers with the text segment so that they get loaded
into memory. This brings us in line with the other architectures and
more easily allows us to do machine dependent processing on the ELF
file (such as scanning for unwind information).
dd [Fri, 18 Oct 2002 04:06:59 +0000 (04:06 +0000)]
Output "human-readable" values with a non-0 precision where
appropriate. Before this, a 2.9 GB file was misleadingly reported as
"2G". This mostly brings unit_adjust() in line with what is in du(1).
rwatson [Fri, 18 Oct 2002 02:39:21 +0000 (02:39 +0000)]
Exempt the "wheel group requirement" by default when su'ing to root if
the wheel group has no explicit members listed in /etc/group. This adds
the "exempt_if_empty" flag to pam_wheel in the default configuration;
in some environments, it may be appropriate to remove this flag, however,
this default is the same as pre-pam_wheel.
rwatson [Fri, 18 Oct 2002 02:37:29 +0000 (02:37 +0000)]
Introduce 'exempt_if_empty' option to pam_wheel(8), which bypasses the
group membership requirement if the group has no explicit members listed
in /etc/group. By default, this group is the wheel group; setting this
flag restores the default BSD behavior from 4.x.
mckusick [Fri, 18 Oct 2002 01:29:59 +0000 (01:29 +0000)]
When the number of dirty buffers rises too high, the buf_daemon runs
to help clean up. After selecting a potential buffer to write, this
patch has it acquire a lock on the vnode that owns the buffer before
trying to write it. The vnode lock is necessary to avoid a race with
some other process holding the vnode locked and trying to flush its
dirty buffers. In particular, if the vnode in question is a snapshot
file, then the race can lead to a deadlock. To avoid slowing down the
buf_daemon, it does a non-blocking lock request when trying to lock
the vnode. If it fails to get the lock it skips over the buffer and
continues down its queue looking for buffers to flush.
robert [Thu, 17 Oct 2002 21:02:02 +0000 (21:02 +0000)]
Instead of (sizeof(source_buffer) - 1) bytes, copy at most
(sizeof(destination_buffer) - 1) bytes into the destination buffer.
This was not harmful because they currently both provide space for
(MAXCOMLEN + 1) bytes.
jmallett [Thu, 17 Oct 2002 20:26:26 +0000 (20:26 +0000)]
FD locking is not enabled anymore, so the table which contains the owner
of a file descriptor has NULL entries, so don't dereference the table entries
to get the owners ever -- don't print the owners when processing a thread_dump
request as a result of SIGINFO.
sam [Thu, 17 Oct 2002 18:34:32 +0000 (18:34 +0000)]
o ioctl DIOCGDINFO error wasn't checked
o memory wasn't reclaimed in certain cases
o add more msgs under #ifdef DEBUG
o rewrite tangle of for loops for clarity
NB: Open_Disk should redo how it malloc's memory so the caller can free
everything. Documentation says the caller can free the disk list to
reclaim everything but this leaks the indirect strings. Fixing this
is simple for the sysctl case but adds complexity to the fallback,
non-sysctl, case.
tmm [Thu, 17 Oct 2002 18:16:21 +0000 (18:16 +0000)]
When entering the firmware mappings into the kernel tlb, clear all 'soft'
bits that might be set in the firmware tte data field, and set the soft
flag TD_EXEC to mark the page executable. Failing to do the latter would
cause fatal instruction faults in the prom in certain situations.
sam [Thu, 17 Oct 2002 18:02:27 +0000 (18:02 +0000)]
Strip splash, tun, and COMPAT_FREEBSD4 from the config used to build
the BOOTMFS kernel. These help reduce the kernel size so things fit
in a floppy image. There are more low-hanging fruit to be had here
if things fail to fit again.
sam [Thu, 17 Oct 2002 18:00:30 +0000 (18:00 +0000)]
Mark more drivers as going on the (nonexistent) drivers.flp floppy
to reduce the size of the bootstrap kernels. This is needed to make
stuff fit in primary floppy images. Specific drivers moved: RAID
support, tx Ethernet, and wi (wireless). Probably want to revisit
at least the last two drivers before release.
sam [Thu, 17 Oct 2002 17:28:57 +0000 (17:28 +0000)]
fix kldload error return when a module is rejected because it's statically
linked in the kernel. When this condition is detected deep in the linker
internals the EEXIST error code that's returned is stomped on and instead
an ENOEXEC code is returned. This makes apps like sysinstall bitch.
robert [Thu, 17 Oct 2002 15:52:42 +0000 (15:52 +0000)]
- Allocate only enough space for a temporary buffer to hold
the path including the terminating NUL character from
`struct sockaddr_un' rather than SOCK_MAXADDRLEN bytes.
- Use strlcpy() instead of strncpy() to copy strings.
iwasaki [Thu, 17 Oct 2002 13:55:39 +0000 (13:55 +0000)]
1. Fix a comment. Locking _is_ needed (but not done).
2. Update a comment. We now restore much more than RTC updates and
interrupts.
3. Order change. Stop interrupts by writing to RTC_STATUSB,
restore rate bits for the interrupts by writing to RTC_STATUSA,
then enable interrupts again.
This seems to be done perfectly backwards in startrtclock().
Otherwise, the idea for this change was obtained from
startrtclock().
4. Don't stop the clock (RTCB_HALT). We only program some control bits
and don't want to stop the clock.
5. (Not really related.) Add caveats to the comment about timer_restore().
The update is non-atomic since locking is not done.
On locking:
6. rtcin() and writertc() are locked() adequately by splhigh() in RELENG_4,
but this locking is null in -current.
7. Doing things in the correct order in (3) combined with (6) is probably
enough locking for rtcrestore() in RELENG_4. In -current, the
writertc()'s race with rtcintr() unless the BIOS disables RTC interrupts.
ru [Thu, 17 Oct 2002 13:48:13 +0000 (13:48 +0000)]
Added the new variable CTAGS which, if set to "ctags", reverts
to creating the tags file using ctags(1). Defaults to "gtags".
Made GTAGSFLAGS and HTAGSFLAGS overrideable, added CTAGSFLAGS.
Folded bsd.prog.mk version of `tags' into bsd.dep.mk.
bde [Thu, 17 Oct 2002 13:47:31 +0000 (13:47 +0000)]
Fixed the quoting of the value of SC_CUT_SEPCHARS. The double quotes
needed to be quoted (to get a C string literal), not the value itself.
Fixed the value of SC_CUT_SEPCHARS. Setting this value would have had no
effect even if it were used, since the value was the same as the default.
The above bugs had no effect except to set bad examples, since test
coverage of SC_CUT_SEPCHARS is broken by enabling a negative option.
Removed (unquoted) double quotes for all options. They were all bogus
since they had no effect except to make non-strings look like strings.
Most of the non-strings were expressions. The value of INIT_PATH is
a non-string since it is stringified later (unlike SC_CUT_SEPCHARS).
Fixed parenthesization errors inside bogus quotes (parenthesize values
if they have more than one token in them but don't parenthesize single
tokens).
tjr [Thu, 17 Oct 2002 12:02:36 +0000 (12:02 +0000)]
The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
marcel [Thu, 17 Oct 2002 03:45:34 +0000 (03:45 +0000)]
Suppress the uninitialized variable warning on ia64 introduced by
the previous commit by initializing i and j. These initializations
will normally be eliminated by the compiler.
bmilekic [Wed, 16 Oct 2002 19:59:08 +0000 (19:59 +0000)]
Fix a fairly subtle bug in mbuf_init() where the reference counter
contiguous space was being allocated from the clust_map
instead of the mbuf_map as the comments indicated. This resulted in
some address space wastage in mbuf_map.
ume [Wed, 16 Oct 2002 19:49:37 +0000 (19:49 +0000)]
- after gif_set_tunnel(), psrc/pdst may be null. set IFF_RUNNING accordingly.
- set IFF_UP on SIOCSIFADDR. be consistent with others.
- set if_addrlen explicitly (just in case)
- multi destination mode is long gone.
- missing break statement
- add gif_set_tunnel(), so that we can set tunnel address from within the
kernel at ease.
- encap_attach/detach dynamically on ioctls
- move encap_attach() to dedicated function in in*_gif.c
tmm [Wed, 16 Oct 2002 17:37:50 +0000 (17:37 +0000)]
Add "pci108e,8000" (psycho) and "pci108e,a000" (US-IIi sabre) to the list of
recognized compat properties. This should make the psycho driver attach
properly on SPARCengine Ultra AX machines.
Switch to a table-driven logic to recognize the ID's, since their number
is now large enough to justify this.
These changes are analogous to those made in NetBSD r.1.35, but
implemented a bit differently.
jhb [Wed, 16 Oct 2002 17:27:11 +0000 (17:27 +0000)]
- Include lock headers on current in this header instead of putting
#if's in all the other ACPI source files.
- Use splhigh() for the ACPI subsystem lock on 4-stable.
jhb [Wed, 16 Oct 2002 17:25:29 +0000 (17:25 +0000)]
- In AcpiOsGetThreadId(), allow for curproc to be NULL on 4-stable systems.
In that case use proc0's pid to return the thread ID.
- For 4-stable, use the generic swi taskqueue for ACPI events rather than
implementing our own.
tmm [Wed, 16 Oct 2002 17:03:36 +0000 (17:03 +0000)]
Use a linked list to keep the psycho softcs instead of a statically
sized array.
While being there, deuglify the psycho pair detection loop which became
quite awkward in a previous code reorganization.