Gordon Tetlow [Fri, 24 May 2002 02:28:58 +0000 (02:28 +0000)]
Add support for reading an additional loader configuration file. By default,
this is called /boot/nextboot.conf. This file is required to have it's first
line be nextboot_enable="YES" for it to be read. Also, this file is
rewritten by the loader to nextboot_enable="NO"<space> after it is read.
This makes it so the file is read exactly once. Finally, the nextboot.conf
is removed shortly after the filesystems are mounted r/w.
Caution should be taken as you can shoot yourself in the foot. This is only
the loader piece. There will be a tool called nextboot(8) that will manage
the nextboot.conf file for you. It is coming shortly.
Add a new make.conf knob, SENDMAIL_MAP_PERMS, which specifies the
permissions to use for alias and map database files built by
/etc/mail/Makefile. The default is 0640 to assist users in avoiding
a file locking local denial of service.
Change the default permissions for the sendmail statistics file to 0640
instead of 0644 to help protect users against a file locking local
denial of service.
Alan Cox [Fri, 24 May 2002 01:33:24 +0000 (01:33 +0000)]
o Replace the vm_map's hint by the root of a splay tree. By design,
the last accessed datum is moved to the root of the splay tree.
Therefore, on lookups in which the hint resulted in O(1) access,
the splay tree still achieves O(1) access. In contrast, on lookups
in which the hint failed miserably, the splay tree achieves amortized
logarithmic complexity, resulting in dramatic improvements on vm_maps
with a large number of entries. For example, the execution time
for replaying an access log from www.cs.rice.edu against the thttpd
web server was reduced by 23.5% due to the large number of files
simultaneously mmap()ed by this server. (The machine in question has
enough memory to cache most of this workload.)
Nothing comes for free: At present, I see a 0.2% slowdown on "buildworld"
due to the overhead of maintaining the splay tree. I believe that
some or all of this can be eliminated through optimizations
to the code.
Developed in collaboration with: Juan E Navarro <jnavarro@cs.rice.edu>
Reviewed by: jeff
Peter Wemm [Fri, 24 May 2002 01:02:45 +0000 (01:02 +0000)]
For now, make the .ifdef GCC3 case default. We should change -Wno-format
back to -fformat-extensions (or whatever) when we have the functionality.
We are gaining warnings again that should be fixed but the are being hidden
by NO_WERROR and all the -Wformat noise.
Andrew R. Reiter [Fri, 24 May 2002 00:39:58 +0000 (00:39 +0000)]
- Remove a few storage pools and replace them with UMA zones. The spans
code is now storage pool free, so I believe this only leaves the uni
base not cleaned.
Jake Burkholder [Thu, 23 May 2002 23:51:57 +0000 (23:51 +0000)]
Generate the normal asm stubs for all sysv system calls. Use these instead
of C wrappers for the *sys indirect system calls. The indirect system calls
are horribly broken on sparc64.
Just to show that PAM can do almost anything from the ridiculous to the
obscene, or - as they say in New York - sophisticated, add pam_echo(8) and
pam_exec(8) to our ever-lengthening roster of PAM modules.
Mike Barcroft [Thu, 23 May 2002 18:48:27 +0000 (18:48 +0000)]
o Conditionalize sections for POSIX.1-2001 compatibility.
o Use POSIX spelling for types, where possible.
o Define size_t in the __BSD_VISIBLE case (this isn't really needed
for standards conformance, but follows the tradition of not
requiring <sys/types.h> as a prerequisite).
o Use _BYTE_ORDER and friends instead of BYTE_ORDER and friends, since
there may not be enough pollution in order for the latter to work.
o Add an XXX note about the missing IPPROTO_IPV6 macro.
Tony Finch [Thu, 23 May 2002 16:50:41 +0000 (16:50 +0000)]
Sync with upstream version:
* Ensure we work within the array bounds when parsing command-line options;
* Replace h0h0getopt with getopt(3);
* Use consistent whitespace style in the function declarations.
Juli Mallett [Thu, 23 May 2002 14:58:22 +0000 (14:58 +0000)]
Handle numeric keys by checking a "default" file. Handle number-less keys
by failing, since comparing up to the length of the key (0) against the
begin line for a key in the help file will always succeed, and print what
is wholly bogus output.
Ollivier Robert [Thu, 23 May 2002 13:16:30 +0000 (13:16 +0000)]
load_env(), the function that attempts to parse a crontab
line as an environment variable assignment, is broken
and not conformant to its description in the manual page.
I think it is worthwhile to have that fix in 4.6.
PR: bin/38374
Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>
MFC after: 2 days
Juli Mallett [Wed, 22 May 2002 23:14:17 +0000 (23:14 +0000)]
Add my PD implementation of the SCCS help command, which prints help from
files in the format used by SCCS, given a key. It behaves exactly like the
``proper'' SCCS help command, from what testing I can do.
John Baldwin [Wed, 22 May 2002 20:32:39 +0000 (20:32 +0000)]
Rename pause() to ia32_pause() so it doesn't conflict with the pause()
function defined in <unistd.h>. I didn't #ifdef _KERNEL it because the
mutex implementation in libpthread will probably need this.
Add a warning regarding localhost-only listening daemons inside jails.
Apparently binding only to 127.0.0.1 inside of a jail actually binds
to the jail IP address as well (in effect, bind to all available
interfaces in the jail).
Submitted by: Helge Oldach <test-smtp@oldach.net>
MFC after: 1 day
pending RE approval
Juli Mallett [Wed, 22 May 2002 16:09:52 +0000 (16:09 +0000)]
Add a usage().
Print usage() if right before executing the specified command, it comes to be
that *argv is NULL (i.e. a flag was specified without a command being given).
Juli Mallett [Wed, 22 May 2002 15:44:29 +0000 (15:44 +0000)]
Use what(1) here, in /usr/bin/what. It doesn't print error 26 correctly, but
neither does the pd sccs(1) implementation I have around, so there's no loss
for now.
Jacques Vidrine [Wed, 22 May 2002 14:27:35 +0000 (14:27 +0000)]
Repair a bug where type AAAA answer records were not displayed.
Reference ISC BIND issue:
``1279. [bug] nslookup: partial coversion to similar style outputs
for both -type=aaaa and -type=a.''
Juli Mallett [Wed, 22 May 2002 13:41:08 +0000 (13:41 +0000)]
Make the guarded string functions take a const "from" addr, and make the
function that prints when a botched guarded string operation occurs take
two const arguments.
XXX Should we use strlcat/strlcpy instead and hope for the best?
John Baldwin [Wed, 22 May 2002 13:19:22 +0000 (13:19 +0000)]
Rename cpu_pause() to pause(). Originally I was going to make this an
MI API with empty cpu_pause() functions on other arch's, but this
functionality is definitely unique to IA-32, so I decided to leave it
as i386-only and wrap it in #ifdef's. I should have dropped the cpu_
prefix when I made that decision.
Juli Mallett [Wed, 22 May 2002 11:10:03 +0000 (11:10 +0000)]
Make sccs(1) compile cleanly by fixing syntax errors such as #endif followed
by a token, and by including headers to get prototypes for many things, and
also by spelling the type of structure readdir(3) returns as "dirent".
Juli Mallett [Wed, 22 May 2002 10:43:50 +0000 (10:43 +0000)]
Revive the SCCS front-end, sccs(1), back from the Attic, since it's something
SUS wants (they want the entire suite of SCCS commands, we don't have them,
but we *had* the frontend, so we can have it again, and now).
Add $FreeBSD$ where appropriate, don't revive PSD.doc/spell.ok.
Bruce Evans [Wed, 22 May 2002 08:50:18 +0000 (08:50 +0000)]
Quick fix for non-unique inode numbers for hard links. We use the
byte offset of the directory entry for the inode number for all types
of files except directories, although this breaks hard links for
non-directories even if it doesn't cause overflow. Just ignore this
broken inode number for stat() and readdir() and return a less broken
one (the block offset of the file), so that applications normally can't
see the brokenness.
This leaves at least the following brokenness:
- extra inodes, vnodes and caching for hard links.
- various overflow bugs. cd9660 supports 64-bit block numbers, but we
silently ignore the top 32 bits in isonum_733() and then drop another
10 bits for our broken inode numbers. We may also have sign extension
bugs from storing 32-bit extents in ints and longs even if ints are
32-bits. These bugs affect DVDs. mkisofs apparently limits them
by writing directory entries first.
Inode numbers were broken mainly in 4.4BSD-Lite2. FreeBSD-1.1.5 seems
to have a correct implementation modulo the overflow bugs. We need
to look up directory entries from inodes for symlinks only. FreeBSD-1.1.5
use separate fields (iso_parent_extent, iso_parent) to point to the
directory entry. 4.4BSD-Lite doesn't have these, and abuses i_ino to
point to the directory entry. Correct pointers are impossible for
hard links, but symlinks can't be hard links.
Tim J. Robbins [Wed, 22 May 2002 05:15:53 +0000 (05:15 +0000)]
Bring back the cd -L and -P options from revision 1.24, but try harder not
to fail when the logical current directory no longer exists. Allow changes
to absolute paths when logical cwd is invalid, fall back to physical cd
if logical cd fails.