]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoSend the close request to the SMB server in smbfs_inactive(), instead of
tjr [Tue, 17 Jun 2003 12:58:02 +0000 (12:58 +0000)]
Send the close request to the SMB server in smbfs_inactive(), instead of
smbfs_close(). This fixes paging to and from mmap()'d regions of smbfs
files after the descriptor has been closed, and makes thttpd, GNU ld,
and perhaps more things work that depend on being able to do this.

PR: 48291

21 years agoAdd FREECOM PCCARD-IDE to the mix. It doesn't have a manufacturer or
imp [Tue, 17 Jun 2003 12:33:53 +0000 (12:33 +0000)]
Add FREECOM PCCARD-IDE to the mix.  It doesn't have a manufacturer or
product ID, so we have to use the CIS strings to ID it.

dmesg by: Christian Laursen

21 years agoSync to 1.53
imp [Tue, 17 Jun 2003 12:29:49 +0000 (12:29 +0000)]
Sync to 1.53

21 years agoImprove the manpage language a bit.
yar [Tue, 17 Jun 2003 12:29:36 +0000 (12:29 +0000)]
Improve the manpage language a bit.
A PPP login program is started _automatically_ (i.e., without
human intervention) even with the "pl" capability unset, as soon
as a PPP frame is detected.  But with "pl" set, a PPP login program
is started independently of the result of PPP detection (which is
rendered unnecessary then,) i.e. _unconditionally_.

21 years agoAdd FREECOM PCCARD-IDE
imp [Tue, 17 Jun 2003 12:29:20 +0000 (12:29 +0000)]
Add FREECOM PCCARD-IDE

21 years agoAdd definitions for the ioctls that are used by netgraph and harp to open
harti [Tue, 17 Jun 2003 11:51:30 +0000 (11:51 +0000)]
Add definitions for the ioctls that are used by netgraph and harp to open
and close VCCs.

21 years ago - Temporarily patch a problem where the interact score could be negative
jeff [Tue, 17 Jun 2003 10:21:34 +0000 (10:21 +0000)]
 - Temporarily patch a problem where the interact score could be negative
   because the run time exceeds the largest value a signed int can hold.
   The real solution involves calculating how far we are over the limit.
   To quickly solve this problem we loop removing 1/5th of the current value
   until it falls below the limit.  The common case requires no passes.

21 years agoXref police: chmod(8) -> chmod(1).
sobomax [Tue, 17 Jun 2003 09:53:03 +0000 (09:53 +0000)]
Xref police: chmod(8) -> chmod(1).

21 years agoXref police: ntp.conf(8) -> ntp.conf(5).
sobomax [Tue, 17 Jun 2003 09:51:17 +0000 (09:51 +0000)]
Xref police: ntp.conf(8) -> ntp.conf(5).

21 years agoXref policy: exit(2) -> _exit(2).
sobomax [Tue, 17 Jun 2003 09:36:47 +0000 (09:36 +0000)]
Xref policy: exit(2) -> _exit(2).

21 years agoGive an example of the more efficient conflict resolution command
dougb [Tue, 17 Jun 2003 09:20:16 +0000 (09:20 +0000)]
Give an example of the more efficient conflict resolution command
suggested by the version of the commit message that's mailed out
as opposed to the more error prone version that will be suggested
when doing the actual import.

21 years agoString the timecounter paper into the build.
phk [Tue, 17 Jun 2003 09:14:34 +0000 (09:14 +0000)]
String the timecounter paper into the build.

21 years agoCompile sunlabel on all archs.
phk [Tue, 17 Jun 2003 09:12:42 +0000 (09:12 +0000)]
Compile sunlabel on all archs.

21 years agoSet f_mntfromname[] to "fdescfs" instead of "fdesc" for consistency
tjr [Tue, 17 Jun 2003 09:00:15 +0000 (09:00 +0000)]
Set f_mntfromname[] to "fdescfs" instead of "fdesc" for consistency
with other synthetic filesystems, which have f_mntfromname the same
as f_fstypename. Noticed by Sean Kelly on -current.

21 years agoFix the execle(3) synopsis to include the environment pointer.
phk [Tue, 17 Jun 2003 08:57:37 +0000 (08:57 +0000)]
Fix the execle(3) synopsis to include the environment pointer.

Confused: anordby

21 years agoLink named-xfer -static. This is the only binary that needs to be
dougb [Tue, 17 Jun 2003 08:53:27 +0000 (08:53 +0000)]
Link named-xfer -static. This is the only binary that needs to be
statically compiled for named to work chroot'ed, and we'd like
to be able to do that from /etc/rc.d without additional user
intervention.

