jlemon [Thu, 15 Mar 2001 18:50:32 +0000 (18:50 +0000)]
Limit the number of paths that glob can return to MAX_GLOBENTRIES, which
is currently set to 10000. This is intended to prevent glob from running
amok when a highly recursive path is provided (such as "../*/../*/../*/...")
sos [Thu, 15 Mar 2001 15:36:25 +0000 (15:36 +0000)]
Provide the interface to atacontrol and associated logic.
see atacontrol(8) for more.
Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS
options are gone, use the tuneables listed in ata.4 instead from
the loader (this makes it possible to switch off DMA before the
driver has to touch the devices on broken hardware).
ru [Thu, 15 Mar 2001 14:52:12 +0000 (14:52 +0000)]
net/route.c:
A route generated from an RTF_CLONING route had the RTF_WASCLONED flag
set but did not have a reference to the parent route, as documented in
the rtentry(9) manpage. This prevented such routes from being deleted
when their parent route is deleted.
Now, for example, if you delete an IP address from a network interface,
all ARP entries that were cloned from this interface route are flushed.
This also has an impact on netstat(1) output. Previously, dynamically
created ARP cache entries (RTF_STATIC flag is unset) were displayed as
part of the routing table display (-r). Now, they are only printed if
the -a option is given.
netinet/in.c, netinet/in_rmx.c:
When address is removed from an interface, also delete all routes that
point to this interface and address. Previously, for example, if you
changed the address on an interface, outgoing IP datagrams might still
use the old address. The only solution was to delete and re-add some
routes. (The problem is easily observed with the route(8) command.)
Note, that if the socket was already bound to the local address before
this address is removed, new datagrams generated from this socket will
still be sent from the old address.
PR: kern/20785, kern/21914
Reviewed by: wollman (the idea)
sobomax [Thu, 15 Mar 2001 10:47:00 +0000 (10:47 +0000)]
When creating a package sort dependencies in such a way that if dependency
A depends on dependency B then dependency A will be in all cases listed
before B, so ``pkg_add -r'' will fetch/install packages in the correct order.
Previously dependencies were sorted just by its names, which is why
``pkg_add -r'' never actually worked properly.
To be usefull, hovewer, this fix requires that all packages have been
rebuilt, so it will take some time until users would be able to feel
posititive improvements. For the same reasons it is desirable to propagate
these changes to the 4-stable package building cluster *before* 4.3 ports
freeze, so packages for 4.3-RELEASE would be properly prepared.
billf [Thu, 15 Mar 2001 10:33:00 +0000 (10:33 +0000)]
with my mentor hat on...
remove the concept of a 'maintainer' of our make. there really isn't a
need for any one committer to hold an exclusive lock or serve as a filter
for this code.
will [Thu, 15 Mar 2001 10:22:50 +0000 (10:22 +0000)]
Revert previous change -- apparently it's not quite right. It broke
src/sys/modules/if_ef and possibly other things. I tested the build with
a make based on rev. 1.26, and it worked fine. Since I'm not particularly
inclined to figure out what's going on with this, it's probably prudent
just to back it out for now.
peter [Thu, 15 Mar 2001 06:56:51 +0000 (06:56 +0000)]
Add a placeholder for the ServerWorks OSB4 device id. The SMBus
interface on this chip is compatable with the PIIX4. The catch is that
this interferes with isab0 which wants to attach to the same PCI node.
It seems to work, but we only tested it on systems with no ISA cards.
peter [Thu, 15 Mar 2001 05:10:06 +0000 (05:10 +0000)]
Kill the 4MB kernel limit dead. [I hope :-)].
For UP, we were using $tmp_stk as a stack from the data section. If the
kernel text section grew beyond ~3MB, the data section would be pushed
beyond the temporary 4MB P==V mapping. This would cause the trampoline
up to high memory to fault. The hack workaround I did was to use all of
the page table pages that we already have while preparing the initial
P==V mapping, instead of just the first one.
For SMP, the AP bootstrap process suffered the same sort of problem and
got the same treatment.
MFC candidate - this breaks on 4.x just the same..
Thanks to: Richard Todd <rmtodd@ichotolot.servalan.com>
rwatson [Thu, 15 Mar 2001 03:09:48 +0000 (03:09 +0000)]
o Update getextattr and setextattr utilities to take into account the
revised EA interface with explicit namespacing. Link against libutil
to provide string/constant conversion for namespaces. Document
revised interface.
rwatson [Thu, 15 Mar 2001 03:04:35 +0000 (03:04 +0000)]
o Update extattrctl to take into account the updated EA interface with
explicit namespaces. Modify it to use libutil for string/constant
namespace conversions. Update the documentation to take into account
the new interface.
rwatson [Thu, 15 Mar 2001 03:00:39 +0000 (03:00 +0000)]
o To support new EA interface with explicit namespaces, introduce two
utility functions which convert between string namespace names and
numeric constants used by the interface. Right now, two namespaces
are supported, EXTATTR_NAMESPACE_SYSTEM ("system") and
EXTATTR_NAMESPACE_USER ("user"). These functions are used by
various userland EA utilities, rather than hard coding the routines
all over the place.
rwatson [Thu, 15 Mar 2001 02:54:29 +0000 (02:54 +0000)]
o Change the API and ABI of the Extended Attribute kernel interfaces to
introduce a new argument, "namespace", rather than relying on a first-
character namespace indicator. This is in line with more recent
thinking on EA interfaces on various mailing lists, including the
posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces
are defined by default, EXTATTR_NAMESPACE_SYSTEM and
EXTATTR_NAMESPACE_USER, where the primary distinction lies in the
access control model: user EAs are accessible based on the normal
MAC and DAC file/directory protections, and system attributes are
limited to kernel-originated or appropriately privileged userland
requests.
o These API changes occur at several levels: the namespace argument is
introduced in the extattr_{get,set}_file() system call interfaces,
at the vnode operation level in the vop_{get,set}extattr() interfaces,
and in the UFS extended attribute implementation. Changes are also
introduced in the VFS extattrctl() interface (system call, VFS,
and UFS implementation), where the arguments are modified to include
a namespace field, as well as modified to advoid direct access to
userspace variables from below the VFS layer (in the style of recent
changes to mount by adrian@FreeBSD.org). This required some cleanup
and bug fixing regarding VFS locks and the VFS interface, as a vnode
pointer may now be optionally submitted to the VFS_EXTATTRCTL()
call. Updated documentation for the VFS interface will be committed
shortly.
o In the near future, the auto-starting feature will be updated to
search two sub-directories to the ".attribute" directory in appropriate
file systems: "user" and "system" to locate attributes intended for
those namespaces, as the single filename is no longer sufficient
to indicate what namespace the attribute is intended for. Until this
is committed, all attributes auto-started by UFS will be placed in
the EXTATTR_NAMESPACE_SYSTEM namespace.
o The default POSIX.1e attribute names for ACLs and Capabilities have
been updated to no longer include the '$' in their filename. As such,
if you're using these features, you'll need to rename the attribute
backing files to the same names without '$' symbols in front.
o Note that these changes will require changes in userland, which will
be committed shortly. These include modifications to the extended
attribute utilities, as well as to libutil for new namespace
string conversion routines. Once the matching userland changes are
committed, a buildworld is recommended to update all the necessary
include files and verify that the kernel and userland environments
are in sync. Note: If you do not use extended attributes (most people
won't), upgrading is not imperative although since the system call
API has changed, the new userland extended attribute code will no longer
compile with old include files.
o Couple of minor cleanups while I'm there: make more code compilation
conditional on FFS_EXTATTR, which should recover a bit of space on
kernels running without EA's, as well as update copyright dates.
will [Thu, 15 Mar 2001 02:51:11 +0000 (02:51 +0000)]
Fix make(1) bug: nested comments may be placed in .if, .else .if, and
.endif statements but can't be placed in .elif. Basically, the problem
was that ParseSkipLine() didn't handle comments the same way that
ParseReadLine() did, and thus you had errors with comments that are on a
conditional line (i.e. "^.") rather than a non-conditional line.
gallatin [Thu, 15 Mar 2001 02:32:26 +0000 (02:32 +0000)]
remove bogus check -- for kernel threads we fork off of proc0, not curproc
This was causing panics when modules which create kthreads were loaded
after boot.
ps [Wed, 14 Mar 2001 23:53:25 +0000 (23:53 +0000)]
Don't set the gateway address if the netmask is zero or we're on
the same network. PXE does not do netmask calculations, so if the
gateway is set it will use it.
jlemon [Wed, 14 Mar 2001 19:50:35 +0000 (19:50 +0000)]
Add some performance features to the fxp driver. If the chip is not
a 82557 (e.g.: a newer chip) then:
+ enable MWI, if the PCI configuration indicates the system supports it
+ enable usage of extended TxCB, for better performance
+ enable hardware flow control. FC frames will be passed up to the
host only if promiscuous mode is enabled.
sobomax [Wed, 14 Mar 2001 19:46:43 +0000 (19:46 +0000)]
When matching installed packages against glob keep track of which patterns
actually triggered a match and which did not, and add patterns that didn't
into resulting list, so caller will have a chance to notify user that package
isn't installed. This should fix current, POLA-breaking behaviour when user
doesn't receive a notification if he specifies several packages, some of which
aren't installed.
rwatson [Wed, 14 Mar 2001 18:27:04 +0000 (18:27 +0000)]
o In my merge, missed the one-line patch to ufs_vnops.c that removed
the static prototype for ufs_readdir(). Note that ufs_readdir() was
actually already non-static, the prototype was incorrect.
sos [Wed, 14 Mar 2001 12:12:46 +0000 (12:12 +0000)]
Add support for the IOMEGA Clik!
IOMEGA deserves a medal for making the most nonstandard ATAPI
devices, if they are ignorant or just not smart enough I don't
know, but somebody should help them out of their misery...
sos [Wed, 14 Mar 2001 12:05:44 +0000 (12:05 +0000)]
Refine the detach/attach code.
Proberly fail outstanding bio requests on devices that are detached.
This makes it possible to change between disk/cdrom/dvd/whathaveyou
in a notebook, just by suspending it, changing the device in the
bay (or what you model calls it), unsuspend and the ATA driver
will figure out what disappeared and properly fail those, and attach
any new devices found.
jkh [Wed, 14 Mar 2001 09:39:54 +0000 (09:39 +0000)]
Argh! Why can't I stop breaking the fvwm desktop option? *I* use
fvwm as my desktop, yet I've broken this damn thing 3 times in a row
now while all the desktops I don't actually use continue to work fine! :)
dillon [Wed, 14 Mar 2001 06:48:53 +0000 (06:48 +0000)]
Fix a lock reversal problem in the VM subsystem related to threaded
programs. There is a case during a fork() which can cause a deadlock.
From Tor -
The workaround that consists of setting a flag in the vm map that
indicates that a fork is in progress and using that mark in the page
fault handling to force a revalidation failure. That change will only
affect (pessimize) page fault handling during fork for threaded
(linuxthreads style) applications and applications using aio_*().
dillon [Wed, 14 Mar 2001 06:09:42 +0000 (06:09 +0000)]
Temporarily remove the vm_map_simplify() call from vm_map_insert(). The
call is correct, but it interferes with the massive hack called
vm_map_growstack(). The call will be returned after our stack handling
code is fixed.
rwatson [Wed, 14 Mar 2001 05:32:31 +0000 (05:32 +0000)]
o Implement "options FFS_EXTATTR_AUTOSTART", which depends on
"options FFS_EXTATTR". When extended attribute auto-starting
is enabled, FFS will scan the .attribute directory off of the
root of each file system, as it is mounted. If .attribute
exists, EA support will be started for the file system. If
there are files in the directory, FFS will attempt to start
them as attribute backing files for attributes baring the same
name. All attributes are started before access to the file
system is permitted, so this permits race-free enabling of
attributes. For attributes backing support for security
features, such as ACLs, MAC, Capabilities, this is vital, as
it prevents the file system attributes from getting out of
sync as a result of file system operations between mount-time
and the enabling of the extended attribute. The userland
extattrctl tool will still function exactly as previously.
Files must be placed directly in .attribute, which must be
directly off of the file system root: symbolic links are
not permitted. FFS_EXTATTR will continue to be able
to function without FFS_EXTATTR_AUTOSTART for sites that do not
want/require auto-starting. If you're using the UFS_ACL code
available from www.TrustedBSD.org, using FFS_EXTATTR_AUTOSTART
is recommended.
o This support is implemented by adding an invocation of
ufs_extattr_autostart() to ffs_mountfs(). In addition,
several new supporting calls are introduced in
ufs_extattr.c:
ufs_extattr_autostart(): start EAs on the specified mount
ufs_extattr_lookup(): given a directory and filename,
return the vnode for the file.
ufs_extattr_enable_with_open(): invoke ufs_extattr_enable()
after doing the equililent of vn_open()
on the passed file.
ufs_extattr_iterate_directory(): iterate over a directory,
invoking ufs_extattr_lookup() and
ufs_extattr_enable_with_open() on each
entry.
o This feature is not widely tested, and therefore may contain
bugs, caution is advised. Several changes are in the pipeline
for this feature, including breaking out of EA namespaces into
subdirectories of .attribute (this is waiting on the updated
EA API), as well as a per-filesystem flag indicating whether
or not EAs should be auto-started. This is required because
administrators may not want .attribute auto-started on all
file systems, especially if non-administrators have write access
to the root of a file system.
mjacob [Wed, 14 Mar 2001 04:11:56 +0000 (04:11 +0000)]
In order to save ourselves grief with the SUNPRO compiler under
Solaris (which, for reasons unknown to me, chokes on u_int16_t
as a typedef of unsigned short if used in a transitional (mixed K&R
and ANSI) way), we'll go the extra mile and fully ANSIfy things.
ken [Tue, 13 Mar 2001 22:35:28 +0000 (22:35 +0000)]
In xpt_set_transfer_settings(), force async if either the period or the
offset is set to 0.
Re-arrange the DT limiting code so that we don't end up setting the period
to 0xa if the user really wants async. The previous behavior seemed to
confuse the aic(4) driver.
cg [Tue, 13 Mar 2001 18:43:22 +0000 (18:43 +0000)]
fix a panic triggerable by anyone with read/write access to the audio
devices. opening /dev/{dsp,dspW,audio}0 and then opening a different device
from that list and closing it resulted in a panic when any operation is
performed on the first fd.
we prevent this happening by denying the second open unless it uses the same
minor device as the first.
ru [Tue, 13 Mar 2001 17:07:06 +0000 (17:07 +0000)]
RFC768 (UDP) requires that "if the computed checksum is zero, it
is transmitted as all ones". This got broken after introduction
of delayed checksums as follows. Some guys (including Jonathan)
think that it is allowed to transmit all ones in place of a zero
checksum for TCP the same way as for UDP. (The discussion still
takes place on -net.) Thus, the 0 -> 0xffff checksum fixup was
first moved from udp_output() (see udp_usrreq.c, 1.64 -> 1.65)
to in_cksum_skip() (see sys/i386/i386/in_cksum.c, 1.17 -> 1.18,
INVERT expression). Besides that I disagree that it is valid for
TCP, there was no real problem until in_cksum.c,v 1.20, where the
in_cksum() was made just a special version of in_cksum_skip().
The side effect was that now every incoming IP datagram failed to
pass the checksum test (in_cksum() returned 0xffff when it should
actually return zero). It was fixed next day in revision 1.21,
by removing the INVERT expression. The latter also broke the
0 -> 0xffff fixup for UDP checksums.
Before this change:
: tcpdump: listening on lo0
: 127.0.0.1.33005 > 127.0.0.1.33006: udp 0 (ttl 64, id 1)
: 4500 001c 0001 0000 4011 7cce 7f00 0001
: 7f00 0001 80ed 80ee 0008 0000
After this change:
: tcpdump: listening on lo0
: 127.0.0.1.33005 > 127.0.0.1.33006: udp 0 (ttl 64, id 1)
: 4500 001c 0001 0000 4011 7cce 7f00 0001
: 7f00 0001 80ed 80ee 0008 ffff
jhb [Tue, 13 Mar 2001 16:16:35 +0000 (16:16 +0000)]
- Sync up with stable by adding in the Netgraph and Sound module sections,
the agp module, and the accept filter modules.
- Remove an extraneous blank line.
jkh [Tue, 13 Mar 2001 06:42:12 +0000 (06:42 +0000)]
Be a better rc.conf citizen and create an initial file which:
1. Has a time-stamp to show when it was created
2. Sorts and uniq's the output to only contain single instances of a
given setting. This doesn't mean you still can't have settings which
override one another, that's still possible since it's too much
trouble to do the redundancy checking here.
peter [Tue, 13 Mar 2001 05:53:16 +0000 (05:53 +0000)]
At great personal risk, touch the sendmail startup again. This adds easy
seperate knobs for inbound (accepting SMTP connections) and outbound (just
occasionally dequeueing) sendmail daemon startup.
rwatson [Tue, 13 Mar 2001 02:31:32 +0000 (02:31 +0000)]
o Update copyright dates.
o Rename internal library functions so that they are prefixed with
_posix1e or _POSIX1E, removing them from the application namespace (and
potential conflict with other ACL functions elsewhere in the system).
ru [Mon, 12 Mar 2001 17:19:38 +0000 (17:19 +0000)]
.St macro cleanup:
- spell the abbreviation of 1003.1 as ``POSIX.1''
- fixed the description of -p1003.1-90; it was sold as ISO/IEC 9945-1:1990
- removed -p1003.1b; it only existed as 1003.1b-1993 (-p1003.1b-93), and
is part of 1003.1 since 1003.1-1996.
- replaced -p1003.1g (project) with -p1003.1g-2000 (approved draft)
- changed abbreviation of -isoC from ``ISO C'' to ``ISO C89''
- removed -iso9899 alias for -isoC
- IEC was missing from some names
- added abbreviation for -susv2 (``SUSv2'')