rwatson [Wed, 21 Jan 2004 17:10:47 +0000 (17:10 +0000)]
Reduce gratuitous includes: don't include jail.h if it's not needed.
Presumably, at some point, you had to include jail.h if you included
proc.h, but that is no longer required.
Result of: self injury involving adding something to struct prison
cperciva [Wed, 21 Jan 2004 16:49:05 +0000 (16:49 +0000)]
Disable constant merging in isdnd and isdnmonitor. This is a "make my
life easier" patch: I doubt this will affect anyone else, but the FreeBSD
Update build code was getting very confused by this.
imp [Wed, 21 Jan 2004 16:44:49 +0000 (16:44 +0000)]
Theo de Raadt has brought to our attention that he wrote at least part
file and that he has not released it under a free license. Until the
matter can be resolved, honor his claim and remove it.
nectar [Wed, 21 Jan 2004 16:27:56 +0000 (16:27 +0000)]
Incorporate two security fixes from later versions of CVS.
From the NEWS file of cvs 1.11.11:
* pserver can no longer be configured to run as root via the
$CVSROOT/CVSROOT/passwd file, so if your passwd file is
compromised, it no longer leads directly to a root hack. Attempts
to root will also be logged via the syslog.
* Malformed module requests could cause the CVS server to attempt
to create directories and possibly files at the root of the
filesystem holding the CVS repository. Filesystem permissions
usually prevent the creation of these misplaced directories, but
nevertheless, the CVS server now rejects the malformed requests.
cperciva [Wed, 21 Jan 2004 16:25:36 +0000 (16:25 +0000)]
Bring ps.1 up to date with changes in the past seven years:
* Remove mention of '>', 'A', and 'S' states
* Mention 'W' state.
* List 'J' state in the correct location.
* Sync with flags in sys/proc.h
des [Wed, 21 Jan 2004 12:50:01 +0000 (12:50 +0000)]
Replace home-grown dup2() implementation with actual dup2() calls. This
should slightly reduce the number of system calls in critical portions of
the shell, and select a more efficient path through the fdalloc code.
emax [Tue, 20 Jan 2004 20:48:26 +0000 (20:48 +0000)]
Import sdpd(8) sources. This is Bluetooth Service Discovery Protocol daemon.
Extend libsdp(3) API to allow service registration and removal.
Fix uninitialized variable bug in sdpcontrol(8).
das [Tue, 20 Jan 2004 04:22:47 +0000 (04:22 +0000)]
Discard the first 1024 bytes of output as suggested by
http://citeseer.nj.nec.com/fluhrer01weaknesses.html and
http://citeseer.nj.nec.com/531224.html .
marcel [Tue, 20 Jan 2004 03:29:24 +0000 (03:29 +0000)]
Fix handling of FP traps:
o For traps, the cr.iip register points to the next instruction to
execute on interrupt return (modulo slot). Since we need to get
the bundle of the instruction that caused the FP fault/trap, make
sure we fetch the previous bundle if the next instruction is in
fact the first in a bundle.
o When we call the FPSWA handler, we need to tell it whether it's
a trap or a fault (first argument). This was hardcoded to mean a
fault.
Also, for FP faults, when a fault is converted to a trap, adjust the
cr.iip and cr.ipsr registers to point to the next instruction. This
makes sure that the SIGFPE handler gets a consistent state.
das [Tue, 20 Jan 2004 03:02:18 +0000 (03:02 +0000)]
Use 'uint32_t' instead of 'long' when a 32-bit integer is intended.
This results in no functional change, aside from fixing a data
corruption bug on LP64 platforms. The code here could still use a
significant amount of cleanup.
mbr [Mon, 19 Jan 2004 22:07:59 +0000 (22:07 +0000)]
If we have a working link again after connectivity loss, or if we need
to renew a lease, contact the dhcp-server directly instead of using
INADDR_BROADCAST all the time. This should fix some brain-dead dhcp
server implementations which give you all the time a new IP if the
lease has not yet expired.
Instead of using ICMP to check if the server is alive, we just check
the return value of sendto() and additionally have a timeout there.
wpaul [Mon, 19 Jan 2004 18:56:31 +0000 (18:56 +0000)]
Eliminate some code duplication: since ndis_runq() and ndis_intq() were
basically the same function, compact them into a single loop which can
be used for both threads.
mtm [Mon, 19 Jan 2004 15:00:57 +0000 (15:00 +0000)]
Refactor _pthread_mutex_init
o Simplify the logic by removing a lot of unnecesary nesting
o Reduce the amount of local variables
o Zero-out the allocated structure and get rid of
all the unnecessary setting to 0 and NULL;
Refactor _pthread_mutex_destroy
o Simplify the logic by removing a lot of unnecesary nesting
o No need to check pointer that the mutex attributes points
to. Checking passed in pointer is enough.
mtm [Mon, 19 Jan 2004 14:51:45 +0000 (14:51 +0000)]
Implement reference counting of read-write locks. This uses
a list in the thread structure to keep track of the locks and
how many times they have been locked. This list is checked
on every lock and unlock. The traversal through the list is
O(n). Most applications don't hold so many locks at once that
this will become a problem. However, if it does become a problem
it might be a good idea to review this once libthr is
off probation and in the optimization cycle.
This fixes:
o deadlock when a thread tries to recursively acquire a
read lock when a writer is waiting on the lock.
o a thread could previously successfully unlock a lock it did not own
o deadlock when a thread tries to acquire a write lock on
a lock it already owns for reading or writing [ this is admittedly
not required by POSIX, but is nice to have ]
matusita [Mon, 19 Jan 2004 13:35:46 +0000 (13:35 +0000)]
Fix "5.x release on 4.x box" support.
It is required to check /etc/rc.d/ldconfig before use, because
${CHROOT} sandbox is sometimes 4.x world. If /etc/rc.d/ldconfig
is not there, run ldconfig(8) directly.
das [Mon, 19 Jan 2004 08:28:30 +0000 (08:28 +0000)]
Bring the *printf(3) documentation up to date with the code:
- Update and improve the documentation for %[aA]
o Like %[eE], %[aA] may round the result if a precision is specified.
o Grammar police: Fix a split infinitive.
o The FreeBSD implementation does better than the minimum required
by C99 (literal translation of the mantissa). The digit before
the hexadecimal-point is never 0 unless the number itself is 0.
o Clarify that the exponent field represents a decimal exponent of 2.
o Discuss the fact that multiple valid representations are possible.
o Remove the entry in the BUGS section claiming that %[aA] is not
implemented.
- Remove the entry in the BUGS section claiming that the ' flag for
printing thousands separators is unimplemented for floating-point.
- Remove the entry in the BUGS section claiming that the L modifier
reduces the precision to "double" before conversion.
das [Mon, 19 Jan 2004 05:59:07 +0000 (05:59 +0000)]
Add regression tests for printf's %a/%A formats.
While here, disable some of the long double tests on i386, since
FreeBSD/i386 is the only port that doesn't evaluate long doubles in
their full precision (due to constant folding bugs in gcc).
das [Mon, 19 Jan 2004 05:30:56 +0000 (05:30 +0000)]
Add regression tests for some of the bugs recently discovered in the
vendor's strtod() implementation.
While here, disable some of the long double tests on i386, since
FreeBSD/i386 is the only port that doesn't evaluate long doubles in
their full precision (due to constant folding bugs in gcc).
onoe [Mon, 19 Jan 2004 05:25:43 +0000 (05:25 +0000)]
Change WI_RID_SCAN_RES compatibility interface to return the result after
active scan is completed just as WI_RID_READ_APS.
This fixes wicontrol -L for ath(4) and awi(4) to have results even if
the driver cannot associate any APs.
bde [Mon, 19 Jan 2004 02:18:34 +0000 (02:18 +0000)]
Fixed misplacement and bitrot in the cy driver's configuration in
rev.1.1040. It is a miscellaneous isa+pci driver, but came back
described as a pci-only driver and placed in an i4b pci subsection
after its migration to /sys/conf/NOTES. Put it back where it used to
be, fully unsorted in the `Miscellaneous hardware' section. Reduced
nearby disorder in this section by moving configuration of the digi
driver to where it was for the old digiboard drivers, so that the
order at least matches the order in the table of contents.