jkh [Mon, 25 Jun 2001 00:43:10 +0000 (00:43 +0000)]
Fix crypto targets to be user-overridable and also obey the
NO_SENDMAIL flag if set. The whole NO_FOO mechanism in /usr/src
is pretty bogus and needs to be re-examined in the context of a
larger argument about modularity, but that's something for another
time.
dd [Sun, 24 Jun 2001 23:58:27 +0000 (23:58 +0000)]
Add a link to extattr.2 (from extattr_get_file.2). The other names
are too specific and too long, and extattr.2 makes a nice point of
reference for "extattr-related syscalls".
iedowse [Sun, 24 Jun 2001 15:03:06 +0000 (15:03 +0000)]
Clean up the addrmerge() function, which was over-complicated and
contained a number of memory leaks. The changes include:
- Add a comment describing what addrmerge() does.
- Deal with 0.0.0.0./::. or AF_LOCAL callers correctly.
- Use rpcbind_get_conf() instead of getnetconfigent() so we don't
have to remember to free the returned netconfig struct.
- Make just one pass through the ifaddrs list; we can pick up a fallback
interface address in the same pass as the netmask comparison.
- Define and use SA2SIN* macros to avoid the need for loads of
protocol-specific local variables.
- Use mostly protocol-independent code for building the netbuf version
of the address to be returned.
- Use the common cleanup code for virtually all error and non-error
cases, fixing a number of memory leaks.
ume [Sun, 24 Jun 2001 14:59:34 +0000 (14:59 +0000)]
on icmp6 node information query (FQDN), do not return hostnames with
two dots (like "foo..bar"). 0-length labels are not distinguishable
with multiple name replies.
dwmalone [Sun, 24 Jun 2001 12:18:27 +0000 (12:18 +0000)]
Allow getcred sysctl to work in jailed root processes. Processes can
only do getcred calls for sockets which were created in the same jail.
This should allow the ident to work in a reasonable way within jails.
dillon [Sun, 24 Jun 2001 05:24:41 +0000 (05:24 +0000)]
After exhaustive discussions and some meandering and confusion, enough
people are on track with the cause and effect of this, and although
fixing this severely degenerate case appears to violate the letter of
POSIX.1-200x, Bruce and I (and enough others) agree that it should be
comitted.
So, this patch generates an ENOENT error for any attempt to do a path lookup
through an empty symlink (e.g. open(), stat()).
Submitted by: "Andrey A. Chernov" <ache@nagual.pp.ru>
Reviewed by: bde
Discussed exhaustively on: freebsd-current
Previously committed to: NetBSD 4 years ago
iedowse [Sat, 23 Jun 2001 21:54:47 +0000 (21:54 +0000)]
Fix some return-value brain-damage in forward_register(). This
function has a return type of u_int32_t, into which it was somehow
supposed to encode:
* A valid 32-bit XID (which could be any value including 0).
* 0, meaning a duplicate request.
* -1, meaning a malloc failed (!);
We now ensure that all XIDs are non-zero, and pass the XID out via
a pointer argument.
In forward_find() and free_slot_by_xid(), remove an unnecessary
and confusing test for a negative result from an unsigned modulo
operation, but add an unnecessary cast to highlight why.
iedowse [Sat, 23 Jun 2001 19:57:20 +0000 (19:57 +0000)]
Use the new CLSET_CONNECT clnt_control() request on UDP clients to
ensure that we never proceed with the mount() syscall if the server
is replying from the wrong source address. Previously the userland
RPC call to the remote nfsd would succeed, but the kernel uses
connect() so it would not see the replies, resulting in a hung
mount.
iedowse [Sat, 23 Jun 2001 19:43:21 +0000 (19:43 +0000)]
Add a new clnt_control() request `CLSET_CONNECT' that controls
whether or not connect(2) is used for UDP client sockets. The default
is not to connect(), so existing clients will see no change in
behaviour.
The use of connect(2) for UDP clients has a number of advantages:
only replies from the intended address are received, and ICMP errors
pertaining to the connection are reported back to the application.
schweikh [Sat, 23 Jun 2001 17:52:10 +0000 (17:52 +0000)]
Reduce field width for some columns so that the default output fits in <= 79
columns. 80 columns + newline is a problem for some terminals including syscons.
jlemon [Sat, 23 Jun 2001 06:54:28 +0000 (06:54 +0000)]
Bring in fix from rev 1.32 that got lost during the conversion to kqueue.
This prevents an indefinte timeout in case the kevent call is interrupted
for some reason.
ache [Sat, 23 Jun 2001 04:48:59 +0000 (04:48 +0000)]
Make the similar changes as in our keyinfo, i.e. allow user to get his own
sequence and allow root to get everybody's one. Before this change user
can't get his own sequence, root required.
silby [Sat, 23 Jun 2001 03:21:46 +0000 (03:21 +0000)]
Eliminate the allocation of a tcp template structure for each
connection. The information contained in a tcptemp can be
reconstructed from a tcpcb when needed.
Previously, tcp templates required the allocation of one
mbuf per connection. On large systems, this change should
free up a large number of mbufs.
brooks [Fri, 22 Jun 2001 23:35:24 +0000 (23:35 +0000)]
Fix a number of bugs in the implementation of the WEP related status
functions in ifconfig. "ifconfig an0" should output the correct
status now. Also, make the read and write functions both more
robust and more consistant. This should stop most of the incorrect
size complaints and eliminate the possiability of panics from firmware
that increases resource sizes.
jhb [Fri, 22 Jun 2001 23:11:26 +0000 (23:11 +0000)]
- Lock CURSIG() with the proc lock to close the signal race with psignal.
- Grab Giant around ktrace points.
- Clean up KTR_PROC tracepoints to not display the value of
sched_lock.mtx_lock as it isn't really needed anymore and just obfuscates
the messages.
- Add a few if conditions to replace gotos.
- Ensure that every msleep KTR event ends up with a matching msleep resume
KTR event (this was broken when we didn't do a mi_switch()).
- Only note via ktrace that we resumed from a switch once rather than twice
in several places in msleep().
- Remove spl's rom asleep and await as the proc lock and sched_lock provide
all the needed locking.
- In mawait() add in a needed ktrace point for noting that we are about to
switch out.
jhb [Fri, 22 Jun 2001 23:05:11 +0000 (23:05 +0000)]
- Grab the proc lock around CURSIG and postsig(). Don't release the proc
lock until after grabbing the sched_lock to avoid CURSIG racing with
psignal.
- Don't grab Giant for addupc_task() as it isn't needed.
Reported by: tegge (signal race), bde (addupc_task a while back)
jhb [Fri, 22 Jun 2001 23:02:37 +0000 (23:02 +0000)]
- Change CURSIG() and postsig() to require that the proc lock is held
rather than grabbing it and releasing it themselves. This allows callers
of these functions to get the lock to close race conditions.
- Grab Giant around ktrace in postsig.
- Count the switches performed on SIGSTOP's as involuntary context switches
in the resource usage stats.