21 years agoMFp4: Fix two bugs causing possible deadlocks or panics, and one nit:
tjr [Tue, 17 Jun 2003 08:52:45 +0000 (08:52 +0000)]
MFp4: Fix two bugs causing possible deadlocks or panics, and one nit:
- Emulate lock draining (LK_DRAIN) in null_lock() to avoid deadlocks
  when the vnode is being recycled.
- Don't allow null_nodeget() to return a nullfs vnode from the wrong
  mount when multiple nullfs's are mounted. It's unclear why these checks
  were removed in null_subr.c 1.35, but they are definitely necessary.
  Without the checks, trying to unmount a nullfs mount will erroneously
  return EBUSY, and forcibly unmounting with -f will cause a panic.
- Bump LOG2_SIZEVNODE up to 8, since vnodes are >256 bytes now. The old
  value (7) didn't cause any problems, but made the hash algorithm
  suboptimal.

These changes fix nullfs enough that a parallel buildworld succeeds.

Submitted by: tegge (partially; LK_DRAIN)
Tested by: kris

21 years agoFix the #include part of the SYNOPSIS for heap.3
dougb [Tue, 17 Jun 2003 08:43:19 +0000 (08:43 +0000)]
Fix the #include part of the SYNOPSIS for heap.3

PR: bin/45269
Submitted by: Slaven Rezic <slaven.rezic@berlin.de>

21 years agoResolve conflicts in 8.3.6, generally in favor of the vendor code
dougb [Tue, 17 Jun 2003 08:32:40 +0000 (08:32 +0000)]
Resolve conflicts in 8.3.6, generally in favor of the vendor code

21 years agoThis commit was generated by cvs2svn to compensate for changes in r116464,
dougb [Tue, 17 Jun 2003 08:25:13 +0000 (08:25 +0000)]
This commit was generated by cvs2svn to compensate for changes in r116464,
which included commits to RCS files with non-trunk default branches.

21 years agoImport of ISC BIND version 8.3.6.
dougb [Tue, 17 Jun 2003 08:25:13 +0000 (08:25 +0000)]
Import of ISC BIND version 8.3.6.

Version 8.3.5 was skipped due to bugs fixed in this version.

21 years ago - Add a new function "sched_interact_update()" that scales back the sleep
jeff [Tue, 17 Jun 2003 06:39:51 +0000 (06:39 +0000)]
 - Add a new function "sched_interact_update()" that scales back the sleep
   and run time.
 - Scale the sleep and run time back via sched_interact_update() in more
   places.  This is to keep the statistic more accurate.
 - Charge a parent one tick for forking a child.
 - Add only the run time and not the sleep time to the parents kg when a
   thread exits.  This allows us to give a penalty for having an expensive
   thread exit but does not give a bonus for having an interactive thread
   exit.
 - Change the SLP_RUN_THROTTLE to limit us to 4/5th and not 1/2.
 - Change the SLP_RUN_MAX to two seconds.  This keeps bursty interactive
   applications like mozilla and openoffice in the interactive range even
   through expensive tasks.
 - Recalculate the slice after every sleep.  This ensures that once a task
   has been marked interactive it only has a slice of 1 at the risk of
   giving tasks that sleep for a very brief period a longer time slice.

21 years agoMap icmp time exceeded responses to EHOSTUNREACH rather than 0 (no error);
silby [Tue, 17 Jun 2003 06:21:08 +0000 (06:21 +0000)]
Map icmp time exceeded responses to EHOSTUNREACH rather than 0 (no error);
this makes connect act more sensibly in these cases.

PR: 50839
Submitted by: Barney Wolff <barney@pit.databus.com>
Patch delayed by laziness of: silby
MFC after: 1 week

21 years agoLock the vm object when freeing a page.
alc [Tue, 17 Jun 2003 05:17:00 +0000 (05:17 +0000)]
Lock the vm object when freeing a page.

21 years agoRe-introduction of the matcd Compact Disc drive driver documentation.
uhclem [Tue, 17 Jun 2003 04:28:12 +0000 (04:28 +0000)]
Re-introduction of the matcd Compact Disc drive driver documentation.

The matcd.4 man page has been upgraded to reflect current 5.1.x
functionality, and efforts were made to match the style and layout found
in similar-single purpose block drivers man pages found in the 5.1 tree
man4 area while not losing useful information.  However, the documentation
folks should still take a look, since the man pages used as guides were
somewhat inconsistent on a variety of points.

Approved by: markm(mentor)

21 years agoAdd a script to automatically attach gbde devices found in fstab
wollman [Tue, 17 Jun 2003 02:56:29 +0000 (02:56 +0000)]
Add a script to automatically attach gbde devices found in fstab
(or rc.conf) at boot time, and detach them when shutting down.  Not
added to the Makefile to give the rcng gurus an opportunity to improve
it.

21 years agoHide the m_defrag* statistics under MBUF_STRESS_TEST, there seems
silby [Tue, 17 Jun 2003 02:34:40 +0000 (02:34 +0000)]
Hide the m_defrag* statistics under MBUF_STRESS_TEST, there seems
to be no need to see them in the general case (and they aren't
smp-safe anyway.)

Suggested by: hmp
MFC after: 1 week

21 years agoRe-introduction of the matcd CD driver.
uhclem [Tue, 17 Jun 2003 01:20:03 +0000 (01:20 +0000)]
Re-introduction of the matcd CD driver.
This version of the driver code is compatible with near-release FreeBSD 5.1
kernel/driver interfaces.

modules/Makefile, man page and other bindings to follow shortly, once I get
this part of the check-in right.

Approved by: markm(mentor)

21 years agoDo not attempt to access to inp_socket fields if the socket is in the TIME_WAIT
cognet [Tue, 17 Jun 2003 00:31:30 +0000 (00:31 +0000)]
Do not attempt to access to inp_socket fields if the socket is in the TIME_WAIT
state, as inp_socket will then be NULL. This fixes a panic that occurs when one
tries to bind a port that was previously binded with remaining TIME_WAIT
sockets.

21 years agoForgot to commit code to disable creating a bound thread in same
davidxu [Mon, 16 Jun 2003 23:46:41 +0000 (23:46 +0000)]
Forgot to commit code to disable creating a bound thread in same
group again except first kse_create syscall.

Noticed by: julian

21 years agoWhen looking for the ':' separator in the root path, don't go past
iedowse [Mon, 16 Jun 2003 20:48:56 +0000 (20:48 +0000)]
When looking for the ':' separator in the root path, don't go past
the terminating '\0'. Since the initialisation of rootpath in
libstand/bootp.c may copy junk into the rest of the buffer, it was
possible for the code to find a ':' after the '\0' and do the wrong
thing.

Reviewed by: ps
MFC after: 1 week

21 years agoNot particularly pretty hack to generate rules to make .ln files
markm [Mon, 16 Jun 2003 20:08:15 +0000 (20:08 +0000)]
Not particularly pretty hack to generate rules to make .ln files
from .c files. Actually, this is overkill, as the .ln file targets
are assumed from .? (any) files. This is not a problem in practice,
merely a bit untidy, as the linting rules DTRT. See the sys/conf/*
and sys/mk/* files for usage.

21 years agofree type too if we can't add the child.
jmg [Mon, 16 Jun 2003 19:18:06 +0000 (19:18 +0000)]
free type too if we can't add the child.

21 years agofix misspelling of ORIR_NOTFOUND
jmg [Mon, 16 Jun 2003 19:06:36 +0000 (19:06 +0000)]
fix misspelling of ORIR_NOTFOUND

21 years agoPartially back out rev 1.87 by nuking fifo_inactive() and moving the
truckman [Mon, 16 Jun 2003 17:17:09 +0000 (17:17 +0000)]
Partially back out rev 1.87 by nuking fifo_inactive() and moving the
resource deallocation back to fifo_close().  This eliminates any
stale data that might be stuck in the socket buffers after all the
readers and writers have closed the fifo.

Tested by: Thorsten Schroeder <ths@katjusha.de>

21 years agoAlso remove the ones that snuck in at the bottom.
obrien [Mon, 16 Jun 2003 16:12:05 +0000 (16:12 +0000)]
Also remove the ones that snuck in at the bottom.

21 years agoReference the new natmip(4) man page.
harti [Mon, 16 Jun 2003 15:51:55 +0000 (15:51 +0000)]
Reference the new natmip(4) man page.

21 years agoRepo-copy of sys/pci/if_en_pci.c to the rest of the midway driver (sys/dev/en)
harti [Mon, 16 Jun 2003 15:25:51 +0000 (15:25 +0000)]
Repo-copy of sys/pci/if_en_pci.c to the rest of the midway driver (sys/dev/en)
so that all of the driver sources are in one place. Adjust the configuration
files and the module build.

21 years agoMYADDR6 in ppp.link{up,down} should match even when IPCP is enabled.
ume [Mon, 16 Jun 2003 15:19:25 +0000 (15:19 +0000)]
MYADDR6 in ppp.link{up,down} should match even when IPCP is enabled.

MFC after: 1 week

21 years agoo BATTTIME and BATTPERCENT are 'int' not 'str'.
maxim [Mon, 16 Jun 2003 14:57:07 +0000 (14:57 +0000)]
o BATTTIME and BATTPERCENT are 'int' not 'str'.

PR: bin/48793
Submitted by: Stefan Farfeleder <stefan@fafoe.dyndns.org>
MFC after: 2 week

21 years agoFix the breakage introduced by rev. 1.43 of sys/dev/midway.c (don't commit
harti [Mon, 16 Jun 2003 13:52:27 +0000 (13:52 +0000)]
Fix the breakage introduced by rev. 1.43 of sys/dev/midway.c (don't commit
on friday 13th and without making a universe). This adds struct and
constant definitions for ATM traffic parameters and re-enables the
build of the midway driver.

Tested by: make universe

21 years agoReset ncpus to 1 for bound thread group since there is only one
davidxu [Mon, 16 Jun 2003 13:14:52 +0000 (13:14 +0000)]
Reset ncpus to 1 for bound thread group since there is only one
thread in such group.
Change message text from kse_rel to kserel, it is better displayed
in top.

21 years agoIf ftpd is run with an -h option (hide host-specific info,)
yar [Mon, 16 Jun 2003 11:30:23 +0000 (11:30 +0000)]
If ftpd is run with an -h option (hide host-specific info,)
don't reveal the info in reply to the SYST command.

Get rid of using the "unix" macro at the same time.  It was a rather
poor way to check if the system was Unix since there were quite a
few Unix clones out there whose cc didn't define "unix" (e.g.,
NetBSD.)  It was also sensitive to the C standard used, which caused
unnecessary trouble:  With -std=c99, it should have been "__unix__",
and so on.

PR: bin/50690
Submitted by: Alex Semenyaka <alexs _at_ snark.ratmir.ru>
MFC after: 1 week

21 years agoo Pass a correct argument to printf(3).
maxim [Mon, 16 Jun 2003 09:44:53 +0000 (09:44 +0000)]
o Pass a correct argument to printf(3).

PR: bin/51750
Submitted by: Vasil Dimov <vd@datamax.bg>
MFC after: 2 weeks

21 years agoThis file was ignored by CVS in my last commit for some reason:
phk [Mon, 16 Jun 2003 09:31:15 +0000 (09:31 +0000)]
This file was ignored by CVS in my last commit for some reason:

Remove pointless initialization of b_spc field, which now no longer
exists.

21 years agoo Correct usage example: ep(4) does not have 'link0' option.
maxim [Mon, 16 Jun 2003 09:11:29 +0000 (09:11 +0000)]
o Correct usage example: ep(4) does not have 'link0' option.
o Fix a typo.

PR: misc/51955
Submitted by: Xander <x+freebsd-gnats@surfnet.nl>
MFC after: 1 week

21 years agoBound check for broken Configuration ROM.
simokawa [Mon, 16 Jun 2003 08:43:22 +0000 (08:43 +0000)]
Bound check for broken Configuration ROM.

21 years agoForce media autodetection if the device has lost its parameter table.
yar [Mon, 16 Jun 2003 08:42:20 +0000 (08:42 +0000)]
Force media autodetection if the device has lost its parameter table.
Previously, any normal I/O on an fdc(4) device would fail with ENXIO
if the device had been opened in non-blocking mode and then closed
prior to the conventional access; that would last until the floppy
disk was ejected and re-inserted to raise the unit attention condition.

Add a clarifying comment.

21 years agoFix for big endian.
simokawa [Mon, 16 Jun 2003 08:29:24 +0000 (08:29 +0000)]
Fix for big endian.

21 years agoIf in non-blocking mode, return EAGAIN instead of ENXIO
yar [Mon, 16 Jun 2003 07:50:17 +0000 (07:50 +0000)]
If in non-blocking mode, return EAGAIN instead of ENXIO
on an I/O attempt.  This is needed for consistency with
the concept of the half-opened state of fdc(4).

PR: kern/52338

21 years agoReplace evil abuse of geteblk() with malloc(9).
phk [Mon, 16 Jun 2003 07:41:47 +0000 (07:41 +0000)]
Replace evil abuse of geteblk() with malloc(9).

21 years agoGet rid of the b_spc specialty field in struct buf by using an already
phk [Mon, 16 Jun 2003 07:18:39 +0000 (07:18 +0000)]
Get rid of the b_spc specialty field in struct buf by using an already
available caller private field.

21 years agoRevert previos change for prior release/branch.
simokawa [Mon, 16 Jun 2003 03:44:36 +0000 (03:44 +0000)]
Revert previos change for prior release/branch.

21 years agoThis never should have been here.
mikeh [Mon, 16 Jun 2003 03:06:32 +0000 (03:06 +0000)]
This never should have been here.

21 years agoUpdate for latest lukemftp import.
mikeh [Mon, 16 Jun 2003 02:37:42 +0000 (02:37 +0000)]
Update for latest lukemftp import.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r116424,
mikeh [Mon, 16 Jun 2003 02:36:38 +0000 (02:36 +0000)]
This commit was generated by cvs2svn to compensate for changes in r116424,
which included commits to RCS files with non-trunk default branches.

21 years agoImport the June 15, 2003 CVS version of NetBSD's ftp + patchset to fix
mikeh [Mon, 16 Jun 2003 02:36:38 +0000 (02:36 +0000)]
Import the June 15, 2003 CVS version of NetBSD's ftp + patchset to fix
header file differences between FBSD and NBSD. Like lukemftpd, the
portable version of lukemftp lags too far behind CVS.

This import includes several big fixes plus a cleaned up manpage.

21 years agoLock the vm object when freeing pages.
alc [Sun, 15 Jun 2003 21:50:38 +0000 (21:50 +0000)]
Lock the vm object when freeing pages.

21 years agoIn the device attach routine, don't depend on uaa->iface being
wpaul [Sun, 15 Jun 2003 21:45:43 +0000 (21:45 +0000)]
In the device attach routine, don't depend on uaa->iface being
populated. Apparently, if you use an ehci controller, it's not.
Use usbd_device2interface_handle() to retrieve the interface handle.
NOTE: uaa->iface is populated in the probe routine, so I suspect the
fact that it's NULL in the attach routine is a bug in the ehci driver.

Also, don't depend on the PHY addresses returned by the AXE_CMD_READ_PHYID
command. The address is correct for my LinkSys NIC, but a user has
reported that with a D-Link NIC, the PHYID command returns address 4
while the attached Broadcom PHY is in fact strapped for address 0.
Instead, latch onto the first PHY address that returns valid data
during a readreg operation.

21 years agoFix yppasswdproc_update_master_1_svc() too.
mbr [Sun, 15 Jun 2003 21:24:45 +0000 (21:24 +0000)]
Fix yppasswdproc_update_master_1_svc() too.

Only call pw_mkdb if passfile == _PATH_MASTERPASSWD.
Otherwise, rename master.passwd to a temp filename, rename
the new passwd to master.passwd, and let yppwupdate update
passwd as it sees fit.

Reviewed by: phk
Tested by: genesys

21 years agoThe page queue lock is already held in pmap_remove, change acquire/release
jake [Sun, 15 Jun 2003 21:06:49 +0000 (21:06 +0000)]
The page queue lock is already held in pmap_remove, change acquire/release
to assertion of ownership.  Serves me right for not booting a witness
kernel.

21 years agoRemove the evil BIOTOBUF macro, it is no longer used anywhere.
phk [Sun, 15 Jun 2003 20:36:22 +0000 (20:36 +0000)]
Remove the evil BIOTOBUF macro, it is no longer used anywhere.

Retain b_bio as the first element of struct buf for now in case some code
somewhere still do the evil cast thing.

21 years agoIn specfs::vop_specstratey(), assert that the vnode and buffer agree about
phk [Sun, 15 Jun 2003 20:31:04 +0000 (20:31 +0000)]
In specfs::vop_specstratey(), assert that the vnode and buffer agree about
the device.

21 years ago- Mirror vm_page_queue_mtx assertions added to the i386 pmap.
jake [Sun, 15 Jun 2003 19:54:50 +0000 (19:54 +0000)]
- Mirror vm_page_queue_mtx assertions added to the i386 pmap.
- Add vm page queue locking in certain places that are only needed on
  sparc64.

This should make pmap_qenter and pmap_qremove MP-safe.

Discussed with: alc

21 years agoI have not had any reports of trouble for a long time, so remove the
phk [Sun, 15 Jun 2003 19:49:14 +0000 (19:49 +0000)]
I have not had any reports of trouble for a long time, so remove the
gentle versions of the vop_strategy()/vop_specstrategy() mismatch methods
and use vop_panic() instead.

21 years agoRemember to release the loader's heap.
jake [Sun, 15 Jun 2003 19:16:43 +0000 (19:16 +0000)]
Remember to release the loader's heap.

Reviewed by: tmm

21 years agoTake 2: Remove _both_ KASSERTS.
phk [Sun, 15 Jun 2003 19:16:34 +0000 (19:16 +0000)]
Take 2:  Remove _both_ KASSERTS.

21 years agoDuh! I misread my handwritte notes: We do _not_ want to asser that
phk [Sun, 15 Jun 2003 19:14:03 +0000 (19:14 +0000)]
Duh!  I misread my handwritte notes:  We do _not_ want to asser that
vp == bp->b_vp in specfs, that was the entire point of VOP_SPECSTRATEGY().

21 years agoAdd the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations
phk [Sun, 15 Jun 2003 18:53:00 +0000 (18:53 +0000)]
Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations
to check that the buffer points to the correct vnode.

21 years agoAdd my timecounter paper from EuroBSDcon2002
phk [Sun, 15 Jun 2003 18:49:46 +0000 (18:49 +0000)]
Add my timecounter paper from EuroBSDcon2002

21 years agoRemove in toto coda_strategy which incorrectly implemented vop_panic();
phk [Sun, 15 Jun 2003 18:45:15 +0000 (18:45 +0000)]
Remove in toto coda_strategy which incorrectly implemented vop_panic();

21 years agoMerge entries from maho's USB device compatibility list.
hrs [Sun, 15 Jun 2003 18:20:51 +0000 (18:20 +0000)]
Merge entries from maho's USB device compatibility list.

Obtained from: http://people.FreeBSD.org/~maho/USB/

21 years agoAlways set bio_resid properly in fdstrategy(),
yar [Sun, 15 Jun 2003 18:13:17 +0000 (18:13 +0000)]
Always set bio_resid properly in fdstrategy(),
as should every block device strategy routine.
There was at least one evil consequence of not doing so:
Some errors returned by fdstrategy() could be lost (EAGAIN,
in particular.)

PR: kern/52338 (in the audit-trail)
Discussed with: bde

21 years agoCheck whether the floppy type pointer has been set before trying
yar [Sun, 15 Jun 2003 16:18:58 +0000 (16:18 +0000)]
Check whether the floppy type pointer has been set before trying
to access floppy parameters through it.

Note: The DIOCGSECTORSIZE and DIOCGMEDIASIZE handlers withing
fdioctl() couldn't be just moved to below the existing check
for blocking mode because fd->ft can be non-NULL while still
in non-blocking mode (fd->ft can be set with the FD_STYPE ioctl.)

PR: kern/52338
No MFC: Not applicable to STABLE

21 years agoVarious cr*() calls believed to be MPSAFE, since the uidinfo
rwatson [Sun, 15 Jun 2003 15:57:42 +0000 (15:57 +0000)]
Various cr*() calls believed to be MPSAFE, since the uidinfo
code is locked down.

21 years agoName a function argument "mbuf", not "buf", if it is
yar [Sun, 15 Jun 2003 14:47:12 +0000 (14:47 +0000)]
Name a function argument "mbuf", not "buf", if it is
a pointer to struct mbuf for clarity and consistency.

21 years agoAdd missing descriptions of macros M_ALIGN and MH_ALIGN.
yar [Sun, 15 Jun 2003 14:40:03 +0000 (14:40 +0000)]
Add missing descriptions of macros M_ALIGN and MH_ALIGN.
Remove a reference to the defunct macro M_COPY_PKTHDR;
document the new functions m_dup_pkthdr() and m_move_pkthdr(),
and the macro variant of the latter, M_MOVE_PKTHDR().

21 years agoAdd more markup to the mbuf(9) manpage. This includes:
yar [Sun, 15 Jun 2003 14:14:11 +0000 (14:14 +0000)]
Add more markup to the mbuf(9) manpage.  This includes:

- tagging plaintext "mbuf", "mbuf cluster", and "mbuf chain"
  with .Vt (variable type) since all of them are ways of managing
  data, i.e., they can be seen as data types;

- using .Vt/.Va instead of .Li (literal) where appropriate;

- tagging plaintext words that actually refer to function arguments
  with .Fa.

Suggested by: ru

21 years agoIf lint(1) is not "lint", don't try to lint the xlint compat-libs. A
markm [Sun, 15 Jun 2003 13:03:37 +0000 (13:03 +0000)]
If lint(1) is not "lint", don't try to lint the xlint compat-libs. A
third-party lint is probably being used.

21 years ago1. Add code to support bound thread. when blocked, a bound thread never
davidxu [Sun, 15 Jun 2003 12:51:26 +0000 (12:51 +0000)]
1. Add code to support bound thread. when blocked, a bound thread never
   schedules an upcall. Signal delivering to a bound thread is same as
   non-threaded process. This is intended to be used by libpthread to
   implement PTHREAD_SCOPE_SYSTEM thread.
2. Simplify kse_release() a bit, remove sleep loop.

21 years agoUse .Va, not .Fa, to refer to structure members.
yar [Sun, 15 Jun 2003 12:42:41 +0000 (12:42 +0000)]
Use .Va, not .Fa, to refer to structure members.

mdoc(7) contains an ambiguous statement on the issue,
but our mdoc(7) police's opinion is solid.

Suggested by: ru

21 years agoIf the device goes away during ulpt_reset(), make sure not to call
iedowse [Sun, 15 Jun 2003 11:55:50 +0000 (11:55 +0000)]
If the device goes away during ulpt_reset(), make sure not to call
ulpt_status() afterwards. This fixes a crash that can occur if a
USB printer is power-cycled when printing is just starting. The
problem is similar to that fixed in revision 1.33, but it is much
less likely to occur.

MFC after: 1 week

21 years agoDon't overwrite the static panicstr buffer for secondary and further
iedowse [Sun, 15 Jun 2003 11:43:00 +0000 (11:43 +0000)]
Don't overwrite the static panicstr buffer for secondary and further
panics. Before revision 1.38, we used to just point panicstr at the
format string if panicstr was NULL, but since we now use a static
buffer for the formatted panic message, we have to be careful to
only write to it during the first panic.

Pointed out by: bde

21 years agoUse __builtin_alloca() on compilers that have it. Keep the prototype for
des [Sun, 15 Jun 2003 11:01:52 +0000 (11:01 +0000)]
Use __builtin_alloca() on compilers that have it.  Keep the prototype for
the benefit of lint and non-{GNU,Intel} compilers.

21 years agoRemove the definition of alloca(), it does not belong here.
des [Sun, 15 Jun 2003 10:59:44 +0000 (10:59 +0000)]
Remove the definition of alloca(), it does not belong here.

21 years agoKill prototype for __msgwrite too. It is not needed anymore.
mbr [Sun, 15 Jun 2003 10:55:39 +0000 (10:55 +0000)]
Kill prototype for __msgwrite too. It is not needed anymore.

21 years agoFix the master yppasswd routines, so they really work
mbr [Sun, 15 Jun 2003 10:37:22 +0000 (10:37 +0000)]
Fix the master yppasswd routines, so they really work
for root on ypmaster. yppasswd_local() did use YPPASSWDPROG
instead of MASTER_YPPASSWDPROG, and the domain was not set,
resulting in a coredump during xdr-encode.

Reviewed by: des

21 years agoFix the master yppasswd routines, so they really work
mbr [Sun, 15 Jun 2003 10:36:53 +0000 (10:36 +0000)]
Fix the master yppasswd routines, so they really work
for root on ypmaster. Fix ypclnt_havepasswdd() to work
for AF_LOCAL connections.

Reviewed by: des

21 years agoOnly call pw_mkdb if passfile == _PATH_MASTERPASSWD.
mbr [Sun, 15 Jun 2003 10:34:11 +0000 (10:34 +0000)]
Only call pw_mkdb if passfile == _PATH_MASTERPASSWD.
Otherwise, rename master.passwd to a temp filename, rename
the new passwd to master.passwd, and let yppwupdate update
passwd as it sees fit.

PR: 52601, 7968
Reviewed by: des
Submitted by: Dan Nelson <dnelson@allantgroup.com>

21 years agoReplace the old SCM_CREDS cred procedures. They can now be
mbr [Sun, 15 Jun 2003 10:32:01 +0000 (10:32 +0000)]
Replace the old SCM_CREDS cred procedures. They can now be
replaced just fine with getpeereid() and the whole code
gets a lot simpler. We don't break the ABI, since all server
programms use __rpc_get_local_uid(), and we just change library
internals.

Reviewed by: des

21 years agoerr() on allocation failure. WARNS=9 compliant
charnier [Sun, 15 Jun 2003 09:28:17 +0000 (09:28 +0000)]
err() on allocation failure. WARNS=9 compliant
use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering
when a message is provided, use errx() instead of err().

21 years agoDocument changes to default output.
grog [Sun, 15 Jun 2003 08:46:36 +0000 (08:46 +0000)]
Document changes to default output.

21 years agoPrint out the current recording devices in the default printout.
grog [Sun, 15 Jun 2003 08:46:04 +0000 (08:46 +0000)]
Print out the current recording devices in the default printout.

Discussed with: cg

Break some particularly long lines.

Still not enough for:  bde.

21 years agoRemove an unnecessary forward declaration.
alc [Sun, 15 Jun 2003 07:28:33 +0000 (07:28 +0000)]
Remove an unnecessary forward declaration.

21 years agoNow that the kernel access control for quotactl(2) appears to work
rwatson [Sun, 15 Jun 2003 06:54:36 +0000 (06:54 +0000)]
Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1).  quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab.  The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
  users from querying the quotas of other users or groups.  Note
  that this papered over previously broken kernel access control;
  if you queried directly using the system call, you could access
  some of the data "restricted" by quota(1).

In the new world order, the ability to inspect the (live) quotas of
other uids and gids via the kernel is controlled by the privilege
requirement sysctl.  The ability to query via the file is controlled
by the file permissions on the quota database backing files
(root:operator, group readable by default).

21 years agoNow that the kernel access control for quotactl(2) appears to work
rwatson [Sun, 15 Jun 2003 06:46:24 +0000 (06:46 +0000)]
Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1).  quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab.  The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
  users from querying the quotas of other users or groups.  Note
  that this papered over previously broken kernel access control.

21 years agoRe-implement kernel access control for quotactl() as found in the
rwatson [Sun, 15 Jun 2003 06:36:19 +0000 (06:36 +0000)]
Re-implement kernel access control for quotactl() as found in the
UFS quota implementation.  Push some quite broken access control
logic out of ufs_quotactl() into the individual command
implementations in ufs_quota.c; fix that logic.  Pass in the thread
argument to any quotactl command that will need to perform access
control.

o quotaon() requires privilege (PRISON_ROOT).

o quotaoff() requires privilege (PRISON_ROOT).

o getquota() requires that:

    If the type is USRQUOTA, either the effective uid match the
    requested quota ID, that the unprivileged_get_quota flag be
    set, or that the thread be privileged (PRISON_ROOT).

    If the type is GRPQUOTA, require that either the thread be
    a member of the group represented by the requested quota ID,
    that the unprivileged_get_quota flag be set, or that the
    thread be privileged (PRISON_ROOT).

o setquota() requires privilege (PRISON_ROOT).

o setuse() requires privilege (PRISON_ROOT).

o qsync() requires no special privilege (consistent with what
  was present before, but probably not very useful).

Add a new sysctl, security.bsd.unprivileged_get_quota, which when
set to a non-zero value, will permit unprivileged users to query user
quotas with non-matching uids and gids.  Set this to 0 by default
to be mostly consistent with the previous behavior (the same for
USRQUOTA, but not for GRPQUOTA).

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoTighten up the string->integer conversion in sysctl(8):
rwatson [Sun, 15 Jun 2003 06:26:08 +0000 (06:26 +0000)]
Tighten up the string->integer conversion in sysctl(8):

(1) Reject zero-length strings for CTLTYPE_INT, _UINT, _LONG,
    _ULONG.  Do not silently convert to 0.

(2) When converting CTLTYPE_INT, _UINT, _LONG, and _ULONG, check the
    end pointer generated by strtol() and strtoul() rather than
    discarding it.  Reject the string if either none of the string
    was useful for conversion to an integer, or if there was
    trailing garbage.

I.e., we will not allow you to set a numeric sysctl to a value unless
we can completely convert the string argument to a numeric value.
I tripped over this when I put the following in /etc/sysctl.conf:

   kern.maxfiles="4000"

Ouch.

21 years agoDisable unneeded devices and options.
nyan [Sun, 15 Jun 2003 04:31:52 +0000 (04:31 +0000)]
Disable unneeded devices and options.

21 years agoRemove CPU_ATHLON_SSE_HACK option.
nyan [Sun, 15 Jun 2003 04:29:37 +0000 (04:29 +0000)]
Remove CPU_ATHLON_SSE_HACK option.