Compare commits

...
3701 Commits
Author SHA1 Message Date
Ken Smith de7242811f Looks like we're ready for the release...
Approved by:	re (implicit)
2006-05-23 04:09:11 +00:00
Bruce A. Mah 8d9de78e04 Add a paragraph documenting 5.5-RELEASE as the last (planned) 5-STABLE
release.  Some form of this text will also go into the release
announcement.

Approved by:	re (kensmith)
Reviewed by:	kensmith, cperciva
2006-05-22 17:05:47 +00:00
Pyun YongHyeon 2d3fe1bf18 MFC if_em.c, 1.92 to RELENG_5_5:
Add jumbo frame support for architectures with strict alignment.

Requested by:	wilko
Approved by:	re (kensmith)
2006-05-21 23:45:56 +00:00
Xin LI 199a4ca516 MFC: Remove reference to -stable@
Approved by:	re (hrs)
2006-05-21 14:26:08 +00:00
Hiroki Sato ed010929d3 Fix &release.url; for 5.5-RELEASE.
Approved by:	re (implicitly)
2006-05-20 19:10:33 +00:00
Hiroki Sato 5df487bb4a Remove description about subscribing to stable@.
Approved by:	re (implicitly)
2006-05-20 19:02:59 +00:00
Ken Smith f890728dbb Ready for RC1 builds...
Approved by:	re (implicit)
2006-05-14 03:23:59 +00:00
Xin LI 45682f4180 MFen:
errata/article.sgml:    1.69.2.33 -> 1.69.2.35.2.1
        hardware/common/artheader.sgml: 1.5.2.1 -> 1.5.2.2
        installation/common/artheader.sgml: 1.5 -> 1.5.2.1
        installation/sparc64/article.sgml (fix)
        relnotes/common/new.sgml: 1.761.2.56 -> 1.761.2.59.2.1
        relnotes/sparc64/article.sgml (fix)

Obtained from:  The FreeBSD Simplified Chinese Project
Approved by:    re (murray)
2006-05-13 05:24:18 +00:00
Bruce A. Mah ded1c67d67 MFC: tzdata2006.
Also insert missing punctuation.

Approved by:	re (kensmith)
2006-05-12 18:49:51 +00:00
Bruce A. Mah 2df9f3516a Trim errata document for 5.5-RELEASE.
Also update version number entities in this file (wait, why aren't
we using what was in share/sgml/release.ent?).

Because this is the last planned release from the RELENG_5 codeline,
remove text that implies that further 5.X releases will be forthcoming.

Approved by:	re (kensmith)
2006-05-12 18:48:47 +00:00
Bruce A. Mah 1af3dd6c74 Update entities to reflect that this set of release documents is
a full release, not a snapshot.

Approved by:	re (kensmith)
2006-05-12 18:43:57 +00:00
Ken Smith 720bb3f7b9 Update for 5.5-RELEASE.
Approved by:	re (implicit)
2006-05-12 16:05:29 +00:00
Ken Smith 664a104e89 Add packages-5.5-release.
Approved by:	re (implicit)
2006-05-12 15:51:55 +00:00
Ken Smith bf8b8f7221 Update FreeBSD_version for 5.5-RELEASE.
Approved by:	re (implicit)
2006-05-12 15:47:05 +00:00
Ken Smith 25dd903a4a RELENG_5 -> RELENG_5_5
Approved by:	re (implicit)
2006-05-12 15:43:54 +00:00
Ken Smith 7fecf17c90 5.4 -> 5.5
Approved by:	re (implicit)
2006-05-12 15:42:35 +00:00
Ken Smith 6cd57f4fb1 Adjust branch tag for updates to RELENG_5_5.
Approved by:	re (implicit)
2006-05-12 15:37:46 +00:00
Ken Smith a4543b77c9 Update default OS.
Approved by:	re (implicit)
2006-05-12 15:36:50 +00:00
cvs2svn 17b6f54a81 This commit was manufactured by cvs2svn to create branch 'RELENG_5_5'. 2006-05-12 01:09:20 +00:00
Garrett Wollman c8b0c915cc Merge tzdata2006g from vendor branch. At this point, HEAD, RELENG_6,
and RELENG_5 should have the same data.

Approved by:	re (kensmith)
2006-05-12 01:09:19 +00:00
Bruce A. Mah 690a1b72a1 MFC: Bump copyright year on the hardware notes and installation guide.
hardware/common/artheader.sgml	1.7 -> 1.8
	installation/common/artheader.sgml	1.7 -> 1.8

(Not an exact MFC because the installation document was also missing
2005 in its copyright year list, which I added.)

PR:		97134
Approved by:	re (blanket approval from hrs for RELENG_5 src/doc)
2006-05-11 16:20:21 +00:00
Bruce A. Mah 339a3b5c36 New release note: ndis(4) partial sync with HEAD.
MFC:  if_bridge(4), twa(4) update 9.3.0.1, bsdiff(1)/bspatch(1),
cmp(1) -h, kdump(1) -s, netstat(1) -h, sweeping ping(8), power(8),
rfcomm_sppd(1) service names, rm(1) -I, sh(1) times, snapinfo(8),
rc.d/bluetooth, pkg_add(1) -P, pkg_add(1)/pkg_create(1) -K,
pkg_create(1) -x/-E/-G, pkg_version(1) -o, portsnap(8), ports startup
script suffixes removed, ldconfig_local{,32}_dirs, pkg-plist @cwd.

Also remove a sentence about &merged; features (this sentence only
applies to HEAD).

Approved by:	re (hrs)
2006-05-11 15:57:37 +00:00
Bruce A. Mah d9feec23ed MFC: Second core on dual-core processors enabled. Fix typo in KDE
release note.

Approved by:	re (kensmith)
2006-05-10 19:27:25 +00:00
David Malone 2e8c5170db MFC: 1.37
Stop dump reading off the end of its inode bitmaps when it finds an
invalid inode number in a directory entry.

Approved by:    re
2006-05-02 19:08:58 +00:00
David Malone 8495a95f30 MFC: v1.45, v1.44
Make port 37 time work on machines with 64 bit longs. Also merge a couple
of updates to comments.

Approved by:    re
2006-05-02 18:32:08 +00:00
Ed Maste f9b5f2b5e2 MFC queue.3 1.39 to RELENG_5:
The removal of CIRCLEQ left four queue macro families, but one sentence
  in the man page wasn't updated.

PR:             docs/94938
Submitted by:   Ed Schouten <[email protected]>
Approved by:	re
2006-05-02 03:59:35 +00:00
Maxim Konovalov 2953148ccc MFC rev. 1.7: fix prototype for SYSCALL_MODULE(9).
Approved by:	re (kensmith)
2006-05-01 20:32:56 +00:00
Maxim Konovalov c0c8759eb7 MFC rev. 1.33: document SO_NOSIGPIPE.
Approved by:	re (kensmith)
2006-05-01 20:25:35 +00:00
Maxim Konovalov 52593e6d27 MFC rev. 1.4 netflow.h: replace disappeared URLs to Cisco docs by
new ones, style.

Approved by:	re (kensmith)
2006-05-01 20:18:33 +00:00
Maxim Konovalov 556abc3fc3 MFC rev. 1.59: describe what actually boot(8) -m mutes.
Approved by:	re (kensmith)
2006-05-01 20:01:13 +00:00
Maxim Konovalov 1ba03a445d MFC rev. 1.95: do not double i/o stats for cd(4).
Approved by:	re (kensmith)
2006-05-01 19:55:13 +00:00
Maxim Konovalov 6eca17dd3c MFC rev. 1.9: dbm_close(3) returns void.
Approved by:	re (kensmith)
2006-05-01 19:48:09 +00:00
Maxim Konovalov bd13d07bf8 MFC rev. 1.7: document /dev/fido.
Approved by:	re (kensmith)
2006-05-01 19:44:16 +00:00
Maxim Konovalov b245b1ce78 MFC rev. 1.54: be pedantic and do fts_close() when done.
Approved by:	re (kensmith)
2006-05-01 19:34:34 +00:00
Maxim Konovalov 84c745821c MFC rev. 1.32: reset lineno to 1 for each devd config file.
Approved by:	re (kensmith)
2006-05-01 19:30:43 +00:00
Joe Marcus Clarke d662f50a75 MFC:
Fix a file descriptor leak in cam_lookup_pass() when the ioctl to find
the passthru device fails.

Approved by:	re (scottl)
2006-05-01 00:21:47 +00:00
Andrew Thompson ccd1abaeb4 MFC r1.14-16, sync to HEAD
Approved by:    re (hrs)
2006-04-29 03:31:28 +00:00
Colin Percival d839ba8bed MFC: Allow L2 caches to be shared between processors by default.
Approved by:    re (scottl)
2006-04-28 06:54:34 +00:00
Xin LI 7aa7977a9a MFC 1.2 (tjr):
Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to search
backwards afterwards.

Submitted by:	Matthias Scheler
Approved by:	re (hrs)
2006-04-26 03:46:10 +00:00
Xin LI b2c53a114e MFC: Document SA-06:14.fpu
Approved by:	re (hrs)
2006-04-24 01:06:36 +00:00
Alan Cox ee7124c3c6 Include opt_pmap.h for PMAP_SHPGPERPROC.
PR: 94509
Approved by: re (scottl)
2006-04-22 20:51:04 +00:00
Andrew Thompson 2620d33623 Document a limitation where the bridge may not forward a reassembled fragment,
this is becuase the new packet may be larger than the MTU.

Approved by:    re (hrs)
2006-04-21 10:39:53 +00:00
Brooks Davis aacfa2aa6f MFC rev 1.13:
Fix ypwhich -m.  This should be MFC'ed back at least as far as RELENG_5.

Submitted by:	Gil Kloepfer <[email protected]>
PR:		64445
Approved by:	re (scottl)
2006-04-21 05:16:41 +00:00
SUZUKI Shinsuke 5e8762da71 MFC Rev 1.37
use if_allmulti(0) for disabling the multicast promiscuous mode

Approved by: re(scottl)
2006-04-20 15:16:03 +00:00
Colin Percival 371204695e MFC: Correct a local information leakage bug affecting AMD FPUs.
Security:	FreeBSD-SA-06:14.fpu
Approved by:	re (scottl)
2006-04-19 07:01:30 +00:00
Jonathan Chen e9ded558c2 MFC 1.261 - fix a crash when an nfsv2 mount fails
Approved by:	re
2006-04-18 05:18:47 +00:00
Guy Helmer 8ff6c05d03 MFC: aic79xx_osm.c 1.22 aic7xxx_osm.c 1.43
Correct bug that caused the completed "recovery" scb to have its
  timer reset rather than the timer of an SCB still pending on the
  controller after recovery completed.  This should correct timeout
  loops seen in the field.

This change seems to help with a hang we've seen in the field with
SCB timeout recovery.

Approved by:	re
OK'ed by:	gibbs
2006-04-14 14:11:18 +00:00
Gregory Neil Shapiro 0820af39eb Forced commit to bump the $FreeBSD$ version so mergemaster merges
/etc/mail/freebsd.cf and /etc/mail/freebsd.submit.cf.

PR:		conf/95634
Submitted by:	Rostislav Krasny
Approved by:	re (scottl)
Obtained from:	keramida
2006-04-13 04:08:22 +00:00
Ken Smith 9535c7fea1 MFC v1.887.2.9
> Drop the languages we'll build docs for as part of the release down to
> just English due to a ISO size crisis for disc2.  This is being done
> after consultation with the doceng folks, who basically agreed that
> of the two evils this is less evil than going with the -lite versions
> of gnome/kde.  We are only doing this on RELENG_5/RELENG_6.  On HEAD
> we plan to adjust sysinstall so there will be no packages at all on
> disc1/disc2 and we can have an arbitrary number of dedicated package
> discs but that seems like too much of a change for RELENG_5/RELENG_6
> particularly at this stage in the release.

Discussed with: re@, doceng@
Approved by:    re (scottl)
2006-04-09 04:38:14 +00:00
Bjoern A. Zeeb 414c4c6e5e MFC:
rev. 1.3 src/sys/netipsec/xform.h, rev. 1.12 src/sys/netipsec/xform_ipip.c

  Fix more stack corruptions on amd64.

  Vararg functions have a different calling convention than regular
  functions on amd64. Casting a varag function to a regular one to
  match the function pointer declaration will hide the varargs from
  the caller and we will end up with an incorrectly setup stack.

  Entirely remove the varargs from these functions and change the
  functions to match the declaration of the function pointers.
  Remove the now unnecessary casts.

  Also change static struct ipprotosw[] to two independent
  protosw/ip6protosw definitions to remove an unnecessary cast.

PR:		amd64/95008
Submitted by:	Mats Palmgren
Approved by:	re (scottl)
2006-04-08 22:37:48 +00:00
Xin LI 51f99d81e7 MFen:
Makefile			      1.3 -> 1.5.2.1
  errata/article.sgml		1.69.2.17 -> 1.69.2.33
  hardware/common/dev.sgml     1.227.2.26 -> 1.227.2.35
  installation/sparc64/article.sgml   (redo merge)
  relnotes/common/new.sgml     1.761.2.43 -> 1.761.2.56
  share/sgml/release.dsl	      (typo fix)

Remove EAG.

Obtained from:	FreeBSD Simplified Chinese Project
Approved by:	re (scottl)
2006-04-05 03:44:52 +00:00
Chuck Lever 12fa5afc88 rick says:
The following bug was just identified in OpenBSD and it looks like the same
bug exists in the other BSDen NFS servers.

A Linux client (don't know which version, but you can look at
        http://bugzilla.kernel.org/show_bug.cgi?id=6256)
does a Setattr of mtime to the server's time, where the file is mode 0664 and
the client user has group access (ie. caller is not the file owner).

The BSD servers fail the Setattr with EPERM, since the VA_UTIMES_NULL flag
isn't set before doing the VOP_SETATTR.

It seems to me that this should be allowed, since it is allowed for a local
utimes(2). If so, the fix is to set VA_UTIMES_NULL for the
"set-time-to-server-time" cases of setting atime and/or mtime.

MFC of revision 1.140 to RELENG_5.

Submitted by:	[email protected]
Reviewed by:	cel
Approved by:	re (scottl), silby
2006-04-05 00:33:33 +00:00
Marcus Alves Grando b6b4acbfd8 MFC: Sync with HEAD
Approved by:	re (scottl)
2006-04-04 21:22:35 +00:00
John-Mark Gurney 76a0847746 MFC: kern_event.c v1.97
clear any action flags on the register knote

Approved by:    re (scottl)
2006-04-04 17:32:20 +00:00
Florent Thoumie 62807b64f9 MFC:
- Replace awk parts with shell.

      src/etc/rc.d/nsswitch: rev 1.5 -> 1.6

Approved by:	re (scottl)
2006-04-04 14:28:41 +00:00
Andrew Thompson 80d0b83b2b Fix the build.
Pointy hat:	thompsa
Approved by:	re (implicit)
2006-04-02 23:55:05 +00:00
Robert Watson e9fb978bef Merge ipsec.c:1.44 from HEAD to RELENG_5:
Remove manual assignment of m_pkthdr from one mbuf to another in
  ipsec_copypkt(), as this is already handled by the call to
  M_MOVE_PKTHDR(), which also knows how to correctly handle MAC m_tags.
  This corrects a panic when running with MAC and KAME IPSEC.

  PR:             kern/94599
  Submitted by:   zhouyi zhou <zhouyi04 at ios dot cn>
  Reviewed by:    bz

Approved by:	re (mux)
2006-04-02 11:15:52 +00:00
Robert Watson 8f17f291ab Merge if_ppp.c:113 from HEAD to RELENG_5:
Add IFF_NEEDSGIANT to kernel PPP support.  I have no idea why this wasn't
  here, but it should have been.

Approved by:	re (hrs)
2006-04-02 11:14:10 +00:00
John-Mark Gurney ac903a6b22 MFC: kern_event.c v1.96
fix race condition

Approved by:	re (hrs)
2006-04-02 08:22:43 +00:00
Andrew Thompson d063dbfc49 MFC r1.57-58
Use m_dup rather than m_copypacket as we need a writable mbuf

On behalf of:   rik
Approved by:    re (hrs)
2006-04-02 04:42:37 +00:00
Chuck Lever 6c1779b859 If an NFS server returns more than a few EJUKEBOX errors for a given RPC
request, the FreeBSD NFS client will quickly back off to a excessively
long wait (days, then weeks) before retrying the request.

Change the behavior of the FreeBSD NFS client to match the behavior of
the reference NFS client implementation (Solaris).  This provides a fixed
delay of 10 seconds between each retry by default.  A sysctl, called
nfs3_jukebox_delay, is now available to tune the delay.  Unlike Solaris,
the sysctl value on FreeBSD is in seconds, rather than in HZ.

MFC revision 1.136 to RELENG_5

Sponsored by:   Network Appliance, Incorporated
Reviewed by:    rick
Approved by:    re (kensmith), silby
2006-04-02 04:15:34 +00:00
Hiroki Sato fa91e08654 Document 06:13.sendmail, 06:12.opie, 06:11.ipsec, and 06:10.nfs.
Submitted by:	delphij
Approved by:	re (implicitly)
2006-03-30 15:31:36 +00:00
Brad Davis cd6bb7c69b MFC 1.39
Fix a typo

Approved by:	re@, ceri@
2006-03-30 04:13:19 +00:00
Chuck Lever d36f6f56ed Fix a bug in NFSv3 READDIRPLUS reply processing
The client's READDIRPLUS logic skips the attributes and
filehandle of the ".." entry.  If the server doesn't send
attributes but does send a filehandle for "..", the
client's logic doesn't account for the extra "value
follows" field that indicates whether the filehandle is
present, causing the remaining entries in the reply
to be ignored.

This is an MFC of 1.264 in the CURRENT branch.

Sponsored by:   Network Appliance, Inc.
Reviewed by:    rick, mohans
Approved by:    re, silby
2006-03-29 17:48:10 +00:00
Gregory Neil Shapiro e8eb2b1e18 MFC: Update sendmail 8.13.4 -> 8.13.6 in release note entry.
Approved by:	re (kensmith)
2006-03-29 07:57:00 +00:00
Gregory Neil Shapiro 0b265833fc MFC: Add new libsm file from sendmail 8.13.6
Approved by:	re (kensmith)
2006-03-29 07:41:16 +00:00
Gregory Neil Shapiro 19018fea0e MFC: sendmail 8.13.6
Approved by:	re (kensmith)
2006-03-29 07:40:50 +00:00
Hajimu UMEMOTO c27886f75d MFC:
- When res_send() fails, we should reserve an error code.
  - When res_nquerydomain() returns SERVFAIL, we should try next domain.

	src/lib/libc/net/getaddrinfo.c:		1.75, 1.76
	src/lib/libc/resolv/res_query.c:	1.3

Approved by:	re (hrs)
2006-03-29 03:38:58 +00:00
Ceri Davies 579c623cdb MFC revision 1.71:
The rpc.pcnfsd server was in the base for a little over seven
	minutes back in 1994.  Change the example entry to point at the
	port, as per the entries for uucpd et al.

Approved by:	re (kensmith)
2006-03-28 15:52:12 +00:00
Max Laier ae940990fc MFC pf_norm.c rev. 1.17:
Loopback pf_norm.c rev. 1.106 from OpenBSD:
      fixup IP checksum when modifying IP header fields

  PR:			kern/93849
  Obtained from:	OpenBSD

Approved by:	re (kensmith)
2006-03-28 15:06:03 +00:00
Hiroki Sato c97f5a2821 New release notes:
FreeBSD-SA-06:09.openssh,
	FreeBSD-SA-06:10.nfs,
	FreeBSD-SA-06:11.ipsec,
	FreeBSD-SA-06:12.opie, and
	FreeBSD-SA-06:13.sendmail.

Submitted by:	delphij
Approved by:	re (implicitly)
2006-03-26 16:28:35 +00:00
SUZUKI Shinsuke 69668c6beb MFC Rev 1.27 (avoid heap overrun)
Approved by: re(kensmith)
2006-03-24 15:01:02 +00:00
Xin LI 72434ad7d5 MFC 1.263: a typo fix (diff reduction against -HEAD)
Approved by:	re (hrs)
2006-03-24 04:48:42 +00:00
Pyun YongHyeon 70748c8a6f MFC if_hme.c:1.47 to RELENG_5:
Backout rev. 1.46. It caused Rx checksum offload breakage on little
 endian systems.

Approved by:	re (hrs)
2006-03-24 00:39:23 +00:00
Hiroki Sato e6c7e47534 MFC(rev.1.15):
Revert description of EBUSY.

Approved by:	re (implicitly)
2006-03-23 07:48:50 +00:00
Hiroki Sato fb71a7329c MFC (rev.1.4 and 1.5):
Fix incorrect command line examples.

Submitted by:	Yoshihiko Sarumaru (mistral at imasy dot or dot jp)
PR:		docs/94158
Approved by:	re (kensmith)
2006-03-23 07:37:56 +00:00
cvs2svn 908ebec3a1 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2006-03-22 16:40:06 +00:00
Colin Percival f891a117b0 Add missing code needed for the detection of IPSec packet replays. [1]
Correctly identify the user running opiepasswd(1) when the login name
differs from the account name. [2]

Modify timeout handling logic in sendmail(8) to correct a reported
signal handling race condition. [3]

Approved by:	re (scottl)
Security:	FreeBSD-SA-06:11.ipsec [1]
Security:	FreeBSD-SA-06:12.opie [2]
Security:	FreeBSD-SA-06:13.sendmail [3]
2006-03-22 16:01:56 +00:00
Joseph Koshy eaf7b2ea89 MFC { r1.4,r1.5 etc/periodic/security/security.functions
r1.30 etc/defaults/periodic.conf
      r1.51 share/man/man5/periodic.conf.5 }
 - Add a knob 'daily_status_security_diff_flags' controlling the
   format of the 'diff' output generated during periodic(8) scripts.
 - When looking for new lines in diff output, grep for '^[>+]' instead of
   '^>', in order to catch both normal and unified diffs.

Approved by:	re (hrs)
2006-03-22 12:01:28 +00:00
John-Mark Gurney 2b130039a7 MFC: systat.1 v1.46, vmstat.c v1.69
Properly spell and document ozfod...

Approved by:	re (hrs & kensmith)
2006-03-21 20:56:18 +00:00
Pawel Jakub Dawidek 698259b3b3 MFC: sys/geom/raid3/g_raid3.c 1.54
Fix a race which could lead to a panic under heavy load.

Submitted by:	green, Vsevolod Lobko <[email protected]>
Approved by:	re (mux)
2006-03-20 15:43:50 +00:00
Gleb Smirnoff 277b4ced97 MFC 1.24,1.25:
Fix misinformation in "setconfig" message description.

  Noticed by:	Brian A. Seklecki <lavalamp spiritual-machines.org>

Approved by:	re (mux)
2006-03-18 21:54:09 +00:00
Joerg Wunsch 7a9062a6f5 Add reference to PR for TOSHIBA TransMemory quirk entry.
Approved by:	re (implicitly)
2006-03-18 21:15:40 +00:00
Florent Thoumie bb7d51dd88 MFC:
- Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.

      src/sys/dev/usb/usbdevs: rev 1.250 -> 1.251
      src/sys/cam/scsi/scsi_da.c: rev 1.185 -> 1.186
      src/sys/dev/usb/umass.c: rev 1.130 -> 1.131

Approved by:	re (mux)
2006-03-18 20:43:51 +00:00
Joerg Wunsch d2710f0bf6 MFC rev 1.187: Add no synchronize cache quirk for TOSHIBA TransMemory
USB stick.

Approved by:	re (scottl)
2006-03-17 21:30:03 +00:00
Alan Cox f4b9e59905 MFC vm_machdep.c 1.261-1.263
Rev: 1.261

  Ensure that a thread stays on same CPU when calculating per CPU
  TLB shootdown requirements. Otherwise a CPU may not get the needed
  TLB invalidation.

  The PTE valid and access flags can not be used here to avoid TLB
  shootdowns unless sf->cpumask == all_cpus.
  ( Otherwise some CPUs may still hold an even older entry in the TLB)
  Since sf_buf_alloc mappings are normally always used this is
  also not really useful and presetting accessed and modified
  allows the CPU to speculatively load the entry into the TLB.

  Both bugs can cause random data corruption.

Rev: 1.262

  Restore optimizations to reduce TLB shootdowns.
  Alan Cox pointed out that they are really useful for
  sendfile().

Rev: 1.263
  Restore the UP optimization to reduce the number of TLB
  invalidations.  The previous revision only restored the MP optimization.

  Describe the optimization strategy for TLB invalidations in a comment.

Approved by:	re@ (scottl)
2006-03-17 19:07:33 +00:00
Xin LI 3b57ab33a9 MFC: Add snapinfo.
Discussed with:	marks
Approved by:	re (scottl)
2006-03-17 05:15:27 +00:00
Ken Smith 5d58e0461f MFC v1.11:
> date: 2006/03/17 02:05:46;  author: kensmith;  state: Exp;  lines: +0 -5
> First pass at trimming package set down.  Disc2 is still too big
> even with this but we're still deciding exactly what to do about
> that.

Approved by:	re (scottl)
2006-03-17 02:14:00 +00:00
Jung-uk Kim 4ff292f7b0 PC98 does not support big disks on RELENG_5 yet. Note that this is to sync
with interactive mode and it is not MFC because it is RELENG_5 specific.

Discussed with:	nyan
Approved by:	re (scottl)
2006-03-16 17:17:14 +00:00
John Baldwin c79e405416 Partially revert the previous revision and only use fixed delivery mode
when interrupts are routed via phyiscal addressing to the BSP during boot.
Once we switch over to logical destinations, it uses low pri delivery mode
just as in earlier 5.x releases.

Tested by:	kensmith
Approved by:	re (scottl)
2006-03-15 17:38:47 +00:00
Joe Marcus Clarke 899955f905 MFC:
Add missing libdata/ldconfig[32] entries.

Approved by:	re (scottl)
2006-03-14 22:13:13 +00:00
Roman Kurakin 6ee1224fcc MFC:
Add support for Cronyx Tau32-PCI adapters.

Approved by:	re(scottl)
2006-03-12 23:44:00 +00:00
Andrew Thompson 30bda38fb7 MFC r1.151
Further refine the bridge hack in the arp code. Only do the special arp
  handling for interfaces which are actually in the bridge group, ignore all
  others.

Approved by:    re (hrs)
2006-03-11 19:33:17 +00:00
Ed Maste d3d5b675db MFC link_elf.c:1.86 to RELENG_5:
Check to see if the hash table is present in link_elf_lookup_symbol()
  before dereferencing it.  Certain corrupt kernel modules might not have
  a valid hash table, and would cause a kernel panic when they were loaded.
  Instead of panic'ing, the kernel now prints out a warning that it is
  missing the symbol hash table.

Approved by:	re (mux)
2006-03-11 14:19:22 +00:00
Yaroslav Tykhiy d34688366a MFC:
Now login.access(5) feature belongs to pam_login_access(8),
not to login(1), unlike it used to.  This appears to apply
to RELENG_5, too.

Approved by:	re (mux)
2006-03-11 08:24:25 +00:00
Yaroslav Tykhiy adbf99ef3a MFC:
Two years ago, in rev. 1.12, a typo slipped in etc/isdn/Makefile:
  a control variable was misspelled as `SCRIPTS_NAME_isdntel.sh'
  (should've been `SCRIPTSNAME_isdntel.sh') when the Makefile was
  converted to using <bsd.prog.mk>.  Consequently, `isdntel.sh' has
  been installed as `isdntel' since then.  Nevertheless, nobody has
  been unhappy with the change.  So it's time to make it official.

Approved by:    re (mux)
2006-03-11 07:36:20 +00:00
Matt Jacob a7ab392824 MFC 1.4 and make sure the ioctl doesn't get smushed.
Approved by:	[email protected]
2006-03-09 21:43:58 +00:00
Hajimu UMEMOTO 87b34ef548 MFC 1.15: Remove trailing dot from the servername in the serverlist to
be able to use portsnap from behind a http proxy.  Some HTTP proxy
don't like trailing dot in the servername.

Approved by:	re (hrs)
2006-03-09 17:17:40 +00:00
Hajimu UMEMOTO 11078fbe4f MFC 1.9: Correct handling of HTTP_PROXY_AUTH. A password may have `:'.
Approved by:	re (hrs)
2006-03-09 17:13:39 +00:00
Xin LI dea3f02e30 MFC recent locale changes for both Simplified and Traditional
Chinese, so that applications like tcsh(1) can handle them
properly.

Approved by:	re (hrs)
2006-03-09 12:48:36 +00:00
George V. Neville-Neil 818d5235b9 Merge updated manual pages from HEAD to RELENG_5.
1.21      src/lib/libipsec/ipsec_set_policy.3
 1.14      src/lib/libipsec/ipsec_strerror.3
 1.17,1.18 src/share/man/man4/ipsec.4

Clean up some descriptions and remove ambiguities in the language.
Add explanations to the examples.

Approved by: re (scottl)
2006-03-09 12:38:36 +00:00
George V. Neville-Neil 715364b1e7 Merge in6.c:1.60 from HEAD to RELENG_5
Fix for an inappropriate bzero of the ICMPv6 stats.  The code was zero'ing the wrong structure member but setting the correct one.

Submitted by:   James dot Juran at baesystems dot com
Approved by: re (scottl)
2006-03-09 11:59:42 +00:00
Christian Brueffer 432d8122ff MFC: rev. 1.30
Remove a useless word.

Approved by:    re (hrs)
2006-03-09 09:19:26 +00:00
Christian Brueffer 0cdec95e40 MFC: rev. 1.29
DDB depends on KDB for some time now.

Approved by:    re (hrs)
2006-03-09 09:17:13 +00:00
Hajimu UMEMOTO 8426480123 MFC 1.210:
- Reduce needless DNS query by lookup only appropriate address
  family.
- Specify appropriate hints to getaddrinfo(3).
- Obtain address family from peername in inetd mode.

Approved by:	re (mux)
2006-03-09 09:15:34 +00:00
Hajimu UMEMOTO c9ebdf8f11 MFC: Handle the errors returned by res_querydomain() in same manner.
lib/libc/net/getaddrinfo.c:	1.72
	lib/libc/net/res_query.c:	1.32

Approved by:	re (mux)
2006-03-09 09:09:00 +00:00
Roman Kurakin 983c7463a9 MFC:
Add support for Cronyx Tau32-PCI. Cross fingers and hook it to the
	system.

Approved by:	re(scottl)
2006-03-07 13:53:57 +00:00
Roman Kurakin c857377452 MFC:
Add support for Cronyx Tau32-PCI adapters.

Approved by:	re(scottl)
2006-03-07 13:44:33 +00:00
Roman Kurakin 33efd96b38 MFC:
Add support for Cronyx Tau32-PCI adapters.

Approved by: re(scottl)
2006-03-07 13:35:39 +00:00
Roman Kurakin 914d4769f5 MFC:
Add support for Cronyx Tau32-PCI adapters.

Approved by:	re(scottl)
2006-03-07 13:32:48 +00:00
Hajimu UMEMOTO cab1031f82 MFC: Sync inet_net_pton() and inet_net_ntop() with latest BIND9's
includes an IPv6 support.

	lib/libc/net/inet_net.3:	1.3
	lib/libc/net/inet_net_ntop.c:	1.8
	lib/libc/net/inet_net_pton.c:	1.10

Approved by:	re (scottl)
2006-03-06 14:55:48 +00:00
Hajimu UMEMOTO f6113c0941 MFC: Decrease the value of RES_DFLRETRY from 4 to 2.
include/resolv.h:		1.26, 1.28
	lib/libc/net/res_init.c:	1.33

Approved by:	re (scottl)
2006-03-06 14:50:09 +00:00
Yaroslav Tykhiy 80ba97eb29 MFC rev. 1.326:
Do not discard the current value of __MAKE_CONF when testing
  whether MAKEOBJDIRPREFIX is set at a wrong place.

Approved by:    re (scottl)
2006-03-06 11:22:53 +00:00
Andrew Thompson 5626e8a6e0 MFC r1.8: Do not use the TSC where its known to be broken.
Approved by:    re (scottl)
2006-03-06 06:39:14 +00:00
Hajimu UMEMOTO 1a6571c894 MFC:
- Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

	lib/libc/net/getaddrinfo.c:	1.71
	lib/libc/net/res_query.c:	1.31

Approved by:	re (scottl)
2006-03-04 17:44:27 +00:00
Hajimu UMEMOTO 0e837b7b8a MFC 1.5: Add definitions of SWIDTH. It fixes the problem that
tcsh 6.14 doesn't work correctly with ko_KR.eucKR locale.

Approved by:	re (scottl)
2006-03-04 17:36:27 +00:00
Ceri Davies d1c70baf86 MFC revision 1.416:
Add new NTP servers for Taiwan.

Approved by:	re (scottl)
2006-03-04 17:24:10 +00:00
David Malone 264791cf0d MFC: Make quot skip unallocated inodes.
Approved by:	re (scottl)
2006-03-04 16:59:09 +00:00
Oleg Bulyzhin 11854a1ffb MFC if_ethersubr.c rev. 1.214, if_bridge.c rev. 1.54
Properly initialize args structure before passing it to ipfw_chk(): having
uninitialized args.inp is unhealthy for uid/gid/jail ipfw rules.

PR:		kern/92589
Approved by:	re (scottl)
2006-03-04 09:24:30 +00:00
Oleg Bulyzhin 1939056d1c MFC rev. 1.315
Fix five years old bug in ip_reass(): if we are using 'full' (i.e. including
pseudo header) hardware rx checksum offloading ip_reass() fails to calculate
TCP/UDP checksum for reassembled packet correctly.

Reviewed by:	sam (earlier version), bde
Approved by:	re (scottl)
2006-03-04 09:16:11 +00:00
Andrew Thompson f296a4e35d MFC r1.11: Fix up the Bridge Identifier field in the BPDU packet.
Approved by:    re (scottl)
2006-03-03 21:37:01 +00:00
cvs2svn a6d7f3f19b This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2006-03-03 18:42:11 +00:00
John Baldwin 84a8358866 Use fixed delivery mode for I/O APIC interrupts rather than low priority
delivery mode.

Approved by:	re (scottl)
2006-03-01 20:42:31 +00:00
Simon L. B. Nielsen ebf5deaaac Add FreeBSD-SA-06:09.openssh and FreeBSD-SA-06:10.nfs.
Approved by:	re (scottl)
2006-03-01 15:37:47 +00:00
Simon L. B. Nielsen e70dc4c152 Correct a remote DoS in OpenSSH when using PAM and privilege
separation. [06:09]

Submitted by:	des

Correct a remote kernel panic when processing zero-length RPC records
via TCP. [06:10]

Security:	FreeBSD-SA-06:09.openssh
Security:	FreeBSD-SA-06:10.nfs
Approved by:	re (scottl)
2006-03-01 14:19:48 +00:00
Ed Maste 5b6efc9869 Belatedly add a note about the i386 loader defaulting to the serial
rate set by the previous boot stage, if the console is already set
to the comconsole.

Approved by:    re (scottl)
2006-02-28 19:15:36 +00:00
Ed Maste 80bf1b8de2 MFC kern_sig.c 1.319 sys_process.c 1.134 to RELENG_5:
Avoid kernel panic when attaching a process which may not be stopped
  by debugger, e.g process is dumping core. Only access p_xthread if
  P_STOPPED_TRACE is set, this means thread is ready to exchange signal
  with debugger, print a warning if P_STOPPED_TRACE is not set due to
  some bugs in other code, if there is.

  The patch has been tested by Anish Mistry mistry.7 at osu dot edu, and
  is slightly adjusted.

Approved by:	re (scottl)
2006-02-28 15:02:51 +00:00
Ed Maste d4f501f78d MFC kern_kse.c 1.215 sys_process.c 1.132 to RELENG_5:
Fix a LOR between sched_lock and sleep queue lock.

kern_kse.c 1.216:

  Add missing brackets.

LOR ID:		060
Approved by:	re (scottl)
2006-02-28 14:58:36 +00:00
Jung-uk Kim 7c38db1e99 MFC: src/gnu/usr.bin/dialog/dialog.1 1.8
src/gnu/usr.bin/dialog/dialog.c	1.15

- Add default choice option for --yesno box.
- Reduce trivial code duplications.

Approved by:	re (scottl)
2006-02-27 20:26:47 +00:00
Jung-uk Kim e124d2d1f3 MFC: usr.sbin/sysinstall/disks.c 1.156
Sanitize BIOS geometry in non-interactive mode.

Approved by:	re (scottl)
2006-02-27 20:19:07 +00:00
Gleb Smirnoff d108b305cf Merge Ruslan's fix to IP fragment handling in dummynet to RELENG_5.
(The struct ip_fw_args is not touched to preserve ABI compatibility).

PR:		kern/93754
Requested by:	Joerg Pernfuss <elessar bsdforen.de>
Approved by:	re (scottl)
2006-02-27 17:24:13 +00:00
Dmitry Morozovsky e2b37f4349 MFC:
Remove &release.prev.historic;.

	This should fix www build.

Approved by:    re (hrs)
2006-02-27 13:30:42 +00:00
Bruce A. Mah e655ff7fe7 MFC: GNOME 2.12.3, KDE 3.5.1, Perl 5.8.8, X.org 6.9.0.
Other new release note:  SA-06:08.

Approved by:	  re (scottl)
2006-02-27 01:18:29 +00:00
Markus Brueffer 499faddbc9 MFC recent updates to hccontrol:
- Use official version strings for LMP and HCI version reporting and add
    version strings up to Bluetooth 2.0
  - Update manufacturer list

Revisions:

	hccontrol.h	rev. 1.5
	info.c		rev. 1.4
	link_control.c	rev. 1.10
	util.c		rev. 1.6

Approved by:   	re (scottl), emax
2006-02-27 00:38:18 +00:00
Ed Maste bfa64fee24 MFC boot2.c r1.74 lib.h r1.3 sio.S r1.10 boot_i386.8 r1.54 r1.55 r1.58
to RELENG_5:

  Add the ability to specify the boot2 serial console speed in
  /boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
  e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
  and required a few other small changes to limit the size impact.

Approved by:	re (scottl)
2006-02-26 17:34:47 +00:00
Ceri Davies a06bcc79a9 Sync with -HEAD.
Approved by:	re (hrs)
2006-02-26 13:21:27 +00:00
John-Mark Gurney 1253e2c153 MFC: sleep.9 v1.47
>  allow timo to be 0 when mtx is not NULL (KASSERT allowed this as
>  pointed out by jhb)

Approved by:    re (scottl)
2006-02-25 21:51:00 +00:00
Ceri Davies 8ca459a80d MFC:
devices.c	revision 1.164
	tcpip.c 	revision 1.135

  s/lp/plip/ for PLIP interfaces.

Approved by:	re (mux)
2006-02-25 18:51:13 +00:00
Ceri Davies b728fb6129 MFC revision 1.14:
The interface for PLIP has been plip0 rather than lp0 for a long time.
  Update to match.

Approved by:	re (mux)
2006-02-25 18:21:06 +00:00
Doug Barton 6d666f12e8 MFC significant overhaul of rc.d/named script, including
addition of named_uid default rc.conf variable.

etc/defaults/rc.conf		1.275
etc/rc.d/named			1.24
share/man/man5/rc.conf.5	1.286

Approved by:	re (scottl)
2006-02-24 09:43:33 +00:00
Christian Brueffer cfae57bbcf MFC: rev. 1.6
Update for the 9550 series of controllers.

Approved by:    re (scottl)
2006-02-24 08:43:51 +00:00
Ed Maste bd7971844d MFC 1.110: clear lock on error in O_LIMIT case of install_state
Approved by:    re (mux)
2006-02-23 23:06:24 +00:00
Hiroki Sato 67e4500bca Update version numbers in &release.*;.
Approved by:	re (implicitly)
2006-02-23 06:28:03 +00:00
Jesus R. Camou 98d9a9aa3e MFC:
s/ConnectionTimeout/ConnectTimeout/

Approved by:	re (hrs)
2006-02-22 19:56:46 +00:00
Kirill Ponomarev 2244a7dc57 MFC: perform.c: 1.15
date: 2006/02/12 16:09:33;  author: krion;  state: Exp;  lines: +5 -4
  Fix pkg_version with the -o argument to print the origin.

Approved by:	re (scottl)
2006-02-22 16:28:42 +00:00
Bruce A. Mah abdb37561e New release notes: SA-05:16 / SA-05:18, SA-05:17, SA-05:19, SA-05:20,
SA-05:21, SA-06:01, SA-06:02, SA-06:03, SA-06:06, SA-06:07, BIND 9.3.2,
tzdata2005r.

While here, bump copyright date.

Approved by:	re (hrs)
2006-02-21 07:31:56 +00:00
Ceri Davies 1dcc6d4498 MFC revision 1.49:
Update a comment to match functionality changed in r1.39 (allow square
  brackets in process names).

Approved by:	re (scottl)
2006-02-19 18:36:20 +00:00
Christian Brueffer 51465cc5ec MFC: rev. 1.29
Xref chkgrp(8).

Approved by:	re (mux)
2006-02-19 18:35:39 +00:00
Markus Brueffer 63e93b2bbf MFC: rev. 1.5 + 1.6
- Sort sections
- Grammar fixes
- Reword one sentence

Approved by:	re (scottl), brueffer
2006-02-19 15:45:06 +00:00
Markus Brueffer 57a02491aa MFC: rev. 1.2
- Fix attribute id of HIDBatteryPower
- Fix two typos in comments

Approved by:	re (scottl), emax
2006-02-19 15:39:31 +00:00
Hajimu UMEMOTO 7976fa9380 MFC 1.20: The libwrap built with NO_INET6=yes cannot parse
an IPv6 address.  So, mention it in comment.

Approved by:	re (scottl)
2006-02-19 14:59:00 +00:00
Hajimu UMEMOTO e6b9c64026 MFC: The wcwidth(3) should return 2 about characters in JISX0208 codeset.
But it returned 1.

	share/mklocale/ja_JP.SJIS.src:	1.5
	share/mklocale/ja_JP.eucJP.src:	1.4

Approved by:	re (scottl)
2006-02-19 05:52:19 +00:00
Dmitry Morozovsky 4f12dad3eb MFC r1.33:
Default number of direct access devices had been changed from three to two.
Reflect this in other paragraphs.

Approved by:	re (scottl)
2006-02-18 15:21:28 +00:00
Christian Brueffer f294d36f8e MFC: rev. 1.285
Correct references to ipnat(8).

Approved by:	re (murray)
2006-02-17 20:27:00 +00:00
Qing Li 588e18e8f4 Remove two unnecessary type casts, of which both had a typo in it anyways.
MFC:		rev 1.40
Approved by:	re (scottl)
2006-02-16 18:10:14 +00:00
Qing Li 1de1f79fd6 Fixes a crash due to the memory of the newly allocated syncache entry
in syncache_lookup() is not cleared and may lead to an arbitrary and
bogus rtentry pointer which later gets free'd.

MFC:		rev 1.84
Approved by:	re (scottl)
2006-02-16 18:05:03 +00:00
Qing Li cfec040194 Require gateways for routes to be of the same address family as the route itself.
MFC:		rev 1.109
Approved by:	re (scottl)
2006-02-16 17:59:18 +00:00
Qing Li e8ee857e86 Patch for PR kern/38752
MFC:		rev 1.38
Approved by:	re (scottl)
2006-02-16 17:51:53 +00:00
Ken Smith 731f1186c4 Update copyright date years to 2006.
Approved by:	re (scottl)
2006-02-16 14:49:38 +00:00
Dag-Erling Smørgrav 085360b386 MFC: (1.77) fix mirror mode.
PR:		bin/86940
Approved by:	re (kensmith)
2006-02-16 13:56:18 +00:00
Gleb Smirnoff 4cdd1d6406 MFC 1.107:
Fix two important typos in watchdog handling:
  - Restart watchdog if we *did* processed any descriptors. [1]
  - Log the watchdog event if the link is *up*. [2]

  PR:		kern/92948 [1]
  Submitted by:	Mihail Balikov <mihail.balikov interbgc.com> [1]
  PR:		kern/92895 [2]
  Submitted by:	Vladimir Ivanov <wawa yandex-team.ru> [2]

Approved by:	re (kensmith)
2006-02-16 12:45:12 +00:00
Gleb Smirnoff 6397ba6acb MFC 1.62:
Refuse to install invalid ARP entries.

  Submitted by:		Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>

Approved by:	re (kensmith)
2006-02-16 12:41:18 +00:00
Guido van Rooij 1f83fb8dca Reassign the correct value to m after calling fr_makefrip().
The problem is that in fr_makefrip(), pullups can happen.
This fixes a panic later on in m_copydata().

Approved by:	re
2006-02-16 11:26:23 +00:00
Yoshihiro Takahashi 390abe3f70 MFC: revision 1.371
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.

Approved by:	re (kensmith)
2006-02-15 13:54:06 +00:00
Hajimu UMEMOTO 5ae72a44aa MFC 1.63: avoided the use of purged address structure when an
address became invalid in nd6_timer().

Approved by:	re (hrs)
2006-02-14 16:29:22 +00:00
Hiroki Sato bde7085b18 Use more specific expression which means the 5.x stable branch.
Approved by:	re (implicitly)
2006-02-14 02:39:23 +00:00
Hiroki Sato 624b350923 MFC: Fix a bug which puts an incorrect checksum of CHECKSUM.MD5
into the CHECKSUM.MD5 file itself.

Approved by:	re (scottl)
2006-02-14 02:00:24 +00:00
Marius Strobl 724fef32b3 MFC: 1.15 (partial)
- Sync the list of supported chips with pcn_probe() as of sys/pci/if_pcn.c
  rev. 1.77 (also applies to RELENG_%), i.e. remove Am53C974/Am79C970/
  Am79C974 PCnet-PCI and Am79C970A PCnet-PCI II.
- Change the entry of the PCnet-Home in the list of supported chips to
  match the other ones, i.e. s,PCnet/Home HomePNA,Am79C978 PCnet-Home,.

Approved by:	re (scottl)
2006-02-12 22:23:04 +00:00
Hajimu UMEMOTO 97871cbadf MFC 1.168: Never select the PCB that has INP_IPV6 flag and is bound
to :: if we have another PCB which is bound to 0.0.0.0.  If a PCB has
the INP_IPV6 flag, then we set its cost higher than IPv4 only PCBs.

Approved by:	re (scottl)
2006-02-11 09:02:59 +00:00
Hajimu UMEMOTO 4baff16f97 MFC 1.56: make IPV6_V6ONLY socket option work for UDP as well.
Approved by:	re (scottl)
2006-02-09 02:33:14 +00:00
Matt Jacob 1bf64e1ce5 MFC 1.21: update man page for boot stuff plus remove some cards described.
Approved by:	re
2006-02-07 22:03:59 +00:00
David Xu 0b3731a703 MFC amd64/amd64/machdep.c revision 1.646, i386/i386/machdep.c
revision 1.622
>
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.
>
> PR: misc/92110

Approved by:	re (scottl)
2006-02-07 03:10:38 +00:00
Bruce A. Mah 4785ea4c97 Fix misspelling: s/Janurary/January/
Approved by:	re (scottl)
2006-02-05 20:45:04 +00:00
Scott Long ab9240753f Add isp_library.c to the build.
Approved by: re
2006-02-05 16:02:16 +00:00
Matt Jacob 4b748b1531 MFC overflow bug fixes and disable ISP_DAC_SUPPORTED for now; plus sync up
with RELENG_6 && -current for all the rest.

Approved by: re
2006-02-04 23:55:03 +00:00
cvs2svn b5858b4a6b This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2006-02-03 20:55:31 +00:00
Andrew Thompson 8c89a3b587 MFC r1.150, do not send two ARP replies if the bridge has an address.
Approved by:    re (scottl)
2006-02-03 12:55:16 +00:00
Andrew Thompson b754c09123 MFC r1.52, fix inconsistencies with the bridge route table.
Approved by:	re (scottl)
2006-02-03 12:53:58 +00:00
Ken Smith 5251aacf17 Note that we've entered code freeze and the 5.5-RELEASE cycle has
begun but we're not ready to branch yet so we call it PRERELEASE
between now and when we're ready to branch.

Approved by:    re (implicit)
2006-02-01 18:09:05 +00:00
Yoshihiro Takahashi ec786036b0 MFC: Remove unsupported hardware. 2006-02-01 11:12:34 +00:00
Matt Jacob 9a517943e0 Megarollup MFC of the current state of the world. 2006-02-01 04:35:08 +00:00
Matt Jacob cafeae18b7 MFC version 1.8 (11 months late). 2006-02-01 04:34:09 +00:00
Brad Davis c96c4951d3 MFC 1.37
- Mention that users need to be in the wheel group to `su - root' by default, and how to change it.

PR:		docs/70616
Submitted by:	Jilles Tjoelker <jilles at stack dot nl>
Reviewed by:	ru@
Approved by:	ceri@
2006-01-31 20:32:36 +00:00
Andrey A. Chernov c17df275e5 MFC: 1.21 (continue on error) 2006-01-31 20:08:49 +00:00
Kirill Ponomarev 00266f94f8 MFC: pkg_add.1:1.70
date: 2006/01/29 20:30:55;  author: krion;  state: Exp;  lines: +1 -1
  Fix typo.
2006-01-31 18:33:59 +00:00
John Hay e609b17ec5 MFC:
Add AfriNIC as a RIR.

PR:		80421
Submitted by:	Adrian Frith <adrian at frith.homelinux.org>
2006-01-31 18:16:04 +00:00
Oleg Bulyzhin a5aab63523 MFC 1.124:
Fix minor bug in uRPF: if net.link.ether.inet.useloopback=1 and we send
broadcast packet using our own source ip address it may be rejected by
uRPF rules.

PR:		kern/76971
2006-01-31 14:48:03 +00:00
Ariff Abdullah c679bff2bd MFC:
Add bounds checking to the setenv part of the kernel environment.

This has no security implications since only root is allowed to use
kenv(1) (and corrupt the kernel memory after adding too much variables
previous to this commit).

This is based upon the PR [1] mentioned below, but extended to check both
bounds (in case of an overflow of the counting variable) and to comply
to the style of the function. An overflow of the counting variable
shouldn't happen after adding the check for the upper bound, but better
safe than sorry (in case some other function in the kernel overwrites
random memory).

An interested soul may want to add a printf to notify root in case the
bounds are hit.

Also allocate KENV_SIZE+1 entries (the array is NULL-terminated), since
the comment for KENV_SIZE says it's the maximum number of environment
strings. [2]

Reorder statements to avoid accessing unknown memory.
In theory, invoking kenv with very long string can panic
kernel.

PR:		83687 [1]
Submitted by:	Harry Coin <[email protected]> [1]
2006-01-30 12:17:29 +00:00
Ariff Abdullah 8c5c7e92bc MFC:
The resource_xxx routines in subr_hints.c are called before and after the
kenv environment in kern_environment.c switches to dynamic kenv. The prior
call sets the static variable hintp to the static hints in subr_hints.c
(hintmode==0).

However, changes to the environment are not detected by the resource_xxx
lookups after the change to dynamic kernel environment, so the lookup
routines only report the old stuff of hintmode==0, even after the change to
the dynamic kenv. This causes kenv users to see a different environment than
the kernel routines.

This is a problem in the mixer.c code that looks up initial mixer volume
settings from the hints: If the hints are dynamic and not from the
device.hints file, mixer.c doesn't see them, but kenv does.

The patch from the PR (modified to comply to the style of the function)
solves this.

PR:		83686
Submitted by:	Harry Coin <[email protected]>
2006-01-30 12:15:58 +00:00
Colin Percival bd6db32ac6 MFC rev 1.14:
Replace "fetch" with "fetch -r" when downloading the initial ~38MB
  snapshot in order to avoid unnecessary re-downloading.

  Remove the earlier "rm -f ${SNAPSHOTHASH}.tgz" to make this work.
2006-01-30 04:19:09 +00:00
Andrew Thompson fa5b8d2cc8 InstaMFC:
Back out of r1.148, it causes two arp replies to be sent with different mac
 addresses.
2006-01-29 23:22:42 +00:00
Scott Long 4dd75e8008 MFC Rev 1.31: Don't use Giant for fast taskqueues. 2006-01-29 21:51:33 +00:00
Ed Maste 3994da054c Merge IP multicast address list locking from HEAD to RELENG_5.
if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255
if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32
if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40
if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11
pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20
if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58
if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182
if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70
if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85
if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193:

  Modify device drivers supporting multicast addresses to lock if_addr_mtx
  over iteration of their multicast address lists when synchronizing the
  hardware address filter with the network stack-maintained list.

Note that with these changes, these drivers now depend on locking the global
if_addr_mtx, so binary modules of these drivers will not work on 5.4 or
earlier releases.

Approved by:    rwatson (mentor)
2006-01-29 15:39:09 +00:00
Tai-hwa Liang 4dbff24063 MFC: (1.4, 1.5) Allow the gif module to be built without IPv6 support when
NOINET6 is defined.
2006-01-29 07:46:26 +00:00
Florent Thoumie 6bd8c5693e MFC:
Add Product IDs :
  - Sandisk Cruzer Micro 128MB [5]
  - DANE-ELEC zMate 512MB USB flash drive [7]
  - Attache 256MB USB 2.0 Flash Drive [8]
  - Sandisk Cruzer Micro 256MB [9]

  Add scsi_da.c quirks :
  - Samsung USB key 128Mb [1]
  - Kingston DataTraveler 2.0 [2]
  - Creative MuVo Slim [3]
  - United MP 5512 Portable MP3 Player [4]
  - Sandisk Cruzer Micro 128MB [5], [9]
  - PNY USB Flash keys [6], [7], [8]

  Add umass.c quirks :
  - Sandisk Cruzer Micro 128MB [5]
  - DANE-ELEC zMate 512MB USB flash drive [7]
  - Attache 256MB USB 2.0 Flash Drive [8]
  - Sandisk Cruzer Micro 256MB [9]

      src/sys/dev/usb/usbdevs: rev 1.249 -> 1.250
      src/sys/cam/scsi/scsi_da.c: rev 1.184 -> 1.185
      src/sys/dev/usb/umass.c: rev 1.128 -> 1.130

PR:		usb/90081 [1],
		usb/89196 [2],
		kern/86131 [3],
		usb/80487 [4],
		usb/75970 [5],
		usb/75578 [6],
		usb/72344 [7],
		usb/65436 [8],
		usb/70835 [9]
Submitted by:	Henri-Pierre CHARLES <[email protected]> [1],
		Andrey Simonenko <[email protected]> [2],
		Erich Rickheit KSC <[email protected]> [3],
		[email protected] [4],
		Bram Abbekerk <[email protected]> [5],
		Thomas Pornin <[email protected]> [6],
		parv <[email protected]> [7],
		Peter D. Quilty <[email protected]> [8],
		Raymundo M. Vega <[email protected]> [9]
2006-01-29 00:46:57 +00:00
Ian Dowse a41a63b4cc MFC: add a workaround for dropped interrupts on VIA EHCI controllers.
Tested by:	Juergen Lock
2006-01-29 00:02:54 +00:00
Bjoern A. Zeeb 4929255285 MFC:
rev. 1.39 sys/net/if_gre.c
  rev. 1.21 sys/netinet/ip_gre.c      rev. 1.4  sys/netinet/ip_gre.h
  rev. 1.12 sys/netipsec/keysock.c    rev. 1.3  sys/netipsec/keysock.h
  rev. 1.32 sys/netkey/keysock.c      rev. 1.9  sys/netkey/keysock.h

  Fix stack corruptions on amd64.

  Vararg functions have a different calling convention than regular
  functions on amd64. Casting a varag function to a regular one to
  match the function pointer declaration will hide the varargs from
  the caller and we will end up with an incorrectly setup stack.

  Entirely remove the varargs from these functions and change the
  functions to match the declaration of the function pointers.
  Remove the now unnecessary casts.

  Lots of explanations and help from:     peter
  PR:                                     amd64/89261
2006-01-28 14:37:35 +00:00
Yoshihiro Takahashi 7a115c432a MFi386: revision 1.10.4.1 2006-01-28 07:38:15 +00:00
Don Lewis 59c34b7d68 MFC kern_sysctl.c 1.168
Touch all the pages wired by sysctl_wire_old_buffer() to avoid PTE
  modified bit emulation traps on Alpha while holding locks in the
  sysctl handler.
2006-01-28 00:43:53 +00:00
Colin Percival 1b97b22898 Correctly identify the host and port values on a failed
getaddrinfo lookup.

Reported by:	hrs
MFC after:	3 days
2006-01-27 14:37:10 +00:00
Oleg Bulyzhin 12fc60d0cd MFC 1.211:
1) remove useless check of loop_copy
2) convert loop_copy to "non-negative" flag
2006-01-26 23:18:11 +00:00
Matt Jacob 6f6503673e (MFC 1.106)
Incorporate the O_NONBLOCK open semantics of Linux and Solaris.
(MFC 1.103, 1.104 as well)
2006-01-26 05:02:05 +00:00
Don Lewis 939f2a63b2 MFC rmdir.2 1.14 and 1.15, and undelete.2 1.16 and 1.17
rmdir() fails with EINVAL if the last component of the path is "..".
 Document the previously undocumented behaviour of rmdir(".") returning
 EINVAL as required by POSIX and SUSv3.  Bump the man page change date.

 undelete() fails with EINVAL if the last component of the path is "..".
 Bump the man page change date.
2006-01-26 02:36:26 +00:00
Don Lewis 971227756c MFC subr_witness.c 1.198 and 1.200.
Original commit messages:

  Log:
  Track all lock relationships instead of pruning direct relationships
  if an indirect relationship exists (keep both A->B->C and A->C).
  This allows witness_checkorder() to use isitmychild() instead of
  the much more expensive isitmydescendant() to check for valid lock
  ordering.

  Don't do an expensive tree walk to update the w_level values when
  the tree is updated.  Only update the w_level values when using the
  debugger to display the tree.

  Nuke the experimental "witness_watch > 1" mode that only compared
  w_level for the two locks.  This information is no longer maintained
  at run time, and the use of isitmychild() in witness_checkorder
  should bring performance close enough to the acceptable level that
  this hack is not needed.

  Report witness data structure allocation statistics under the
  debug.witness sysctl.

  Reviewed by:    jhb
  MFC after:      30 days

  Log:
  Relocate witness_levelall(), witness_leveldescendents(), and
  witness_displaydescendants() so that they are protected by
  "#ifdef DDB/#endif" to unbreak kernels not using "option DDB".

  MFC after:      3 weeks
2006-01-26 02:33:36 +00:00
Don Lewis 61f5dca3f5 MFC vfs_lookup.c 1.84 and 1.85, and vfs_syscalls.c 1.400
Return EINVAL from lookup() if cn_nameiop is DELETE or RENAME and
 the last component of the path name is "..".  This keeps VOP_LOOKUP()
 from locking vnodes in reverse order.

 In kern_unlink(), remap EINVAL errors returned from namei() to EPERM
 to match existing (and POSIX required) behaviour.
2006-01-26 02:29:53 +00:00
Doug Barton 5c7e017924 MFC version 1.6 of the Makefile, crank WARNS up to 6
MFC version 1.2 of rcorder.c, fix for "chunk is already free" error
2006-01-26 01:34:00 +00:00
Simon L. B. Nielsen 147bc07f34 MFC rev 1.31:
Use the .Fx macro.
2006-01-25 20:56:17 +00:00
Ed Maste 9e55ba60dd MFC loader.8:1.83 loader.conf:1.99 loader.conf.5:1.24 comconsole.c:1.11
from HEAD to RELENG_5:

  Add a "comconsole_speed" loader variable that can be used to change
  the serial console speed (i386 and amd64 only). If the previous
  stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
  then the default speed is determined from the current serial port
  speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
  at compile time.

Approved by:	rwatson (mentor)
2006-01-25 19:01:26 +00:00
Simon L. B. Nielsen 3180b018f7 Add FreeBSD-SA-06:07. 2006-01-25 10:39:02 +00:00
Colin Percival 54c56f90a5 Make sure buffers in if_bridge are fully initialized before copying
them to userland. [1]

MFC rev. 1.16 of sys/contrib/pf/net/pf_norm.c: Correct an error in pf
handling of IP packet fragments which could result in a kernel panic. [2]

Security:	FreeBSD-SA-06:06.kmem [1]
Security:	FreeBSD-SA-06:07.pf [2]
2006-01-25 10:01:47 +00:00
Ceri Davies 4526e21672 MFC revision 1.280:
It's perfectly valid to run rpc_statd and rpc_lockd as an NFS
	client, so update the documentation to reflect that.
2006-01-24 18:41:30 +00:00
Ceri Davies 7625bbb722 MFC revisions 1.36 and 1.37:
r1.36:
	  Correct obsolete chown syntax.

	r1.37:
	  If sysinstall was used to configure an anonymous FTP area, it
	was possible for information to be copied from the group file to
	the group file in the FTP area.  This patch based on a patch
	from Zak Johnson <zakj at nox dot cx>.
2006-01-24 18:35:28 +00:00
Brooks Davis 8cb964f765 MFC etc/rc.initdiskless rev 1.49: Don't create memory backed file
systems with soft-updates enabled.

PR:		conf/85558
Submitted by:	Ralf Wenk <RZ dash FreeBSD0605 at hs dash karlsruhe dot de>
2006-01-24 05:54:18 +00:00
Mohan Srinivasan 8b3b28fe76 Avoid an infinite loop in sack scoreboard processing when the per-hole
limits or global scoreboard limits are reached, or when memory
exhaustion occurs. This can occur when an existing hole fails to be
split due to limits or memory exhaustion.

Found by:     Scott Wood <[email protected]>
Submitted by: Raja Mukerji <[email protected]>
Reviewed by:  Mohan, Noritoshi, and Scott
2006-01-24 01:16:18 +00:00
Marius Strobl 6911a45725 MFC: sys/sparc64/pci/psycho.c 1.54 - 1.57,
sys/sparc64/pci/psychoreg.h 1.10 - 1.11,
     sys/sparc64/pci/psychovar.h 1.13 - 1.14

Sync psycho(4) with HEAD expect for the UPA_RANGE_* -> OFW_PCI_RANGE_*
and PCI_CS_* -> OFW_PCI_CS_* changes in order to mainly obtain the
following changes:
- Add a workaround for the incorrect interrupt map entry for the EBus
  bridge on E250 machines. [1]
- Register an interrupt handler for the spare hardware interrupt which
  according to OpenSolaris is used as the over-temperature interrupt in
  systems with Psycho bridges.

PR:		88279 [1]
2006-01-23 16:50:41 +00:00
Marius Strobl 5c107dc100 Remove files which are unused in this branch. 2006-01-23 16:39:19 +00:00
Ceri Davies 4e0f1cc1b4 MFC revision 1.4:
Add nofification events to the list of event types.
2006-01-23 14:15:44 +00:00
Diomidis Spinellis 8b298d6215 MFC: Return EINVAL if the tv_usec part of the utimes(2) arguments
contains incorrect fractional second values (outside the range
0-999999).
Prior to this change users could create files with values outside
that range.  Moreover, on 32-bit machines tv_usec offsets larger than
4.3s would result in an unnormalized AND wrong timestamp value,
due to overflow.
2006-01-22 13:52:10 +00:00
Diomidis Spinellis fef13b1b78 MFC change 2005-09-19 10:11:47 UTC
Setting .nofinger will not hide you from root.
2006-01-22 11:56:15 +00:00
Diomidis Spinellis ef3d84be18 MFC 1.47: Document the TMPDIR environment variable. 2006-01-22 11:41:18 +00:00
Marcus Alves Grando 200f76586f MFC: share/man/man4/umass.4 1.42
Add Time DPA20B MP3 Player (1Gb) [1]
Add Qware BeatZkey! Pro [2]
Add Merlin SM300 MP3/WMA Player (256Mb)

PR:		usb/81846 [1], usb/79164 [2]
Approved by:	njl (implict)
2006-01-21 20:39:21 +00:00
Wes Peters 58cafc7323 MFC r1.13: Tell nextboot to clean up after itself.
PR:		88831
2006-01-21 17:29:27 +00:00
Colin Percival bb2b795572 MFC rev. 1.3:
Add a warning pointing out that incomplete ports trees are not
  supported and that users of REFUSE directives should update their
  entire ports tree before asking for help on the mailing lists.
2006-01-21 09:59:07 +00:00
Colin Percival 60d3a7df96 MFC rev 1.5:
Mention that the random time slept by "portsnap cron" is between 1 and
  3600 seconds.
2006-01-21 09:56:28 +00:00
Marcus Alves Grando c67e05c189 MFC: src/sys/cam/scsi/scsi_da.c 1.184
Allow to use Time DPA20B 1GB MP3 Player [1]
Allow to use Qware BeatZkey! Pro [2]

PR:		usb/81846 [1], usb/79164 [2]
Submitted by:	Ruben de Groot <[email protected]> [1], Radek Kozlowski <[email protected]> [2]
Approved by:	njl (implict)
2006-01-20 19:23:47 +00:00
Pyun YongHyeon 81a68fe6ef MFC if_hme.c:1.46 to RELENG_5:
fix Rx checksum computation on little endian systems.
2006-01-20 06:29:24 +00:00
Christian Brueffer 3f3235c6a4 MFC: rev. 1.26 + 1.27
Mention the fire screensaver.
2006-01-19 22:14:20 +00:00
Andrew Thompson 7728683cb7 MFC: sync code to HEAD (excluding etherip support)
- whitespace
 - add net.link.bridge.pfil_onlyip
 - use time_uptime
 - clear IFCAP_TXCSUM while bridging
2006-01-19 04:22:25 +00:00
Andrew Thompson b043d2346a MFC r1.148:
Include the bridge interface itself in the special arp handling.
2006-01-19 01:07:10 +00:00
Ed Maste ba3e4e8781 Merge IP multicast address list locking from HEAD to RELENG_5, with a
few changes to preserve ABI compatibility.

subr_witness.c:1.196:
  Add in_multi_mtx, igmp_mtx, and if_addr_mtx lock order to hard-coded
  lock order in WITNESS, in that order.

in_var.h:1.54 in6_var.h:1.23 mld6.c:1.22:
  Modify network protocol consumers of the ifnet multicast address lists
  to lock if_addr_mtx.

igmp.c:1.49 in.c:1.86: in_var.h:1.55 ip_input.c:1.303 ip_output.c:1.243:
  Introduce in_multi_mtx, which will protect IPv4-layer multicast address
  lists, as well as accessor macros.  For now, this is a recursive mutex
  due code sequences where IPv4 multicast calls into IGMP calls into
  ip_output(), which then tests for a multicast forwarding case.

  For support macros in in_var.h to check multicast address lists, assert
  that in_multi_mtx is held.

  Acquire in_multi_mtx around iteration over the IPv4 multicast address
  lists, such as in ip_input() and ip_output().

  Acquire in_multi_mtx when manipulating the IPv4 layer multicast
  addresses, as well as over the manipulation of ifnet multicast address
  lists in order to keep the two layers in sync.

  Lock down accesses to IPv4 multicast addresses in IGMP, or assert the
  lock when performing IGMP join/leave events.

  Eliminate spl's associated with IPv4 multicast addresses, portions of
  IGMP that weren't previously expunged by IGMP locking.

in.c:1.89 in.c:1.90:
  Acquire Giant conditionally in in_addmulti() and in_delmulti() based on
  whether the interface being accessed is IFF_NEEDSGIANT or not.  This
  avoids lock order reversals when calling into the interface ioctl
  handler, which could potentially lead to deadlock.

  The long term solution is to eliminate non-MPSAFE network drivers.

  Discussed with: jhb

  Unlock Giant symmetrically with respect to lock acquire order as that's
  generally nicer.

  Spotted by:     johan

ip_output.c:1.244:
  Add helper function ip_findmoptions(), which accepts an inpcb, and attempts
  to atomically return either an existing set of IP multicast options for the
  PCB, or a newlly allocated set with default values.  The inpcb is returned
  locked.  This function may sleep.

  Call ip_moptions() to acquire a reference to a PCB's socket options, and
  perform the update of the options while holding the PCB lock.  Release the
  lock before returning.

  Remove garbage collection of multicast options when values return to the
  default, as this complicates locking substantially.  Most applications
  allocate a socket either to be multicast, or not, and don't tend to keep
  around sockets that have previously been used for multicast, then used for
  unicast.

  This closes a number of race conditions involving multiple threads or
  processes modifying the IP multicast state of a socket simultaenously.

Approved by:	rwatson (mentor)
2006-01-18 23:36:49 +00:00
Marcus Alves Grando 88043dd5ae MFC6: Merge quirks differences between RELENG_6 and RELENG_5.
Approved by:	njl
2006-01-17 23:38:46 +00:00
Simon L. B. Nielsen 70ceb6727f - Add FreeBSD-SA-06:0[123].
- Bump copyright year.
2006-01-17 13:01:46 +00:00
Doug Barton 6a7d6355f7 MFC mechanism to include files added by ports which contain
names of directories to include in the base ldconfig script.

Bump __FreeBSD_version to recognize this change
2006-01-17 07:33:33 +00:00
Florent Thoumie e28aef0adc MFC:
Enable NO_GETMAXLUN quirk.

      src/sys/dev/usb/umass.c: rev 1.127 -> 1.128

PR:		usb/81073
Submitted by:	James E. Flemer <[email protected]>
2006-01-16 22:34:20 +00:00
Florent Thoumie 039e1f239e MFC:
Add -K option to pkg_add and pkg_info.
  This option saves packages to PKGDIR (if defined or current directory by default)
  as they are downloaded.
  Silent a warning when -n is used and package has a +DISPLAY file.

      src/usr.sbin/pkg_install/info/perform.c: rev 1.53 -> 1.54
      src/usr.sbin/pkg_install/add/main.c: rev 1.65 -> 1.66
      src/usr.sbin/pkg_install/lib/lib.h: rev 1.56 -> 1.57
      src/usr.sbin/pkg_install/info/pkg_info.1: rev 1.55 -> 1.56
      src/usr.sbin/pkg_install/add/add.h: rev 1.12 -> 1.13
      src/usr.sbin/pkg_install/add/pkg_add.1: rev 1.68 -> 1.69
      src/usr.sbin/pkg_install/add/perform.c: rev 1.78 -> 1.79
      src/usr.sbin/pkg_install/info/info.h: rev 1.28 -> 1.29
      src/usr.sbin/pkg_install/lib/url.c: rev 1.4 -> 1.5
      src/usr.sbin/pkg_install/info/main.c: rev 1.48 -> 1.49
2006-01-16 19:51:41 +00:00
Xin LI 5bc03587f2 MFC revision 1.185
date: 2005/12/16 18:32:39;  author: delphij;  state: Exp;  lines: +2 -0
In pipe_write(): when uiomove() fails, do not spin on it forever.

Submitted by:   Kostik Belousov <kostikbel at gmail.com> on -current@
Message-ID:     <[email protected]>
Security:	Local DoS
2006-01-14 19:57:48 +00:00
Ed Maste 9f9883b4b3 MFC r1.121: Don't send an ICMP response for IP fragments.
Approved by:	rwatson (mentor)
2006-01-14 15:18:02 +00:00
Pav Lucistnik 43c92d953b MFC 1.34: mention the size of the additional header 2006-01-14 12:13:04 +00:00
Doug Barton 90da14c8bd MFC import of BIND 9.3.2 2006-01-14 10:42:13 +00:00
Doug Barton 1e9828eb87 Complete the MFC process for removing thread support 2006-01-14 10:37:51 +00:00
Joel Dahl 188440fdef MFC r1.1343: Fix minor sorting issue. 2006-01-14 10:00:13 +00:00
Ralf S. Engelschall e92d8ee5c8 MFC r1.276:
Fix semantics in the documentation of the "jail_socket_unixiproute_only"
variable ("YES" vs. "NO") and be more precise and intuitive on what is
actually allowed/restricted by this variable ("UNIX/IP/route sockets"
vs. "TCP/IP protocols").
2006-01-14 08:35:27 +00:00
Ralf S. Engelschall 1fd6da83ea MFC r1.16:
Remove superfluous line continuation backslash.
2006-01-14 08:33:33 +00:00
Ralf S. Engelschall f267af8379 MFC r1.13:
1. Add missing semicolon between "warn" and "return" to make sure
   the line continuation backslash doesn't cause "warn" to print
   "return".
2. Group "warn" and "return" together as the "return 1" should be
   performed only if the "kldload nfsclient" also failed (and not
   already if the "vfs.nfs" sysctl(8) check failed).
2006-01-14 08:31:02 +00:00
Doug Barton dfa112d9ed These files are only relevant in HEAD, where the imports are done. 2006-01-14 06:13:17 +00:00
Pav Lucistnik 1256c6f4fb MFC 1.16: fix: documentation for -m option was inserted halfway thru the text
of -l option.
2006-01-13 20:02:56 +00:00
Joel Dahl cbc532da2b MFC: Remove references to snd_vortex1(4). 2006-01-13 14:56:51 +00:00
cvs2svn a7f4d3a87f This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2006-01-13 06:51:44 +00:00
Colin Percival 1c9ec3804f MFC:
Make "portsnap extract" automatically create ${PORTSDIR} if necessary
  instead of complaining that "Directory does not exist or is not
  writable".
2006-01-13 00:53:53 +00:00
Wes Peters 9e7160fb93 MFC r1.239, avoid deadlock on mbuf exhaustion. 2006-01-12 18:31:02 +00:00
Florent Thoumie a5f425426e MFC:
Fix -r causing SIGSEGV due to parse_args() being called before font_current is set.

      src/usr.sbin/kbdmap/kbdmap.c: rev 1.4
2006-01-12 01:26:34 +00:00
Ed Maste 488af50c7b Merge rtsock.c:1.127 from HEAD to RELENG_5:
De-spl parts of the routing socket code now generally protected
  through locking; leave some spl references around code where there
  are open questions about global variable references.

The comment about IF_ADDR_LOCK() and SYSCTL_OUT() in 1.127 does not
apply, as that issue was fixed by the MFC of 1.129.

Approved by:    rwatson (mentor)
2006-01-11 21:45:31 +00:00
Ed Maste 6ffdb4b36b MFC rtsock.c:1.129:
Protect interface and address lists using the appropriate mutex. These
  locks were not aquired because the user buffers were not wired, thus it
  was possible that that SYSCTL_OUT could sleep, causing a number of
  different problems such as lock ordering issues and dead locks.

  -Wire user supplied buffer to ensure SYSCTL_OUT will not sleep.
  -Pickup ifnet locks to protect the list.
  -Where applicable pickup address locks.
  -Pickup radix node head locks.
  -Remove splnet stubs
  -Remove various comments about locking here, because they are no
   longer needed.

  It is the hope that these changes will make sysctl_rtsock MP safe.

Approved by:	rwatson (mentor)
2006-01-11 18:12:35 +00:00
Brooks Davis e88e8bef9f MFC rev 1.38: attempt to mount /usr if we need to populate /var and we
can't find mtree.

PR:		conf/71757
2006-01-11 16:39:09 +00:00
Xin LI 04d05bf82b MFC revision 1.131
date: 2005/12/13 15:32:52;  author: delphij;  state: Exp;  lines: +5 -5
In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference.  Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.

Submitted by:   Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
Reminded by:	glebius
2006-01-11 15:40:00 +00:00
Gleb Smirnoff 4efd98abc9 MFC 1.76, 1.77:
The receive function em_process_receive_interrupts() unlocks the
  adapter while ether_input() processes the packet, and then locks
  it back. In the meantime, em_init() may be called, either from
  em_watchdog() from softclock interrupt or from the ifconfig(8)
  program. The em_init() resets the card, in particular it sets
  adapter->next_rx_desc_to_check to 0 and resets hardware RX Head
  and Tail descriptor pointers. The loop in
  em_process_receive_interrupts() does not expect these things to
  change, and a mess may result.

  PR:             kern/87418
  Submitted by:   Dmitrij Tejblum <tejblum yandex-team.ru>
2006-01-11 10:31:54 +00:00
Colin Percival d3344df0ec Correct insecure temporary file usage in texindex. [06:01]
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]

Security:	FreeBSD-SA-06:01.texindex
Security:	FreeBSD-SA-06:02.ee
Security:	FreeBSD-SA-06:03.cpio
2006-01-11 08:06:47 +00:00
Brooks Davis a5f8a4205d MFC rev 1.6:
When removing the local domain, only do so when the result
	will be a host name.  This is matches the documented behaviro.
	The previous behavior would remove the domain name even if
	the result retained a dot.

	This fixes rsh connections from a.example.com to example.com.

This is also reported to fix rsh connections from host xxx to
yyy.example.com.

PR:             88301
2006-01-11 06:41:30 +00:00
Brooks Davis 914f664b04 MFC revs 1.46 and 1.47 (from src/etc/rc.initdiskless).
Switch from pax to tar for extracting cpio archives.  pax requires a
writable /tmp (or TMPDIR) and thus is unsuitable for this job.

The pax command used was also invalid.

PR:		conf/88293
2006-01-11 06:22:21 +00:00
Brooks Davis 3e18b4a313 MFC:
Allow chkprintcap(8) to be run before lpd is started.  Disabled by
default. Default flags create missing directories.

Remove comment about doing this in etc/rc.d/var.

PR:		conf/71488
2006-01-11 06:06:54 +00:00
Brooks Davis 3ee3e8bf64 MFC revs 1.27 and 1.28.
1.27: don't crash when given an invalid nwkey string
 1.28: parse SSIDs correctly and bail immediatly when invalid

PR:		misc/88159, bin/74509
2006-01-11 05:56:02 +00:00
Florent Thoumie 2453414518 MFC:
- Add an entry for Acer Acerscan 1240U.

      src/share/man/man4/uscanner.4: rev 1.21
2006-01-11 00:37:32 +00:00
Florent Thoumie 43838dfdc3 MFC:
Add Product ID for Acerscan 1240u and the corresponding entry in uscanner.c.

      src/sys/dev/usb/usbdevs: rev 1.247
      src/sys/dev/usb/uscanner.c: rev 1.67
2006-01-11 00:29:16 +00:00
Kirill Ponomarev 1ad49bd592 MFC: add/extract.c:1.44 create/perform.c:1.82 create/pkg_create.1:1.70 create/pl.c:1.28
info/show.c:1.40 lib/plist.c:1.51

  date: 2006/01/07 22:10:57;  author: krion;  state: Exp;  lines: +10 -3
  When using @cwd %%FOO%%, we must ensure to return in the original
  prefix later, but doing so with @cwd %%OLDPREFIX%% (having
  PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
  list. That's not really a problem when dealing with ports but that's
  a problem with packages since pkg_add -p option only overrides the
  first @cwd occurrence.

  This patch allow us to use @cwd without any argument. If no
  directory argument is given, it will set current working directory
  to the first prefix given by the @cwd command.

  PR:             bin/77212
  Submitted by:   flz
2006-01-10 22:17:08 +00:00
John Baldwin 33b674d244 MF6: Fix a couple of issues with the ibcs2 module event handler. 2006-01-10 21:46:19 +00:00
Gleb Smirnoff e0a695f564 MFC 1.11:
In ng_netflow_disconnect() check whether we are working with "iface"
  or with "out" hook, and clear the right pointer.

  Reported by:    Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>
2006-01-10 10:22:22 +00:00
Gleb Smirnoff 44316718d9 MFC 1.62:
Add \n to log() message.
2006-01-10 10:13:43 +00:00
Yoshihiro Takahashi 14cccfa2ae MFC: revision 1.56
- Add EXTDOCDIR and EXTPORTSDIR.
2006-01-10 03:48:42 +00:00
Yoshihiro Takahashi 9da419e619 MFC: revision 1.894 and 1.895
- Request boot floppy after loading mfsroot floppy.
 - Add EXTPORTSDIR.
2006-01-10 03:47:27 +00:00
Maxim Sobolev 188d6d478e MFC: allow execution of ET_DYN elf binaries (aka shared libraries) when
emulating architectures that allow this (Linux so far).

To preserve kernel modules ABI, unlike the version commited into the trunk,
which adds new flag field into Brandinfo structure for this purpose, this
one checks if brand field of Brandinfo matches ELFOSABI_LINUX.

PR:		kern/87615
Submitted by:	Marcin Koziej <[email protected]>
2006-01-10 02:12:27 +00:00
Stefan Farfeleder 36a9042b4f MFC a small part of the big NetBSD merge that fixes a few bugs and should be
safe for RELENG_5.

el.c:
	Check term_init() and strdup() failure.
history.c and tokenizer.c:
	Check malloc() failure.
makelist and map.c:
	Respect list sentinel.
refresh.c:
	Refresh bug.
2006-01-09 18:02:39 +00:00
Ceri Davies ef87a050c3 MFC revision 1.82:
inetd(8) requires that /etc/netconfig be present, and contain entries
  for each of udp and tcp (and their IPv6 equivalents when INET6 is
  enabled).  Note that dependency here.

  PR:             docs/90435
  Submitted by:   Dmitry Kazarov <kazarov at mcm dot ru>
  Pointed out by: Daniel Gerzo <danger at rulez dot sk>
2006-01-07 13:57:58 +00:00
Don Lewis 89f72137d0 MFC kern_proc.c 1.232, adapted to RELENG_5.
Original commit message:
truckman    2005-10-02 23:27:56 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_proc.c
  Log:
  Always wire the sysctl output buffer in sysctl_kern_proc() before
  calling sysctl_out_proc().  -- fix from jhb

  Move the code in fill_kinfo_thread() that gathers data from struct proc
  into the new function fill_kinfo_proc_only().

  Change all callers of fill_kinfo_thread() to call both
  fill_kinfo_proc_only() and fill_kinfo() thread.  When gathering
  data from a multi-threaded process, fill_kinfo_proc_only() only needs
  to be called once.

  Grab sched_lock before accessing the process thread list or calling
  fill_kinfo_thread().

  PR:             kern/84684
  MFC after:      3 days

Testing this patch on RELENG_5 did not uncover any regressions,
but no testing was done by anyone who was suffering from the problem
this patch is intended to fix.

Tested by:	"Stian Fjeldstad" <sbf AT pcom DOT no>
PR:		kern/84684
2006-01-05 18:57:32 +00:00
Florent Thoumie 82d60c0c86 Fix latest commit, some vendor ids and product ids were missing.
Approved by:	pjd (implicit)
Pointyhat to:	self
2006-01-05 16:54:18 +00:00
Florent Thoumie f52e613ed9 MFC:
Add a hid blacklist quirk.

      src/sys/dev/usb/usbdevs: rev 1.240
      src/sys/dev/usb/usb_quirks.c: rev 1.45
      src/sys/dev/usb/uhid.c: rev 1.78
      src/sys/dev/usb/usb_quirks.h: rev 1.20

Approved by:	pjd
2006-01-05 16:46:10 +00:00
Roman Kurakin 692f703b76 MFC: -j 1.280 -j 1.281
---------------------------
	revision 1.281
	date: 2005/10/04 16:27:54;  author: rik; state: Exp;  lines: +3 -1
	Use FILEDESC_UNLOCK(fdp) after FILE_ULOCK(p), not before to avoid LOR.
	Slightly discussed on current@.

	LOR #055

	MFC after:	14 days
	----------------------------
2006-01-04 10:35:47 +00:00
Ariff Abdullah 67bb69ad07 MFC: - Fix possible memory leak due to repetetive strdup(3) without matching
free(3).
     - print_recsrc() should honor shortflag and give appropriate output for
       later consumption by /etc/rc.d/mixer. This will ensure that recording
       device selections survived across reboot. Output everything to stdout
       instead of stderr.
2006-01-04 00:37:13 +00:00
Ed Maste 327cc58a8d Merge link layer mutlicast address list locking from HEAD to RELENG_5,
with a few changes to preserve ABI compatibility.

if_var.h:1.100:
  Add if_addr_mtx, a mutex to protect ifnet-related address lists.  Add
  accessor macros.

  Unlike FreeBSD 6 and HEAD, share a global mutex (instead of putting it
  in struct ifnet) to maintain ABI backwards compatibility.

if_var.h:1.101:
  - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
    Staticize.

if.c:1.239:
  Protect link layer network interface multicast address list manipulation
  using (global) if_addr_mtx:

  - Initialize if_addr_mtx in if_init().

  - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
    Staticize.

  - Extract ifmultiaddr allocation and initialization into if_allocmulti();
    accept a 'mflags' argument to indicate whether or not sleeping is
    permitted.  This centralizes error handling and address duplication.

  - Extract ifmultiaddr tear-down and deallocation in if_freemulti().

  - Re-structure if_addmulti() to hold if_addr_mtx around manipulation of
    the ifnet multicast address list and reference count manipulation.
    Make use of non-sleeping allocations.  Annotate the fact that we only
    generate routing socket events for explicit address addition, not
    implicit link layer address addition.

  - Re-structure if_delmulti() to hold if_addr_mtx around manipulation of
    the ifnet multicast address list and reference count manipulation.
    Annotate the lack of a routing socket event for implicit link layer
    address removal.

  - De-spl all and sundry.

Approved by:	rwatson (mentor)
2006-01-03 22:42:58 +00:00
Ed Maste a6861c64df MFC kern_clock.c:1.181
In watchdog_config enable the software watchdog iff the WD_ACTIVE flag
  is set.  When watchdogd(1) is terminated intentionally it clears the
  bit, which should then disable it in the kernel.

PR:             kern/74386
Submitted by:   Alex Hoff <ahoff at sandvine dot com>
Approved by:    rwatson (mentor)
2006-01-03 16:34:55 +00:00
Paul Saab 03751f62f0 MFC:
There's no reason to check the valence.  This allows ciss to work
on the P600.
2005-12-31 06:28:06 +00:00
Paul Saab 099a8b7c7e MFC: rev 1.67
It seems ciss should ignore overrun and underrun on a SCSI INQUIRY
command.  This fixes some weird booting issues on newer versions
of the firmware on the MSA20.
2005-12-31 06:25:16 +00:00
Paul Saab f789407191 MFC: rev 1.66
Update PCI ids to add the E200, E200i, P400, and P400i storage
controllers.  Remove the E400 since it is not a real product.
2005-12-31 06:24:44 +00:00
Paul Saab 4fdf2a116e MFC: rev 1.65
There's no reason to check the valence.  This allows ciss to work
on the P600.
2005-12-31 06:23:58 +00:00
Xin LI 4e69839bea MFC revision 1.10:
Suggest the user to use 'diff -urN' instead of 'diff -crN'.

Submitted by:	Jimmie James  <[email protected]>
PR:		docs/88427
2005-12-31 05:36:42 +00:00
Andrew Thompson e7d961ca7c Add the documentation for if_bridge(4) commands which was missed when the code
was MFCed to RELENG_5
2005-12-29 11:16:23 +00:00
Andrew Thompson bf90dda516 MFC: Add support for creating span ports on a bridge 2005-12-29 10:56:10 +00:00
Gleb Smirnoff 3d2923b840 MFC 1.251:
When we drop packet due to no space in output interface output queue, also
  increase the ifp->if_snd.ifq_drops.

  PR:             72440
  Submitted by:   ikob
2005-12-28 13:37:25 +00:00
Ade Lovett 7b81d6457a MFC: 1.171 2005-12-28 08:42:54 +00:00
Garrett Wollman 1de83dbe2a Merge tzdata2005r from vendor branch. 2005-12-27 19:57:37 +00:00
Pav Lucistnik d1f6e64309 MFC umass.c 1.126,1.127 and usbdevs 1.239:
- Ignore incorrect CSW signatures on my PURE PocketDAB 2000 player
2005-12-27 00:35:38 +00:00
Remko Lodder 24b2007e89 MFC v1.28 by ru:
fix a markup nit.

  PR:             docs/88848
  Prodded by:     remko
2005-12-26 19:02:08 +00:00
Stefan Farfeleder 5cfe166afe MFC important changes:
- Add -v and -V to the command builtin.
- Return value from unalias.
- Fixes for the errexit mode.
- Avoid segfaults on signals.
- Add the times builtin.
- Make 'set +o' output POSIX compliant.
- Correctly quoted output of trap.
- Man page updates.
2005-12-26 18:15:37 +00:00
Wilko Bulte 1ecd557fab We will not be responsible for damage to equipment, your ego, county wide
power outages, spontaneously generated mini (or larger) black holes,
planetary disruptions, or personal injury or worse that may result from the
use of this material.
                -- taken from Samuel M. Goldwasser's
                   Sam's Strobe FAQ Notes on the Troubleshooting
                   and Repair of Electronic Flash Units and Strobe Lights
2005-12-25 23:29:59 +00:00
Diomidis Spinellis 1391fc49d1 MFC 1.19
Use the appropriate error function for displaying the error,
instead of printing it to stdout.
2005-12-25 16:26:40 +00:00
Wilko Bulte 50d5f1031d "A life lived in fear is a life half lived" 2005-12-24 17:55:33 +00:00
George V. Neville-Neil b828a19007 MFC of fixes from Kame that didn't make the 5 STABLE branch. 2005-12-24 10:22:50 +00:00
Andrew Thompson 48032c62c8 MFC r1.41, do not BPF_MTAP the packet twice 2005-12-24 01:13:17 +00:00
George V. Neville-Neil 228da36a66 MFC of coverity fixes against IPv6. 2005-12-23 07:09:39 +00:00
Garrett Wollman cb9d457bd8 Merge tzdata2005q from vendor branch. List of territories affected is
the same as for HEAD.
2005-12-22 23:51:56 +00:00
Ed Maste 94ffa2763f MFC r1.84:
ifma_protospec is a pointer. Use NULL when assigning or comparing it.

Approved by:	scottl
Silence from:	rwatson (mentor)
2005-12-22 16:31:07 +00:00
Ed Maste 5a57d98f7e Merge if_arcsubr.c:1.26, if_ethersubr.c:1.195, if_fddisubr.c:1.99,
if_iso88025subr.c:1.68 from HEAD to RELENG_5:

  When allocating link layer ifnet address list entries in
  ifp->if_resolvemulti(), do so with M_NOWAIT rather than M_WAITOK, so
  that a mutex can be held over the call.  In the FDDI code, add a
  missing M_ZERO.  Consumers are already aware that if_resolvemulti()
  can fail.

Approved by:	scottl
Silcence from:	rwatson (mentor)
2005-12-22 16:23:26 +00:00
Ed Maste 69f4fe434c MFC r1.235, r1.237, r1.238:
(1.235)
  - Introduce a helper function if_setflag() containing the code common
    to ifpromisc() and if_allmulti() instead of duplicating the code poorly,
    with different bugs.
  - Call ifp->if_ioctl() in a consistent way: always use more compatible C
    syntax and check whether ifp->if_ioctl is not NULL prior to the call.

  (1.237)
  Rename equal() macro to sa_equal(), which matches the definitions
  of sa_equal() in other files, and makes it more clear what equal()
  is comparing.

  (1.238)
  In multicast routines:

  Compare pointers with NULL rather than treating them as booleans.

  Compare pointers with NULL rather than 0 to make it more clear
  they are pointers.

  Assign pointers value of NULL rather than 0 to make it more clear
  they are pointers.

Approved by:	scottl
Silence from:	rwatson (mentor)
2005-12-22 05:05:00 +00:00
Ed Maste b781740b26 MFC r1.160:
When using m_dup(9) to copy more than MHLEN bytes of data, don't
  create an mbuf chain that starts with a cluster containing just MHLEN
  bytes.  This happened because m_dup called m_get or m_getcl depending
  on the amount of data to copy, but then always set the size available
  in the first mbuf to MHLEN.

Approved by:	jmg
Silence from:	rwatson (mentor)
2005-12-22 04:29:03 +00:00
Florent Thoumie 6dfe8d5f7d MFC: Add ProductID for the iPod Nano.
usb_quirks.c:	1.44
	usbdevs:	1.237

Approved by:	ssouhlal
2005-12-21 23:11:14 +00:00
Andrew Thompson 0f22217371 MFC r1.37: use m_dup rather than m_copypacket 2005-12-21 22:52:48 +00:00
Doug Barton f28574cb01 MFC 1.52, do not delete stale /etc/rc.d files by default 2005-12-21 09:04:24 +00:00
Gleb Smirnoff 547b5aff83 - In upgrade from 4.x paragraph prefer "5.x" instead of "-current". 5.x
isn't CURRENT anymore.
- In upgrade from 4.x paragraph notice that it is important to
  delete /sbin/mountd, otherwise it will be started instead of
  /usr/bin/mountd.
2005-12-19 14:53:30 +00:00
Ken Smith 85f7fc920d Catch up on several MFCs:
> revision 1.9
> date: 2005/12/07 22:25:12;  author: obrien;  state: Exp;  lines: +0 -1
> Remove the ports version of bsdiff - it is now in the base system.
>
> revision 1.8
> date: 2005/12/07 21:41:59;  author: obrien;  state: Exp;  lines: +0 -1
> Remove the ports version of portsnap - it is now in the base system.
>
> revision 1.7
> date: 2005/11/03 00:23:13;  author: kensmith;  state: Exp;  lines: +1 -6
> It had been noticed disc2 was overflowing earlier but committing the
> fix slipped through a crack.  Remove the apache and php packages under
> the assumption someone installing a Web server has network access and
> doesn't *need* the packages on disc2.
2005-12-17 00:12:20 +00:00
Bill Paul e37ee6bb58 MFC^2: merge recent changes from -current (interrupt handler API cleanup,
Ralink RT2500 deadlock with wpa_supplicant).
2005-12-16 17:34:36 +00:00
Maxime Henrion bad873e4cd MFC r1.252:
date: 2005/12/12 14:30:13;  author: mux;  state: Exp;  lines: +1 -0
  Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.
2005-12-16 03:26:37 +00:00
Wilko Bulte 1429f7359f Spelling fixes and minor nit.
PR: doc/9035
Submitted by: Gavin Atkinson <[email protected]>
2005-12-14 19:50:55 +00:00
Max Laier 4ab81d9671 MFC: 1.91
Fix calculation of meminfo's swaptotal and swapfree on at least amd64.
2005-12-14 19:07:38 +00:00
Florent Thoumie e32b3b7dd3 MFC: USB Quirk for iPods (should work with some other devices).
usb_quirks.c:	1.43
	usb_quirks.h:	1.19
	usb_subr.c:	1.78
	usbdevs:	1.236

While this might not be the best solution, this has been considered good enough
to be MFC'ed.

Approved by:	ssouhlal
Discussed on:	src-committers@
2005-12-14 01:27:45 +00:00
Maksim Yevmenkin 53a79b901f MFC: Teach sdpd(8) to check peer's credentials before accepting request to
register, remove or change services in the local database. For now only
accept the request if the peer has effective user ID the same as 'root'
user ID.
2005-12-13 00:38:28 +00:00
Maksim Yevmenkin f0eae69a15 MFC: Fix typo in rfcomm_pppd(8) man page.
Noticed by:	Ronald Klop
2005-12-13 00:31:03 +00:00
Maksim Yevmenkin 7d1bb137e6 MFC: Teach rfcomm_sppd(8) to recognize "lan" (for LAN Access Using PPP) service
name in '-c' (RFCOMM channel) option.
2005-12-12 18:00:03 +00:00
Ruslan Ermilov a804439577 MFC: Fix memory leak. 2005-12-09 07:13:06 +00:00
Jesus R. Camou 4b79e19377 MFC: fix couple typos.
Approved by:	trhodes (mentor)
2005-12-08 01:55:53 +00:00
Vinod Kashyap 0ae5b42f9b MFC: twa corresponding to the 9.3.0.1 release on the 3ware website. This driver
has support for the 9xxxSX controllers, along with the earlier 9xxxS series
controllers.

MFC after:4 weeks
2005-12-07 18:20:38 +00:00
Andrew Thompson 2401e9060c MFC r1.35, set IFF_BROADCAST on the interface 2005-12-07 03:10:42 +00:00
Wilko Bulte e13e62ce59 s/Adolph Hitler/Adolf Hitler/
s/hitler/Hitler/
2005-12-05 22:35:37 +00:00
John Baldwin 9c5a1a6a02 MF6: Use >= rather than > to check for a process exceeding its time limit. 2005-12-05 20:14:56 +00:00
John Baldwin 84c657e5f7 MF6: Restore the previous state after a FILL operation in
properties_read().
2005-12-05 20:10:57 +00:00
John Baldwin 092a3a62cc MF6:
- Use .fn to markup untimeout.
- Reword a confusing sentence.
2005-12-05 20:07:52 +00:00
John Baldwin d4b66981a5 MF6: Clarify that si(4) doesn't support the newer SX+ cards from
Specialix/Perle currently.
2005-12-05 20:04:02 +00:00
John Baldwin 13b196effb MF6: Add MLINK for execvP(3). 2005-12-05 20:00:49 +00:00
Maksim Yevmenkin d15c177ea6 MFC: Add bluetooth.device.conf(5) man page 2005-12-05 18:59:43 +00:00
Colin Percival b33e3d0ff5 MFC revision 1.5:
Make "missing dependency" errors more useful by indicating which port
  is trying to depend upon the non-existent port.

  Suggested by:   kris
2005-12-05 05:07:44 +00:00
Philip Paeps e1722e0b82 MFC r1.7:
Check for altq presence during module init, and allow module to work even if
  altq is not present (just disable the altq bits in that case).
2005-12-03 14:45:05 +00:00
Philip Paeps 61953a2cd1 MFC r1.85:
Preserve /etc/sysctl.conf when doing a binary update.  This prevents, for
  instance, the dreaded shared memory problem in PostgreSQL coming back to
  haunt you after a binary update.
2005-12-03 14:37:24 +00:00
cvs2svn e9f2333ad1 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-12-02 00:17:34 +00:00
Colin Percival 6c9ea69621 Revert previous commit; it isn't supposed to be on this branch yet. 2005-12-01 22:14:45 +00:00
Colin Percival 929386ca9e Make "missing dependency" errors more useful by indicating which port
is trying to depend upon the non-existent port.

Suggested by:	kris
MFC after:	3 days
2005-12-01 22:14:44 +00:00
Maksim Yevmenkin 517a5bc694 MFC: Teach rfcomm_sppd(1) about service names, so it is possible to specify
service name instead of channel number with -c command option. Supported
service names are: DUN (Dial-Up Networking), FAX (Fax) and SP (Serial Port).
2005-11-30 18:34:13 +00:00
Tom McLaughlin e6e6befa99 MFC: Revision 1.60
Misspelling in Poul-Henning Kamp's email address under AUTHORS

Approved by:    ade
2005-11-30 04:21:59 +00:00
John Baldwin 7b6d211806 MFC: Always print the trap number for fatal traps and add trap messages
for T_XMMFLT and T_RESERVED.
2005-11-28 20:03:15 +00:00
John Baldwin a44290a0f0 MF6: Include the size of the DL_serpath structures in the total size used
in the RTLD_DI_SERINFOSIZE and RTLD_DI_SERINFO requests.
2005-11-28 19:19:52 +00:00
Yoshihiro Takahashi 7853d6499d Added pc98 support. This problem is only in RELENG_5.
Noticed by:	NOKUBI Hirotaka < nokubi at ff dot iij4u dot or dot jp >
2005-11-28 16:01:57 +00:00
Hidetoshi Shimokawa 1878075462 MFC: revision 1.81
Fix panic when we cannot find self-id of probing nodes.
2005-11-28 06:50:04 +00:00
Hiroki Sato 698e3ea493 MFC: Apply arch= selection to the qandatoc mode. This fixes
link generation with no actual target.

Reported by:	Tim Witthoeft (tim.witthoeft at gmail.com)
2005-11-28 06:26:56 +00:00
Doug Barton 4493618ad8 MFC 1.7, which fixes the failed transfer semantics for BIND 9.3.x,
and cleans up the code slightly.
2005-11-27 00:44:58 +00:00
John Polstra 4af3dfd879 MFC: Fix a bug that caused some /dev entries to continue to exist after
the underlying drive had been hot-unplugged from the system.

This merges the following revisions:

  Revision  Path
  1.94      src/sys/cam/scsi/scsi_cd.c
  1.181     src/sys/cam/scsi/scsi_da.c
  1.98      src/sys/geom/geom_disk.c
  1.5       src/sys/geom/geom_disk.h
  1.88      src/sys/geom/geom_subr.c
2005-11-26 23:20:00 +00:00
Kirill Ponomarev 7ca96b01ac MFC: pkg_info.1:1.55
date: 2005/11/23 10:31:59;  author: krion;  state: Exp;  lines: +4 -1
  Document PKG_PATH enviroment variable.

  Prodded by:     Mark Andrews <Mark_Andrews AT isc DOT org>
2005-11-26 20:58:43 +00:00
John Polstra e842c495ae MFC 1.151: Fix a bug in the loop in sonewconn that makes room on the
incomplete connection queue for a new connection.  It was removing
connections from the wrong list.
2005-11-26 19:32:30 +00:00
Gleb Smirnoff cca289ecc9 MFC 1.38: MFOpenBSD 1.62:
Prevent backup CARP hosts from replying to arp requests, fixes strangeness
    with some layer-3 switches. From Bill Marquette.

  Tested by:      Kazuaki Oda <kaakun highway.ne.jp>
2005-11-25 14:54:59 +00:00
Gleb Smirnoff a6f04c5111 MFC 1.23, 1.24
BCM5752 support
2005-11-25 14:47:32 +00:00
Gleb Smirnoff 283e9b0d88 MFC:
Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.

  PR:             kern/88940
  Submitted by:   Alexander Hausner
2005-11-25 14:44:06 +00:00
Colin Percival 2e0b323538 Synchronize with version of portsnap in HEAD:
1. make_index no longer coredumps if input has zero lines.
2. phttpget no longer enters an infinite loop if the TCP connection is
closed while phttpget is reading HTTP headers.
2005-11-25 12:56:51 +00:00
Maksim Yevmenkin 95e4f7ca28 MFC: Start Bluetooth integration into rc.d system.
Introduce /etc/rc.d/bluetooth script to start/stop Bluetooth devices. It
will be called from devd(8) in response to device arrival/departure events.
It is also possible to call it by hand to start/stop particular device
without unplugging it.

Introduce generic way to set configuration parameters for Bluetooth devices.
By default /etc/rc.d/bluetooth script has hardwired defaults compatible
with old rc.bluetooth from /usr/share/netgraph/bluetooth/examples. These
can be overridden using /etc/defaults/bluetooth.device.conf file (system
wide defaults). Finally, there could be another device specific override
file located in /etc/bluetooth/$device.conf (where $device is ubt0, btccc0
etc.)

The list of configuration parameters and their meaning described in the
/etc/defaults/bluetooth.device.conf file. Even though Bluetooth device
configuration files are not shell scripts, they must follow basic sh(1) syntax.

Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults into
/etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices
are attached to the system. Both daemons depend on Bluetooth socket layer.

Fix Bluetooth assigned numbers URL in /etc/bluetooth/protocols file.
2005-11-23 22:51:01 +00:00
Wilko Bulte 3987a45308 MFC: add witty remark about serious thought. 2005-11-23 19:16:08 +00:00
Jesus R. Camou 535adb7ea0 MFC:
Rev. 1.37.2.1.

Approved by:	trhodes (mentor)
2005-11-23 07:17:09 +00:00
cvs2svn 762c9ecd33 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-11-22 19:17:42 +00:00
Robert Watson 7e4b442eaf Merge kdump.1:1.14 and kdump.c:1.28 from HEAD to RELENG_5:
Add "-s" argument to kdump to suppress the display of I/O data.
2005-11-19 12:15:10 +00:00
Hajimu UMEMOTO d48e12f90e MFC 1.55: The KAME's getipnodebyaddr() code honor the
MULTI_PTRS_ARE_ALIASES define also, but res_config.h was not
included into libc/net/name6.c.  So getipnodebyaddr() ignored
the multiple PTRs.
2005-11-18 02:32:32 +00:00
Kirill Ponomarev a4ea7ddb00 MFC: add.h:1.12, main.c:1.65, perform.c:1.78, pkg_add.1:1.67
date: 2005/11/12 11:45:01;  author: krion;  state: Exp;  lines: +9 -2
  Add -P flag, it does the same as the -p option, except that the
  given prefix is also used recursively for the dependency packages,
  if any.  If the -P flag appears after any -p flag on the
  command line, it overrides it's effect, causing pkg_add to use the
  given prefix recursively.

  PR:             bin/75742
  Submitted by:   Frerich Raabe <raabe AT kde DOT org>
2005-11-17 18:08:58 +00:00
Andrew Thompson dbb7ad1120 MFC: Sync bridge code up with HEAD
- plug mbuf and refcnt leak
 - make funtions static
 - cleanup on member removal
 - cleanup bridge hooks
2005-11-16 10:20:16 +00:00
Robert Watson 00b9495b9f Merge kern_descrip.c:1.284 from HEAD to RELENG_5:
In closef(), remove the assumption that there is a thread associated
  with the file descriptor.  When a file descriptor is closed as a result
  of garbage collecting a UNIX domain socket, the file descriptor will
  not have any associated thread, so the logic to identify advisory locks
  held by that thread is not appropriate.  Check the thread for NULL to
  avoid this scenario.  Expand an existing comment to say a bit more about
  this.
2005-11-16 08:15:58 +00:00
Andrew Thompson 366a61df03 MFC r1.59, List IFT_BRIDGE as a valid type. 2005-11-14 22:25:33 +00:00
Robert Watson 3b5aad04e5 Merge if_em.c:1.82 from HEAD to RELENG_5:
Put probe-time printf of adapter speed and duplex behind bootverbose:
  since the link takes a bit to negotiate, the information is pretty
  much never available during the probe.  As such, the boot output
  pretty much always prints N/A for speed and duplex.  Since we print
  out the output of ifconfig during the user space boot, this early
  boot information is also generally redundant, and added to the noise.
2005-11-14 10:40:57 +00:00
Tom Rhodes ed60c4c5ca MFC:
revision 1.4
date: 2005/11/01 21:16:39;  author: trhodes;  state: Exp;  lines: +0 -6
Quick kill links to the nsmb(8) manual page, there is no such
utility that I can find.
2005-11-13 14:59:05 +00:00
Colin Percival 0883b6a282 Bump __FreeBSD_version so that the ports tree can respond to the addition
of bsdiff and portsnap to the RELENG_5 base system.
2005-11-13 07:17:31 +00:00
Colin Percival ada974ca74 MFC portsnap to RELENG_5. 2005-11-13 07:13:45 +00:00
Colin Percival 4be8a41316 MFC: connect bsdiff to the build. 2005-11-13 07:01:03 +00:00
Colin Percival 52bf56b866 MFC bsdiff/bspatch to RELENG_5. This should be identical to the version
in HEAD and RELENG_6.
2005-11-13 06:58:36 +00:00
Kirill Ponomarev 2714cf5ceb MFC: create.h:1.26, main.c:1.37, perform.c:1.81, pkg_create.1:1.69
date: 2005/11/08 20:48:26;  author: krion;  state: Exp;  lines: +1 -0
  Introduce 3 new options for pkg_create(1), -x for using basic regular
  expressions for pkg-name, -E for extended regexps and -G for exact matching.
  These new options are only meaningful when using the -b flag of pkg_create(1),
  and that the default for the -b parameter is now to do glob matching, as in
  other pkg_foo utilities that support package patterns.

  Submitted by:   mux
2005-11-11 08:08:04 +00:00
Bill Paul f14716c850 MFC^2: add RtlZeroMemory() and RtlCopyMemory() for Broadcom amd64 driver. 2005-11-10 02:26:50 +00:00
John Baldwin 2130140090 MFC: Get rid of #ifdef for legacy system. Move that into the MD code.
Export minimal symbols to allow this to happen.

This should make the viapm build happy.

Pointy hat to:	jhb
2005-11-09 15:07:44 +00:00
Pav Lucistnik 92777e87d7 Add new ports-net-im collection. 2005-11-09 10:16:26 +00:00
John Baldwin 7ee19618ac MFC: Fix standalone module build. 2005-11-08 17:04:19 +00:00
Max Laier e2adc577bf MFC: rev. 1.79
Fix obvious copy'n'paste-O in rev.1.36  While here nit style.

    PR:			bin/87783
    Submitted by:	Mats Palmgren
2005-11-08 16:45:00 +00:00
John Baldwin 856ac9d368 MFC: Add the device ID for the VIA VT8235 south bridge. 2005-11-08 15:57:39 +00:00
John Baldwin 36c946adb0 MF6: If the viapm device is a PCI-ISA bridge, attach a child ISA bus. 2005-11-08 15:57:17 +00:00
John Baldwin c001e3f373 MFC (sort of, this is actually written from scratch): Fix support for
multiple rocketport cards in the same machine.  Unlike 6.x and 7.x, in 5.x
the tty drivers create the cdevsw entries themselves, so for 5.x I was able
to create compatibility aliases for unit 0 so that the old names will still
work for unit 0.

Reviewed by:	phk
Tested by:	Jim Pazarena paz at qcislands dot net
2005-11-08 15:37:21 +00:00
Bill Paul 2cdad78420 MFC^2: alias EXT_NDIS to EXT_NET_DRV 2005-11-07 16:59:15 +00:00
Bill Paul d0fc093a12 MFC: merge changes from head to support Intel 2200BG/2915ABG driver. 2005-11-06 19:40:51 +00:00
John Baldwin f1625c4c59 MFC: Allow the process name to be in square brackets ([]) in
_find_processes().
2005-11-06 15:54:43 +00:00
John Baldwin 3e7db04161 MFC: Remove spurious newline. 2005-11-06 15:51:47 +00:00
Hajimu UMEMOTO 033ae3ad3a MFC 1.3: AES counter mode uses 8byte IV, not 16 bytes. 2005-11-05 05:04:31 +00:00
Hajimu UMEMOTO fcdb31d877 MFC 1.8: fixed a crush when either -lh or -ls option is used. 2005-11-05 04:56:00 +00:00
John Baldwin 46c5c53d5b MFC: Clarify when softc is allocated and xref DEVICE_PROBE. 2005-11-04 22:17:13 +00:00
John Baldwin 029ce3bd75 Sync with RELENG_6 and HEAD. 2005-11-04 22:15:24 +00:00
Gleb Smirnoff dbf28cda8f MFC 1.91, 1.92:
- First fill in structure with valid values, and only then attach it
    to the global list.
  - In in_addprefix() compare not only route addresses, but their masks,
    too. This fixes problem when connected prefixes overlap.
2005-11-04 18:25:55 +00:00
Colin Percival 119ae8c41b MFC rev. 1.2: Use the "builtin" shell function to make sure that the
requested command is handled as a shell function.
2005-11-04 18:22:17 +00:00
Maxim Konovalov ad75cea775 Sync with HEAD: add NetBSD 2.0.3, OpenBSD 3.8, FreeBSD 6.0, NetBSD 2.1. 2005-11-04 18:12:20 +00:00
Maxim Konovalov 7a858e34ae MFC rev. 1.8: dcons(4) depends on "options GDB". 2005-11-04 18:03:00 +00:00
Maxim Konovalov 33767887a3 MFC rev. 1.40: typo. 2005-11-04 17:58:02 +00:00
John Polstra 7946b35910 MFC 1.24: Fix an erroneous description of the file descriptor
assignments for the "~C" command.
2005-11-04 17:33:21 +00:00
John Polstra 77d7538cec MFC 1.118: Don't include self-dependencies in the file's reference
count.
2005-11-04 17:18:29 +00:00
Gleb Smirnoff b6507584c3 MFC 1.61 (by ru), 1.62:
- Bail if interface is misspelled instead of falling out into the
  "all interfaces" mode.
- Print space character in show_stat(). Remove a lot of priuntf(" ").
- Utilize show_stat() in sidewaysintpr() loop. This makes periodic
  statistics to honor -h flag.
2005-11-03 12:49:10 +00:00
Gleb Smirnoff f93d163859 MFC:
- Understand EADDRINUSE, and forget EDQUOT. [1]
  - Add description for EEXIST.
  - Change description for ENOBUFS. Routing socket can return
    this error for many different reasons, including general
    memory shortage, mbuf memory shortage and rtentry zone.

  PR:		kern/64090 [1]
2005-11-03 12:44:33 +00:00
Gleb Smirnoff c5b6df4306 MFC:
Implement a new feature for ping(8) - sweeping pings. In a sweeping
  ping ICMP payload of packets being sent is increased with given step.
  Sweeping pings are useful for testing problematic channels, MTU
  issues or traffic policing functions in networks.

  PR:		bin/82625
  Submitted by:	Chris Hellberg <chellberg juniper.net> (with some cleanups)
2005-11-03 12:42:21 +00:00
Gleb Smirnoff 916786fa8b MFOpenBSD 1.37, 1.38, 1.41. This is already present in RELENG_6 and
HEAD due to OPENBSD_3_7 pf import

- Increment the states reference counter in the rule attached to the state
  being inserted, so that the counter does not wrap back when the state
  is removed. This fixes pfsync setups with adaptive timeouts.

- Clean up reference counting wrt state creation and destruction. Fixes
  problems with adaptive timeouts, max-states limits, and rules not being
  freed from memory.

- Set creation timestamps correctly on states learnt by pfsync that are
  more than a second old.

PR:		83187
PR:		83186
Submitted by:	Martin Matuska
2005-11-03 12:25:29 +00:00
Gleb Smirnoff a58e936bb3 Several fixes to ARP and route locking, that were done during 6.0 release
cycle, and are also applicable to RELENG_5:

  o Make rt_check() return a locked rtentry.
  o Make rt_check() function more strict:
    - rt0 passed to rt_check() must not be NULL, assert this.
    - rt returned by rt_check() must be valid locked rtentry,
      if no error occured.
  o Modify callers, so that they never pass NULL rt0
    to rt_check().
  o Modify callers, so that they unlock rtentry.

  o Fix races in ARP code. See if_ether.c 1.139 for more information.
  o Fix LORs in ARP code. See if_ether.c 1.141 for more information.

  o Lock rtentry before dropping radix lock.

  o Send published ARP replies only on correct interface. [1]

  o Drop rtentry lock before calling rt_getifa(). [2]

  o Fixes to rt_setgate():
    - To avoid recursive rtentry locking.
    - Do not change routes in case of failure.
    - Return EADDRINUSE instead of bogus EDQUOT [3]

Revisions merged:
  net/if_atmsubr.c	- 1.39, 1.41
  net/if_fwsubr.c	- 1.13, 1.15
  net/if_iso88025subr.c	- 1.69, 1.71
  net/route.c		- 1.110, 1.111, 1.113
  net/rtsock.c		- 1.110, 1.111, 1.126, 1.130
  netinet6/nd6.c	- 1.51-1.53
  netinet/if_ether.c	- 1.139, 1.140, 1.141

PR:		kern/75634 [1]
PR:		kern/69356 [2]
PR:		kern/64090 [3]
2005-11-03 12:02:10 +00:00
Gleb Smirnoff 285fd46d92 MFC:
Implement suspend/resume operation for snd_csa(4)

PR:		kern/82243
Submitted by:	Serge Semenenko
2005-11-03 11:49:12 +00:00
Gleb Smirnoff 4f2a718b24 MFC 1.103:
Avoid recursions in netgraph(4). For more details see original
  commit message.
2005-11-03 11:46:47 +00:00
Gleb Smirnoff f9bc3f516c MFC 1.63, 1.64, 1.65, 1.69:
- Fix build with TRACE_MESSAGES on.
  - Reformat code under TRACE_MESSAGES to make it more readable.
  - Move linker hackery out of #ifdef.
  - Break long lines in linker hackery block.
  - Unwind NG_SEND_MSG_PATH() macro and merge it with already unwinded
    version under TRACE_MESSAGES.
  - Pass NG_WAITOK flag to ng_package_data() in unwinded macro.
  - Remove local error variable, which leads to hiding error from return
    value. [1]
  - When message can't fit into socket receive buffer return ENOBUFS
    to userland program instead of letting it wait until end of days. [2]

PR: 	kern/81371 [1]
PR: 	kern/85907 [2]
2005-11-03 11:44:24 +00:00
Wilko Bulte 8d4e83c639 MFC:
Small changes in the AlphaStation 200 and PC14 area.  PC164 SRM does
not work with 53C896 SCSI chips.

Submitted by: Owen Mann <[email protected]>
2005-11-02 22:21:50 +00:00
Bill Paul a7ec9f941f MFC: pin ourselves to the current CPU when thunking, other minor cleanups 2005-11-02 18:04:29 +00:00
Bill Paul 9252897962 MFC: don't bzero() too many kq_queues in ntoskrnl_libinit(). 2005-11-01 09:25:19 +00:00
Bill Paul 6403f9ef0d MFC: fix channel and authmode reporting for ifconfig (note: authmode
reporting is a no-op in 5.x and always shows up as OPEN)
2005-10-29 02:20:44 +00:00
Brooks Davis 9bdd00f160 MFC rev 1.6:
Don't print anything if we can't do any localpkg shutdown (start already
does this).

Submitted by:	Andre Albsmeier <Andre dot Albsmeier at siemens dot com>
PR:		conf/86606
2005-10-28 22:57:42 +00:00
SUZUKI Shinsuke 635c5e51b5 MFC Rev 1.60
perform NUD on an IPv6-aware point-to-point interface

Approved by: re(scottl)
2005-10-28 14:38:56 +00:00
Ade Lovett f7bc780664 MFC:
Specifically panic() in the case where pmap_insert_entry() fails to
get a new pv under high system load where the available pv entries
have been exhausted before the pagedaemon has a chance to wake up
to reclaim some.
2005-10-28 06:50:36 +00:00
SUZUKI Shinsuke f8eac2a514 MFC rev 1.34
fixed a kernel crash when IPv6 PIM-SM routing is enabled and a PIM register message is received

Approved by: re(scottl)
2005-10-27 14:04:03 +00:00
Bill Paul 64ade8d9d2 MFC: only free child device array if device_get_children() returned a
non-NULL array pointer.
2005-10-26 20:23:29 +00:00
Bill Paul 0a005eab36 MFC: merge the fix for PR 83477.
PR: kern/83477
2005-10-26 18:48:57 +00:00
Bill Paul b0dafce0d9 MFC: implement MmMapIoSpace() and MmUnmapIoSpace(), remove old timer
tracking code to fix deadlock in NdisMInitializeTimer().
2005-10-26 06:56:22 +00:00
Bill Paul acb8581f89 MFC: correct some __FreeBSD_version conditionals, fix link state change
notifications for RELENG_5.
2005-10-25 16:16:01 +00:00
Bill Paul c008a65d5d MFC: don't allow ndis_ticktask() to run after the NIC has been halted 2005-10-24 17:48:47 +00:00
Bill Paul 6f8e15e1a0 MFC: fix handling of message table strings in NdisWriteErrorLogEntry() 2005-10-24 05:06:19 +00:00
Bill Paul 8983684c20 MFC: launch just one DPC thread, to avoid possible panic when calling
sched_bind() during bootstrap before APs are launched.
2005-10-22 05:16:53 +00:00
Bill Paul 7134daca1a MFC from head (fix KeRaiseIrql() API, wait for DPC/workitem thread
termination the right way).
2005-10-21 05:29:54 +00:00
Bill Paul 19b7b82bea MFC all the updates from the HEAD 2005-10-20 17:52:27 +00:00
Bill Paul 8aee8a5f9d MFC updates from the head:
- install ndisgen.8 man page
- fixes for ndisgen.8 man page
- fixes for ndisgen.sh script to make it work correctly on amd64 and
  various documentation cleanups
2005-10-20 17:10:21 +00:00
Kris Kennaway 6dd5bfb048 MFC r1.20:
Add a default value for VM_BCACHE_SIZE_MAX of 400MB.  This is copied from
amd64, and is a factor of 3 less than the value previously auto-sized on
a 12GB machine, which would cause an overflow in calculations involving the
maxbcache int, causing bufinit() to loop forever at boot.
2005-10-17 00:20:47 +00:00
Ken Smith 8fe1548d4b Document the accidental temporary change in the libarchive shared library
version number.
2005-10-15 13:37:04 +00:00
Tim Kientzle e7955a6860 Correct the SHLIB_MAJOR back to 1 for libarchive.
In a recent MFC, I accidentally picked up a SHLIB_MAJOR
version bump for FreeBSD 6.

Anyone that updated their 5-STABLE system
between October 4, 2005 and now should delete
/usr/lib/libarchive.so.2.

Apologies.
2005-10-14 16:06:35 +00:00
Kirill Ponomarev 1a8bb1637a MFC: delete/main.c:1.27 info/main.c:1.48
Fix pkg_info(1) and pkg_delete(1) to handle properly packages which
  names start with a digit.

  PR:             bin/76858
  Submitted by:   Matthew D. Fuller <fullermd@over-yonder dot net>
2005-10-13 08:30:52 +00:00
Kirill Ponomarev 6a03d5a86c MFC: perform.c:1.14 test-pkg_version.sh:1.6
date: 2005/10/10 12:35:30;  author: krion;  state: Exp;  lines: +9 -4
  * pkg_version(1) exits if INDEX files is not found and -I is not
    specified.  The result is that the package will be listed with a '?'
    as if it was not found within the INDEX file, so fix this behaviour.
  * Remove trailing spaces.

  PR:             bin/87136
  Submitted by:   Sean Farley <sean-freebsd at farley dot org>
2005-10-13 08:27:00 +00:00
Colin Percival 20e3c0382e Correct a man-in-the-middle SSL version rollback vulnerability.
Security:       FreeBSD-SA-05:21.openssl
2005-10-11 11:52:01 +00:00
Yaroslav Tykhiy eeb66687b1 MFC: make the -M option to mdmfs configurable and document this.
PR:		bin/87218
2005-10-11 09:20:26 +00:00
Hajimu UMEMOTO 779a279b68 MFC: be consistent on naming advanced API functions; use ip6_XXXpktopt(s).
sys/netinet6/ip6_output.c:	1.93
	sys/netinet6/ip6_var.h:		1.31
	sys/netinet6/mld6.c:		1.20
	sys/netinet6/raw_ip6.c:		1.51
	sys/netinet6/udp6_output.c:	1.20
2005-10-10 12:04:55 +00:00
Hajimu UMEMOTO 26b6940d1c MFC 1.92: NULL is not zero. 2005-10-10 12:02:55 +00:00
Hajimu UMEMOTO 941e6deb19 MFC 1.49: do not hardcode if_mtu values in here, except for IFT_{ARC,FDDI} -
they need special handling.  makes it possible to take advantage of 9k ether
frames.
2005-10-10 12:00:06 +00:00
Hajimu UMEMOTO e4470312cf MFC: move RFC3542 related definitions into ip6.h.
sys/contrib/pf/net/pf_norm.c:	1.12
	sys/netinet/ip6.h:		1.15
2005-10-10 11:55:58 +00:00
Hajimu UMEMOTO 3f93c3131a MFC 1.18: add missing RFC3542 definition. 2005-10-10 11:52:11 +00:00
Hajimu UMEMOTO fd83c911d1 MFC: update comments:
- RFC2292bis -> RFC3542
    - typo fixes

	sys/netinet/icmp6.h		1.17
	sys/netinet/ip6.h:		1.14
	sys/netinet6/in6.h:		1.37
	sys/netinet6/ip6_input.c:	1.82
	sys/netinet6/ip6_mroute.h:	1.7
	sys/netinet6/ip6_output.c:	1.91
2005-10-10 10:42:09 +00:00
Hajimu UMEMOTO 4e570829e6 MFC 1.7: fixed the validation code of routing header length in
inet6_rth_getaddr().
2005-10-10 10:36:45 +00:00
Hajimu UMEMOTO 07e6c8dd9c MFC: refer RFC 3542 rather than RFC 2292bis.
lib/libc/net/ip6opt.c:	1.8
	lib/libc/net/rcmd.3:	1.25
	lib/libc/net/rthdr.c:	1.8
2005-10-10 10:33:28 +00:00
Hajimu UMEMOTO c24843764c MFC 1.16: fix typo. 2005-10-10 10:25:50 +00:00
Hajimu UMEMOTO a153971bd0 MFC 1.16: stop RFC 4193 address on the outside interface. 2005-10-10 09:52:01 +00:00
Kirill Ponomarev d843e8b01c MFC: main.c:1.6, perform.c:1.13, pkg_version.1:1.36, version.h:1.5
Add -o/-O options to pkg_version:

     -o  Show the origin recorded on package generation instead of the
         package name.

     -O  Only list packages whose registered origin is origin.

  Based on PR:    bin/78640
  Submitted by:   Marcus Grando <marcus at corp dot grupos.com.br>, flz
2005-10-09 21:59:32 +00:00
Maxim Konovalov 9f7dad5916 MFC rev. 1.234: teach sysctl_drop() how to deal with the sockets
in TIME_WAIT state.

Approved by:	re (scottl)
2005-10-09 08:21:34 +00:00
Giorgos Keramidas 51eb5756a8 MFC 1.36:
Remove the OPTIONS section, since it only documents FE_DEBUG and wrongly
so.  If the full list of fe(4) options is documented we can revive the
entire section.
2005-10-09 01:03:57 +00:00
Don Lewis c711742b70 MFC kern_exec.c 1.276 (and 1.278)
Original commit messages:

  truckman    2005-10-01 08:33:57 UTC

    FreeBSD src repository

    Modified files:
      sys/kern             kern_exec.c
    Log:
    Copy new process argument list in do_execve() before grabbing PROC_LOCK
    to avoid touching pageable memory while holding a mutex.

    Simplify argument list replacement logic.

    PR:            kern/84935
    Submitted by:  "Antoine Pelisse" apelisse AT gmail.com (in a different form)
    MFC after:     3 days

    Revision  Changes    Path
    1.276     +10 -10    src/sys/kern/kern_exec.c

  truckman    2005-10-04 04:02:33 UTC

    FreeBSD src repository

    Modified files:
      sys/kern             kern_exec.c
    Log:
    Add missing word to comment.

    Revision  Changes    Path
    1.278     +1 -1      src/sys/kern/kern_exec.c

PR:		kern/84935
Submitted by:	"Antoine Pelisse" apelisse AT gmail.com (in a different form)
2005-10-08 20:35:26 +00:00
Don Lewis 803698221e MFC ffs_alloc.c 1.135 - clear i_flag field in recycled inodes
The IN_HASHED bit should not be cleared here in RELENG_5.

Original commit message:
  truckman    2005-10-03 21:57:43 UTC

    FreeBSD src repository

    Modified files:
      sys/ufs/ffs          ffs_alloc.c
    Log:
    Initialize the inode i_flag field in ffs_valloc() to clean up any
    stale flag bits left over from before the inode was recycled.

    Without this change, a leftover IN_SPACECOUNTED flag could prevent
    softdep_freefile() and softdep_releasefile() from incrementing
    fs_pendinginodes.  Because handle_workitem_freefile() unconditionally
    decrements fs_pendinginodes, a negative value could be reported at
    file system unmount time with a message like:
            unmount pending error: blocks 0 files -3
    The pending block count in fs_pendingblocks could also be negative
    for similar reasons.  These errors can cause the data returned by
    statfs() to be slightly incorrect.  Some other cleanup code in
    softdep_releasefile() could also be incorrectly bypassed.

    MFC after:      3 days

    Revision  Changes    Path
    1.135     +1 -0      src/sys/ufs/ffs/ffs_alloc.c
2005-10-08 20:04:28 +00:00
Maxim Konovalov 8f383d5747 MFC rev. 1.77: restore kerneldumpheader.architectureversion bytes
swopping.

Approved by:	re (kensmith)
2005-10-08 17:57:15 +00:00
Doug Barton 99936a7cee MFC through rm.c 1.53, rm.1 1.38, and Makefile 1.18.
This includes the recent change to improve handling of the -P flag
on read-only files, addition of the -I option for better handling
of recursive deletes, a test for removal of / in the argument list,
and related mdoc and comment changes and improvements.

The Makefile change removes a spurious SRCS=
2005-10-08 17:40:01 +00:00
Don Lewis bf2ac7e6f8 MFC ffs_softdep.c 1.185 - Schedule update of parent directory's link count
after rmdir()

Original commit message:
  truckman    2005-09-29 21:50:26 UTC

    FreeBSD src repository

    Modified files:
      sys/ufs/ffs          ffs_softdep.c
    Log:
    After a rmdir()ed directory has been truncated, force an update of
    the directory's inode after queuing the dirrem that will decrement
    the parent directory's link count.  This will force the update of
    the parent directory's actual link to actually be scheduled.  Without
    this change the parent directory's actual link count would not be
    updated until ufs_inactive() cleared the inode of the newly removed
    directory, which might be deferred indefinitely.  ufs_inactive()
    will not be called as long as any process holds a reference to the
    removed directory, and ufs_inactive() will not clear the inode if
    the link count is non-zero, which could be the result of an earlier
    system crash.

    If a background fsck is run before the update of the parent directory's
    actual link count has been performed, or at least scheduled by
    putting the dirrem on the leaf directory's inodedep id_bufwait list,
    fsck will corrupt the file system by decrementing the parent
    directory's effective link count, which was previously correct
    because it already took the removal of the leaf directory into
    account, and setting the actual link count to the same value as the
    effective link count after the dangling, removed, leaf directory
    has been removed.  This happens because fsck acts based on the
    actual link count, which will be too high when fsck creates the
    file system snapshot that it references.

    This change has the fortunate side effect of more quickly cleaning
    up the large number dirrem structures that linger for an extended
    time after the removal of a large directory tree.  It also fixes a
    potential problem with the shutdown of the syncer thread timing out
    if the system is rebooted immediately after removing a large directory
    tree.

    Submitted by:   tegge
    MFC after:      3 days

    Revision  Changes    Path
    1.185     +2 -0      src/sys/ufs/ffs/ffs_softdep.c

Submitted by:	tegge
2005-10-08 05:57:40 +00:00
Ralf S. Engelschall 4f7e246433 MFC to RELENG_5:
| Fix system shutdown timeout handling by again supporting longer running
| shutdown procedures (which have a duration of more than 120 seconds).
|
| We have two user-space affecting shutdown timeouts: a "soft" one in
| /etc/rc.shutdown and a "hard" one in init(8). The first one can be
| configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
| to 30 seconds. The second one was originally (in 1998) intended to be
| configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
| to 120 seconds.
|
| Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
| (as it obviously is actually not used within the kernel itself) and
| hence was intentionally but misleadingly removed in revision 1.107 from
| init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
| control user-space processes in general, but in this particular case the
| sysctl(8) variable should have remained as it supports init(8), which
| isn't passed command line flags (which in turn could have been set via
| /etc/rc.conf), etc.
|
| As there is already a similar "kern.init_path" sysctl(8) variable which
| directly affects init(8), resurrect the init(8) shutdown timeout under
| sysctl(8) variable "kern.init_shutdown_timeout". But this time document
| it as being intentionally unused within the kernel and used by init(8).
| Also document it in the manpages init(8) and rc.conf(5).
|
| Reviewed by: phk
| MFC after: 2 weeks
|
| Revision  Changes    Path
| 1.48      +7 -1      src/sbin/init/init.8
| 1.61      +1 -1      src/sbin/init/init.c
| 1.264     +16 -1     src/share/man/man5/rc.conf.5
| 1.257     +11 -0     src/sys/kern/init_main.c
2005-10-04 18:00:43 +00:00
Diomidis Spinellis 7c22a8e338 MFC 1.28
Bug fix: a numeric flag specification in the substitute command would
cause the next substitute flag to be ignored.
While working at it, detect and report overflows.

Reported by:	Jingsong Liu
Bugged by:	Xin Li
2005-10-04 15:06:42 +00:00
Ollivier Robert c22fe78be9 MFC of revision 1.16 for chkgrp.8: Markup fixes. 2005-10-04 10:43:21 +00:00
Ollivier Robert 2c4878e2e2 MFC revision 1.10 of chkgrp.c:
The check for invalid characters introduced in 1.9 incorrectly
flags NIS entries as invalid.

Approved by:	re (scottl)
2005-10-04 10:37:53 +00:00
Tim Kientzle a53d6504f2 MFC: Update libarchive to 1.02.033. (Synchronize with -CURRENT.)
Among other fixes:
  * C++ support
  * Portability:  remove C99 requirements
  * Portability:  don't require wchar.h
  * Check for memory allocation failures
  * Portability:  better detection of ACL support
  * Signed/unsigned fixes
  * Fix crash when archive_read_next_header called after an
    open failure
  * Fix archive_read_data
  * Reduce window for attribute restore security race
  * Clean up pathnames before creating leading dirs
  * assign default inode/dev values to extracted tar entries
    to better support tar->cpio conversions
  * Trim mode and time values for inner ustar header when constructing
    pax entries
  * Sample code in archive_read.3 and archive_write.3 works now
  * Many comment and documentation corrections
2005-10-04 05:39:40 +00:00
Andrew Thompson 4cba41cc9b Add a note to UPDATING and bump __FreeBSD_version for if_bridge MFC.
Approved by:	mlaier (mentor)
2005-10-03 22:04:08 +00:00
Andrew Thompson aa5284565d MFC if_bridge support
Connect if_bridge to the build.

Approved by:	mlaier (mentor)
2005-10-03 21:55:15 +00:00
Andrew Thompson defcc86f76 MFC if_bridge support code
Add network hooks and support code for if_bridge, including ipv6 and dummynet
support. Use the if_spare1 pointer from struct ifnet to keep ABI.

Approved by:	mlaier (mentor)
2005-10-03 21:51:32 +00:00
Colin Percival c469c3c1d1 MFC revision 1.11: Fix a bug introduced in revision 1.9 which causes
chkgrp to coredump on certain corrupt files.
2005-10-03 21:41:45 +00:00
Andrew Thompson 3d9f634cd4 MFC if_bridge code; bridgestp.c r1.6, if_bridge.c r1.23, if_bridgevar.h r1.4
Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
 spanning tree support.

 Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
 Thorpe in NetBSD.

Conversion to old-ifconfig taken from green@

Approved by:	mlaier (mentor)
2005-10-03 21:40:42 +00:00
Andrew Thompson 6f2b28a204 MFC m_copyup function, uipc_mbuf.c r1.147
This can be used to help make our ip stack less alignment restrictive, and help
performance on some ethernet cards which currently copy the entire packet a
couple bytes to get the packet aligned properly...

Required for if_bridge support.

Approved by:	mlaier (mentor)
OKed by:	jmg
2005-10-03 21:27:39 +00:00
Joel Dahl 4bf9c65415 MFC rev 1.63:
Fix spelling errors.
2005-10-03 07:02:14 +00:00
cvs2svn 0f9358e032 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-10-02 19:15:57 +00:00
Ruslan Ermilov 1e3dbbb483 MFC: 1.46: -q also affects "route change". 2005-10-02 12:58:24 +00:00
Max Khon 194989e369 MFC g_uzip.c rev. 1.5:
- Fix "end_blk out of range" panic when INVARIANTS.

EROFS check was not MFC'ed because UFS mount tries to access the device
in rw mode even if ro mount is requested.
2005-10-02 11:23:40 +00:00
Robert Watson 83d47f2cf7 Merge subr_pcpu.c:1.7 from HEAD to RELENG_5:
Add "show allpcpu" to DDB, which prints the current CPU id followed by
  the per-cpu data for all CPUs.  This is easier to ask users to do than
  "figure out how many CPUs you have, now run show pcpu, then run it
  once for each CPU you have".
2005-10-02 10:21:33 +00:00
Robert Watson ee1e7001f0 Merge subr_kdb.c:1.13 from HEAD to RELENG_5:
If KDB_STOP_NMI is compiled into the kernel, default
  debug.kdb.stop_cpus_with_nmi to 1 rather than 0.
2005-10-02 10:20:04 +00:00
Robert Watson ce6290283b Merge kern_lock.c:1.94, 1.95 from HEAD to RELENG_5:
In lockstatus(), don't lock and unlock the interlock when testing the
  sleep lock status while kdb_active, or we risk contending with the
  mutex on another CPU, resulting in a panic when using "show
  lockedvnods" while in DDB.

  Reviewed by:    jhb
  Reported by:    kris
2005-10-02 10:11:31 +00:00
Ruslan Ermilov c2938d16e9 Re-add FreeBSD 5.4 which got mistakenly nuked in rev. 1.41.2.5, add 7.0. 2005-10-01 18:17:29 +00:00
Hajimu UMEMOTO 5972ca74e5 MFC: add product ID for Linux Ethernet/RNDIS gadget on pxa210/25x/26x.
sys/dev/usb/if_cdce.c:  1.11
	sys/dev/usb/usbdevs:    1.234
2005-10-01 16:32:27 +00:00
Ken Smith de11444480 MFC revision 1.890:
> date: 2005/09/28 12:39:00;  author: kensmith;  state: Exp;  lines: +17 -6
> Add SHA256 checksums to the release build.
>
> Requested by:           cperciva (so)
> Reviewed/improved by:   ru
2005-09-30 11:48:44 +00:00
Robert Watson 169665e013 Merge subr_prof.c:1.119, 1.120, 1.121 from HEAD to RELENG_6:
Acquire Giant in uprintf() and tprintf() due to the non-MPSAFEty of
  the tty code invoked from these functions.

  Correct age-old comments about uprintf()/tprintf() sleeping: they
  will never sleep.

Unlike in the merge to RELENG_6, it is not necesary to acquire Giant
in the NFS code, as the NFS client runs entirely under Giant in 5.x.
Likewise, this is not a critical fix in 5.x as the vast majority of
relevant calls to uprintf() are in the VFS code, which also runs
with Giant in 5.x.  However, there are some exposed code paths that
make this MFC a good idea.

Much useful feedback from:	bde
Approved by:			re (scottl)
2005-09-29 18:45:02 +00:00
Christian Brueffer 9546c7541f MFC: rev. 1.6
Fix typo.
2005-09-28 16:52:09 +00:00
Ruslan Ermilov 8f9fe3662e MFC: 1.57: Respect IFF_PROMISC. 2005-09-28 16:50:25 +00:00
Jesus R. Camou 917a67f8ef Fix reference paths.
Noticed by:	Ilya Kiselyov <[email protected]>
Approved by:	trhodes (mentor)
2005-09-28 08:04:16 +00:00
Robert Watson 6bef5a1c4a Merge fifo_vnops.c:1.129 from HEAD to RELENG_5:
Lock the read socket receive buffer when frobbing the sb_state flag on
  that socket during open, not the write socket receive buffer.

  Spotted by:     ups
2005-09-28 06:56:14 +00:00
Robert Watson 9ec8b4633b Merge uipc_usrreq.c:1.156 from HEAD to RELENG_5:
Canonicalize the UNIX domain socket copyright layout: original holders
  before more recent holders.
2005-09-28 06:52:35 +00:00
Robert Watson d654d40ebc Merge fifo_vnops.c:1.128 from HEAD to RELENG_5:
For reasons of consistency (and necessity), assert an exclusive vnode
  lock on the fifo vnode in fifo_open(): we rely on the vnode lock to
  serialize access to v_fifoinfo.
2005-09-28 06:48:09 +00:00
Robert Watson 63c0dfd8e8 Merge uipc_socket.c:1.249, socket.h:1.89 from HEAD to RELENG_5:
Add three new read-only socket options, which allow regression tests
  and other applications to query the state of the stack regarding the
  accept queue on a listen socket:

  SO_LISTENQLIMIT    Return the value of so_qlimit (socket backlog)
  SO_LISTENQLEN      Return the value of so_qlen (complete sockets)
  SO_LISTENINCQLEN   Return the value of so_incqlen (incomplete sockets)

  Minor white space tweaks to existing socket options to make them
  consistent.

  Discussed with: andre
2005-09-27 21:54:03 +00:00
Xin LI fa08d4a72a MFC 1.64: Restore a historical ufs_inactive behavior that respect
the RDONLY option, so subsequent call of UFS_TRUNCATE (ffs_truncate)
would not panic the system.  This fixes a panic that can happen
when mounting a corrputed filesystem read-only, and reading data
from it.

Reviewed by:	mckusick
2005-09-27 17:05:46 +00:00
Kirill Ponomarev 308abad7e0 MFC: 1.20
date: 2005/09/24 21:41:47;  author: krion;  state: Exp;  lines: +1 -1
  Do not bitch about bsdpan modules not having origin.

  Based on PR:    bin/82269
  Submitted by:   Steven Hartland <killing at multiplay dot co dot uk>
  MFC after:      3 days
2005-09-27 07:56:03 +00:00
Kirill Ponomarev a444d3926a MFC: 1.39
date: 2005/09/24 19:41:56;  author: krion;  state: Exp;  lines: +1 -1
  Remove '\n' since it's redundant in case if file doesn't exist while
  running 'pkg_info -g'

  Based on PR:    bin/42609
  Submitted by:   Jeff King <peff-freebsd at peff dot net>
  MFC after:      3 days
2005-09-27 07:49:05 +00:00
John Baldwin 8f49385a0d MFC: Explicitly switch to the new TSS when adding one in i386_extend_pcb(). 2005-09-26 19:40:14 +00:00
Robert Watson db5049ed92 Merge missing patch hunk from netisr.c:1.12 from HEAD to RELENG_5:
Include opt_net.h from netisr.c, or compiling in NET_WITH_GIANT
  will not change the default setting for debug.mpsafenet.

Submitted by:	Ed Maste <emaste at phaedrus dot sandvine dot ca>
2005-09-26 18:48:01 +00:00
John Baldwin 12fa1eb277 MFC: Zero donecount on auto request sense.
PR:		kern/81450
Submitted by:	Sean McNeil sean at mcneil dot com
2005-09-26 13:58:56 +00:00
Andre Oppermann 309fea47ca MFC 1.77: Do not ignore all other TCP options when TCP_MD5. 2005-09-26 13:18:19 +00:00
Andre Oppermann af7b039352 MFC 1.160: Undo optimization which broke BIOCGSEESENT handling. 2005-09-26 13:12:01 +00:00
Robert Watson 841f948aac Merge kern_acct.c:1.75 from HEAD to RELENG_5:
Pass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing
  NULL.  The NFS client expects that a thread will always be present for a
  VOP so that it can check for signal conditions, and will dereference a
  NULL pointer if one isn't present.
2005-09-25 19:14:02 +00:00
Robert Watson 1c5fceb949 Merge rc.conf:1.260, kerberos:1.5, rc.conf.5:1.265 from HEAD to RELENG_5:
Add a new rc.conf entry, kerberos5_server_flags, which allows the
  administrator to specify additional start-up flags to the Kerberos
  5 Authentication Server.
2005-09-25 19:06:24 +00:00
Xin LI e6f740ea4f MFC 1.31-1.34: Several style fixes by ru@ and document alternative superblock
location for UFS2.
2005-09-25 12:11:38 +00:00
Christian Brueffer b344f0ed64 MFC: rev. 1.286
Don't claim matcd(4) support, it was removed long ago.
2005-09-24 07:48:04 +00:00
Christian Brueffer db6087d3ac MFC: rev. 1.5
Change the DESCRIPTION section into HARDWARE, since it already lists
the supported hardware.
2005-09-24 07:35:13 +00:00
Christian Brueffer c26ce4cffc MFC:
Sort list of supported hardware.
2005-09-24 07:24:41 +00:00
Christian Brueffer 57aaa73d18 MFC: rev. 1.2
Use the correct function name as .Nm argument.
2005-09-24 07:14:34 +00:00
Robert Watson 1c5f84b344 Merge rc.initdiskless:1.45 from HEAD to RELENG_5:
Use sysctl -q when querying for kern.bootp_cookie in order to avoid
  printing boot-time errors that don't reflect true error conditions.
2005-09-22 17:55:29 +00:00
Robert Watson 5f2bf7eaa4 Merge sysctl.8:1.59, sysctl.c:1.68 from HEAD to RELENG_5:
Add "-q" argument to sysctl(8), which suppresses a limited set of
  warnings/ errors generated.  In particular, it suppresses "unknown oid"
  when attempting to get or set a sysctl not present in the kernel.
2005-09-22 17:53:57 +00:00
Robert Watson 62e7dc8339 Merge uipc_socket.c:1.248 from HEAD to RELENG_5:
Fix spelling in a comment.
2005-09-21 15:36:04 +00:00
Robert Watson e9ab5752e0 Merge fifo_vnops.c:1.126 from HEAD to RELENG_5:
Assert that (vp) is locked in fifo_close(), since we rely on the
  exclusive vnode lock to synchronize the reference counts on struct
  fifoinfo.
2005-09-21 15:35:08 +00:00
Robert Watson 831bff8549 Merge uipc_socket2.c:1.148 from HEAD to RELENG_5:
Re-comment sbcompress() to explain what it is it does; it took me
  quite a bit of reading to figure it out, and I want to avoid figuring
  it out again.

  Convert an if (foo) else printf("this is almost a panic") into a
  KASSERT.
2005-09-21 15:33:26 +00:00
Pyun YongHyeon 2802ab172e MFC rev. 1.29 to RELENG_5:
fix LOR by dropping driver lock before calling resource_int_value(9).
2005-09-21 03:20:36 +00:00
Pyun YongHyeon 5aed97173a MFC rev. 1.21 to RELENG_5: fix module unloading panic 2005-09-21 02:47:12 +00:00
Tor Egge a0cc1f0ec0 MFC: Retain generation count when writing zeroes instead of an inode to disk.
Don't free a struct inodedep if another process is allocating saved
     inode memory for the same struct inodedep in
     initiate_write_inodeblock_ufs[12]().

     Handle disappearing dependencies in softdep_disk_io_initiation().
2005-09-20 22:36:32 +00:00
Tim Kientzle 8c8630dd7b MFC bsdtar.c 1.64: Correct warning message on locale error
(program name was set up incorrectly)
2005-09-20 17:58:59 +00:00
Robert Watson f308376070 Merge fifo_vnops.c:1.125 from HEAD to RELENG_5:
The socket pointers in fifoinfo are not permitted to be NULL, so
  don't check if they are, it just confuses the fifo code more.
2005-09-20 13:58:59 +00:00
Gleb Smirnoff e420757d51 MFC typo fix from 1.75:
Dej'a vu of revision 1.35

  PR:		kern/86258
  Submitted by:	Hiroshi Oota <ghelp excite.co.jp>
2005-09-20 13:47:59 +00:00
Robert Watson 825a392cee Merge fifo_vnops.c:1.123 from HEAD to RELENG_5:
As a result of kqueue locking work, socket buffer locks will always
  be held when entering a kqueue filter for fifos via a socket buffer
  event: as such, assert the lock unconditionally rather than acquiring
  it conditionally.
2005-09-20 13:33:07 +00:00
Robert Watson 0731611ed3 Merge dumpon:1.10 from HEAD to RELENG_5:
Use kenv -q to extract dumpdev rather than kenv, in order to avoid
  spamming the console in the event that a loader tunable 'dumpdev'
  isn't defined, which is not a relevant failure to report.
2005-09-20 13:28:35 +00:00
Robert Watson d495e5b7a9 Merge kenv.1:1.12, kenv.c:1.8 from HEAD to RELENG_5:
Add a "-q" quiet flag to kenv so that warnings can be suppressed.
2005-09-20 13:27:05 +00:00
Max Laier ddafabb235 Properly initialize src-nodes limits.
Reported by:	Andre <andre (a) netvision ! com ! br>
2005-09-19 15:53:22 +00:00
Joe Marcus Clarke 29824b0b9e MFC:
Correct a mis-merge from HEAD, and make sure the socket permissions are set
to 0666.

Reported by:	rwatson via delphij
2005-09-19 14:22:57 +00:00
Gary W. Swearingen 40f16546a1 MFC 1.21
Approved by:	keramida (mentor)
2005-09-17 17:19:42 +00:00
Gary W. Swearingen 04c55947be MFC 1.25
Approved by:	keramida (mentor)
2005-09-17 15:50:50 +00:00
Brian Somers e3505db4e6 MFC: Add a -h option to tell cmp not to follow symbolic links.
Sponsored by:	Sophos/ActiveState
2005-09-17 11:35:24 +00:00
Robert Watson 81777415e9 Merge if.c:1.246 from HEAD to RELENG_5:
In netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
  is requested on a network interface file descriptor that is
  non-applicable.
2005-09-16 09:12:36 +00:00
Robert Watson c33ccff783 Merge vfs_subr.c:1.646 (in spirit) from HEAD to RELENG_5:
In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an
    unsupported kqueue filter type is requested on a vnode.
2005-09-16 09:11:50 +00:00
Robert Watson 8cd3d94553 Merge fifo_vnops.c:1.120 (in spirit) from HEAD to RELENG_5:
When a request is made to register a filter on a fifo that doesn't
  apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
  it as EINVAL, not by returning 1 (EPERM).
2005-09-16 09:06:16 +00:00
Robert Watson 39d38625d0 Merge fifo_vnops.c:1.116 from HEAD to RELENG_5:
When a writer opens a fifo, wake up the read socket for read, not the
  write socket.
2005-09-16 09:02:25 +00:00
Robert Watson aa67dd1a19 Merge fifo_vnops.c:1.115 from HEAD to RELENG_5:
Add an assertion that fifo_open() doesn't race against other threads
  while sleeping to allocate fifo state: due to using the vnode lock to
  serialize access to a fifo during open, it shouldn't happen (tm).
2005-09-16 09:01:50 +00:00
Robert Watson 9d41d6515c Merge fifo_vnops.c:1.114 from HEAD to RELENG_5:
Rather than reaching into the internals of the UNIX domain socket code
  by calling uipc_connect2() to connect two socket endpoints to create a
  fifo, call soconnect2().
2005-09-16 09:00:58 +00:00
cvs2svn b81803f112 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-09-15 13:29:11 +00:00
Jesus R. Camou 0d62dd639f MFC: rev. 1.22.
Approved by:	trhodes (mentor)
2005-09-15 02:29:37 +00:00
Xin LI 569c05feff MFC 1.118:
When padding with zero, do pad after prefixes rather than padding
before prefixes.

Use cases:
	printf("%05d", -42);   -->   "00-42"   (should be "-0042")
	printf("%#05x", 12);   -->   "000xc"   (should be "0x00c")

Submitted by:	Oliver Fromme
PR:		kern/85520
Approved by:	re (kensmith)
2005-09-14 02:45:50 +00:00
Andre Oppermann 23c6e7466f MFC rev. 1.233: Fix ICMP_UNREACH_NEEDFRAG case where no MTU was proposed
in the ICMP reply.

PR:             kern/81813
Submitted by:   Vitezslav Novy <vita at fio.cz>
2005-09-13 14:44:08 +00:00
Maxim Konovalov d0cc4304b3 MFC rev. 1.10: postpone a temporary file creation until we realize
if ipfw(4) ever used.

Approved by:	re (scottl)
2005-09-13 14:34:11 +00:00
Gleb Smirnoff f6627cfe95 MFC 1.7:
Plug item leak in case when not all hooks are connected.

  Found by:	David Vos <david.vos gmail.com>
2005-09-13 12:44:55 +00:00
Gleb Smirnoff b15e505e2c MFC 1.26 by ru:
Fixed parsing of unsigned integers.
2005-09-13 12:41:52 +00:00
David Schultz 6c2f100428 MFC rev 1.64. Rev 1.51.2.3 claimed to be an MFC of 1.53, 1.55, 1.56,
1.59, 1.60, 1.62, and 1.64, but I left out 1.64.

Reported by:    asmodai@
2005-09-12 21:01:28 +00:00
Maksim Yevmenkin 83823f5a62 MFC to RELENG_5
Fix typo in usage

Submitted by:	Jonatan B <onatan at gmail dot com>
Approved by:	re (scottl)
2005-09-12 16:11:25 +00:00
Max Laier b8bb1ef4ab Commit imported changes to RELENG_5:
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
 | verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@

 pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
 | in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
 | from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@
2005-09-12 14:46:55 +00:00
Gleb Smirnoff fd7f90e3bb MFC 1.31:
When a carp(4) interface is being destroyed and is in a promiscous mode,
  first interface is detached from parent and then bpfdetach() is called.
  If the interface was the last carp(4) interface attached to parent, then
  the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
  we panic on destroyed mutex.

  To prevent the above scenario, clear pointer to parent, when we detach
  ourselves from parent.
2005-09-12 13:38:35 +00:00
Don Lewis f4dc43c768 MFC src/sys/gnu/fs/ext2fs/fs.h 1.18
src/sys/kern/kern_shutdown.c	1.175
	src/sys/sys/buf.h		1.189

  FreeBSD src repository

  Modified files:
    sys/gnu/fs/ext2fs    fs.h
    sys/kern             kern_shutdown.c
    sys/sys              buf.h
  Log:
  Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
  struct bufs that are persistently held by ext2fs.  Ignore any buffers
  with this flag in the code in boot() that counts "busy" and dirty
  buffers and attempts to sync the dirty buffers, which is done before
  attempting to unmount all the file systems during shutdown.

  This fixes the problem caused by any ext2fs file systems that are
  mounted at system shutdown time, which caused boot() to give up on
  a non-zero number of buffers and skip the call to vfs_unmountall().
  This left all the mounted file systems in a dirty state and caused
  them to all require cleanup by fsck on reboot.

  Move the two separate copies of the "busy" buffer test in boot()
  to a separate function.

  Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.

  Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
  this and previous flag changes.

  PR:             kern/56675, kern/85163
  Tested by:      "Matthias Andree" matthias.andree at gmx.de
  Reviewed by:    bde
  MFC after:      3 days

  Revision  Changes    Path
  1.18      +8 -8      src/sys/gnu/fs/ext2fs/fs.h
  1.175     +13 -11    src/sys/kern/kern_shutdown.c
  1.189     +4 -4      src/sys/sys/buf.h

PR:		kern/56675, kern/85163
Tested by:	"Matthias Andree" matthias.andree at gmx.de
Reviewed by:	bde
2005-09-12 04:25:53 +00:00
David E. O'Brien e5b50ac268 MFC rev 1.13: fix bug where static forward declarations weren't accepted. 2005-09-11 17:43:04 +00:00
Doug Barton 097adec131 MFC 1.22 which removes the IP6.INT example per RFC 4159 2005-09-10 08:28:34 +00:00
Wilko Bulte b575df8d90 MFC: Roosevelt quote 2005-09-09 18:27:11 +00:00
Gleb Smirnoff 38e88d72ff MFC 1.57 (see original revision for full description):
- in ng_ksocket_incoming2() clear m_nextpkt on all mbufs
    read from socket.
  - restore rev. 1.54 change in ng_ksocket_incoming().

  PR:		kern/84952
  PR:		kern/82413
  In collaboration with:	rwatson
2005-09-09 06:18:00 +00:00
Gleb Smirnoff 8560648d6c MFC 1.109:
Raise one more bit in READER_MASK. I believe that before this change
  it was possible to have 1 reader and 1 writer thread working on
  a node simultaneously.

  Reviewed by:	julian
2005-09-09 06:11:05 +00:00
Gleb Smirnoff b8d84ef4cc MFC 1.108, 1.110-1.111:
Use non-debug macros inside debugging functions, to prevent
  important information from being rewritten.

  In INVARIANTS case also check that nodes do not pass queues of mbufs
  each other.
2005-09-09 06:09:45 +00:00
R. Imura 7c7e0f40c5 MFC 1.12: Fix panic on sparc64 caused by touching uninitialized address. 2005-09-08 15:49:18 +00:00
R. Imura 5ce3cd4e45 MFC: check capable size of given strings correctly.
1.4 src/contrib/smbfs/lib/smb/kiconv.c
  1.2 src/lib/libkiconv/xlat16_sysctl.c
  1.11 src/sys/libkern/iconv.c
2005-09-08 15:47:04 +00:00
Craig Rodrigues d8cf52c147 MFC:
scmouse.c, 1.39:  In set_mouse_pos(), try to avoid division by zero errors.

  scvidctl.c, 1.36:
        In sc_set_text_mode(), reset fontwidth if it is <= 0.
        Eliminates division by zero errors in syscons driver.
2005-09-07 23:54:22 +00:00
Gary W. Swearingen 2e10e50a75 Added ENVIRONMENT section (PAGER, MANPATH, etc.).
PR:             docs/84485
Approved by:    keramida
2005-09-07 17:41:53 +00:00
Gary W. Swearingen 6c987883cc MFC: Improved descriptions of block size handling.
PR:             docs/84765
Approved by:    keramida
2005-09-07 17:24:53 +00:00
Gary W. Swearingen a486aff385 MFC: Added a sentence to explain what "span" means.
PR:             docs/84850
Approved by:    re
2005-09-07 16:53:21 +00:00
Robert Watson 87dd9adb31 Merge ufs_vnops.c:1.269 from HEAD to RELENG_5:
Allow removal of empty directories with high link counts. These can
  occur on a filesystem running with soft updates after a crash and
  before a background fsck has been run. To prevent discrepancies
  from arising in a background fsck that may already be running,
  the directory is removed but its inode is not freed and is left
  with the residual reference count. When encountered by the
  background fsck it will be reclaimed.

This change was present at the time of the RELENG_6 branch point, so
does not need to be merged to RELENG_6.

Approved by:	mckusick
Bumped into by:	Mikhail Teterin <mi plus mx at aldan dot algebra dot com>
2005-09-07 16:23:06 +00:00
Colin Percival 811045b4a3 MFC: Correct insecure temporary file usage.
Security:	FreeBSD-SA-05:20.cvsbug
2005-09-07 13:44:06 +00:00
Nate Lawson c0b8480022 MFC: ignore non-useful cpufreq levels and change the powerd algorithm to
one that saves more power with possibly more performance loss.  This is
kern_cpu.c:1.20,1.21 and powerd.c:1.9
2005-09-06 18:02:19 +00:00
Warner Losh d762a5e96d MFC: 1.293 1.294:
Treat 0xfffff.... as unassigned as well as 0.
2005-09-05 18:09:20 +00:00
Hajimu UMEMOTO c7a79fabbd MFC 1.74: SADB_UPDATE did not return an error when key length is invalid. 2005-09-03 16:14:52 +00:00
Brian Somers ed0521cec8 MFC: If we fail in chown(2), try to just change the group and continue on to
change the permissions.  Failures are still recorded.

Sponsored by:	Sophos/ActiveState
2005-09-03 11:06:08 +00:00
Maksim Yevmenkin ff13be19ac MFC to RELENG_5
Fix dangling callout problem in the Bluetooth L2CAP code that leads to
panic. The panic happens when outgoing L2CAP connection descriptor is
deleted with the L2CAP command(s) pending in the queue. In this case when
the last L2CAP command is deleted (due to cleanup) and reference counter
for the L2CAP connection goes down to zero the auto disconnect timeout
is incorrectly set. pjd gets credit for tracking this down and committing
bandaid.

Reported by:	Jonatan B <onatan at gmail dot com>
Approved by:	re (scottl)
2005-09-03 03:39:40 +00:00
Craig Rodrigues 41aa0c4c80 MFC:
Prevent division by zero errors in sc_mouse_move()
  by explicitly setting sc->font_width, in the same
  places where sc->font_size is set, instead of
  relying on the default initialized value of 0 for sc->font_width.

PR:             kern/84836
Reported by:    Andrey V. Elsukov <bu7cher at yandex dot ru>
2005-09-02 17:37:46 +00:00
Gleb Smirnoff 8c20d1d593 MFC 1.6 - 1.9:
- Use 'ipfw list'.
  - Correctly parse output, when logging amount is limited in the
    rule itself, not in verbose_limit sysctl. [1]

  PR:		conf/77929
  Submitted by:	Andriy Gapon [1]
  eviewed by:	matteo
2005-09-02 14:20:22 +00:00
Gleb Smirnoff cd62c56dba MFC: net.graph.ngqfreemax has been deprecated. 2005-09-02 14:08:51 +00:00
Jesus R. Camou bc311aa382 MFC rev. 1.05:
o The ways to escape an alias.
	o Fix in the alias syntax lines.
	o Refero to the Aliases subsection.

Approved by:	trhodes (mentor)
2005-09-02 05:52:28 +00:00
Gregory Neil Shapiro c212b48031 MFC: Be sure to execute sendmail_precmd() to check sendmail.cf conflicts and
rebuild the aliases file if necessary.

     Revision  Changes    Path
     1.15      +1 -0      src/etc/rc.d/sendmail
2005-09-02 02:52:55 +00:00
Craig Rodrigues fa15134a75 MFC 1.380:
FDOPT_NORETRY is an option, and must be compared with fd->options,
  not fd->flags.

PR:             kern/85481
Submitted by:   Lev Levinson <llevinson at inbox dot ru>
2005-09-02 00:39:13 +00:00
Philip Paeps b2a23c0fd7 MFC r1.6: fix unhandled malloc errors. 2005-09-01 07:30:03 +00:00
Gleb Smirnoff e8fc69b98c MFC 1.28:
- Document the fact that the real length of listen queue is 1.5 more
    than the value of backlog argument.
  - Document the fact that a subsequent listen(2) calls on the listening
    socket change the backlog argument.
  - Note that current listen queue lengths can be queried using netstat(1).

  Submitted by:   Igor Sysoev <is rambler-co.ru>
  Wording by:     gnn
2005-08-31 14:02:20 +00:00
Gleb Smirnoff b679fa3817 MFC 1.21:
Add newline to debuging printf.

  PR:             kern/85271
  Submitted by:   Simon Morgan
2005-08-31 13:59:00 +00:00
Giorgos Keramidas 9df3767184 MFC 1.23:
Make it clear that the .ko extention of a module to be loaded
is optional.
2005-08-31 13:58:39 +00:00
Gleb Smirnoff dca79f798a MFC 1.76:
- Refuse hashsize of 0, since it is invalid.
  - Use defined constant instead of 512.
2005-08-31 13:57:04 +00:00
Garrett Wollman 2e7d57d28b Insta-MFC rev 1.21: don't build "systemv" when not doing "backward".
This fixes virgin installs (and thus "make release").
2005-08-31 01:37:43 +00:00
Craig Rodrigues c34bcb2f16 MFC: VOP_LISTEXTATTR.9, 1.7
Update man page to reflect the fact that VOP_LISTEXTATTR
  does not return a list of ASCII NUL terminated strings.
  Instead, a list of attribute names is returned, where each
  list entry consists of one byte for the name length, followed
  by the name, without a terminating ASCII NUL.
  This in similar to change 1.17 to extattr_get_file.2

  Reviewed by: rwatson, ru

MFC: VOP_LISTEXTATTR.9, 1.6
  Minor formatting fixes.
2005-08-31 00:33:18 +00:00
Max Laier e731c8638f MFC: if_ethersubr.c, 1.197:
Don't loop back packets that have been routed by pf.  This fixes an
  endless loop where the same packet is sent over and over again.

  Obtained from:  OpenBSD
  Reported by:    Sergey Lapin
  Tested by:      Sergey Lapin
2005-08-30 16:44:31 +00:00
Nate Lawson 151775d1ac Remove p4tcc now that this is supported by cpufreq(4). 2005-08-30 05:03:32 +00:00
Andre Oppermann f950504427 MFC rev. 1.31 (correct layer 2 broad- and multicast handling).
PR:	kern/85052
2005-08-29 18:51:01 +00:00
Garrett Wollman 26388b1a5b Merge tzdata2005m update from vendor branch. 2005-08-29 17:05:54 +00:00
Maksim Yevmenkin 6b53ec9d3a MFC to RELENG_5
Address minor locking issues. Use taskqueue_swi instead of taskqueue_swi_giant.

Approved by:	re (scottl)
2005-08-29 17:03:51 +00:00
Maksim Yevmenkin 49e4ae56d3 MFC to RELENG_5
Make sure ng_fec_init() uses the same calling convention as the rest of
the code, i.e. ng_fec_init() is called with the ifp->if_softc pointer and
NOT with the ifp pointer.

PR:		kern/85239
Reviewed by:	brooks
Approved by:	re (scottl)
2005-08-29 16:31:51 +00:00
Gleb Smirnoff ab8e151540 Backout last revision, because it exposes a worse problem, than
it fixes. I believe the problem lives somewhere outside ng_ksocket,
but until it is found, let the node be working.

PR:		kern/84952
PR:		kern/82413
2005-08-29 09:04:10 +00:00
Gleb Smirnoff 36f5a840ba MFC 1.87:
In order to support CARP interfaces kernel was taught to handle more
  than one interface in one subnet. However, some userland apps rely on
  the believe that this configuration is impossible.

  Add a sysctl switch net.inet.ip.same_prefix_carp_only. If the switch
  is on, then kernel will refuse to add an additional interface to
  already connected subnet unless the interface is CARP. Default
  value is off.

  PR:				bin/82306
  In collaboration with:	mlaier
2005-08-29 08:59:30 +00:00
Murray Stokely 6353a83c0c MFC: r1.240 - update ports count and space requirement. 2005-08-29 01:16:43 +00:00
Gregory Neil Shapiro e53e055a4d MFC: sendmail 8.13.4 and hoststat(8)/purgestat(8) man page linking
Reminder by:	Terry Kennedy
2005-08-28 04:58:25 +00:00
Tor Egge aee6649b95 MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
2005-08-26 20:40:31 +00:00
Garrett Wollman 603bfe7727 Merge tzdata2005l update from vendor. 2005-08-26 18:54:31 +00:00
Giorgos Keramidas 7b59bc706f MFC revision 1.24:
% Add a small paragraph that describes how the current environment
% settings can be displayed, near the end of the DESCRIPTION section,
% immediately after the paragraph that describes how they can be set.
%
% Add a reference to printenv(1) too (and the ``printenv'' csh builtin).
%
% Submitted by:   Gary W. Swearingen <[email protected]>
% PR:             docs/85008
2005-08-26 10:27:02 +00:00
Maxime Henrion 87b08782fe MFC r1.241:
date: 2005/07/29 22:40:06;  author: mux;  state: Exp;  lines: +1 -0
  Add a new PCI id for fxp(4) cards found on ICH7-based systems.

  Submitted by:   Martin Nilsson <[email protected]>

PR:	kern/84559
2005-08-26 09:22:34 +00:00
Wilko Bulte 10b23b6294 MFC: "about life" 2005-08-25 18:25:47 +00:00
Maksim Yevmenkin d35a651b50 MFC to RELENG_5
Fix multiple typos in the mutex names. This fixes false positive (and pretty
strange looking too) LORs I have seen on my system. Pointy hat to goes to me.

Approved by:	re (scottl)
2005-08-25 16:16:18 +00:00
Craig Rodrigues 242b3d6566 MFC 1.89:
Remove EXAMPLES section which gives a non-POSIX compliant use of the sort
command.  The -S flag to ls does the same thing.

PR:		standards/83919
2005-08-25 00:55:52 +00:00
Giorgos Keramidas a6c41d5888 MFC: Spell "partition" correctly:
> 1.34      +1 -1      src/sbin/ccdconfig/ccdconfig.8
> 1.53      +1 -1      src/sbin/reboot/boot_i386.8

Reminded by:	simon
2005-08-24 15:45:39 +00:00
Simon L. B. Nielsen 74cca03c9d MFC rev 1.35:
Remove reference to raid(4), the RAIDframe manual page, which was
  deleted a while ago.
2005-08-24 08:09:14 +00:00
Pyun YongHyeon 753b2c6420 Merge if_re.c:1.46 from HEAD to RELENG_5:
Use correct pointer type. This should fix non-functional re(4)
  driver on 64bit architectures.
2005-08-24 07:03:35 +00:00
SUZUKI Shinsuke 26d12f71fc MFC 1.55
added a missing unlock (just do the same thing as in netinet/raw_ip.c)

Approved by: re(scottl)
2005-08-24 06:46:16 +00:00
Max Laier bbe411a5e6 MFC: if.c, 1.236
Move eventhandler for 'ifnet_departure_event' at the end of the progress.
  Some of the (IPv6) cleanup functions send packets to inform peers of the
  departure.  These packets confused users of ifnet_departure_event (pf at
  the moment).

  PR:             kern/80627
  Tested by:      Divacky Roman

Forgotten by:	mlaier
2005-08-23 14:25:31 +00:00
Brooks Davis 5c966369ba MFC rev 1.28, removal of pointless -I.. from CFLAGS.
PR:		bin/79229
2005-08-21 00:43:28 +00:00
Hajimu UMEMOTO 72767786e5 MFC 1.34, 1.35:
- avoid exclusive sleep mutex witness warning using sx lock.
  - use TAILQ_FOREACH() for readability.
2005-08-20 12:32:33 +00:00
Gleb Smirnoff 29def03b00 MFC 1.27:
When doing ARP load balancing source IP is taken in network byte order,
  so residue of division for all hosts on net is the same, and thus only
  one VHID answers. Change source IP in host byte order.

  Reviewed by:    mlaier
2005-08-20 10:23:19 +00:00
Remko Lodder 4a2dfae294 MFC:
Document the fact that accept(2) may return EINVAL when addrlen is
  negative (in addition to returning EINVAL when called on a descriptor
  that is not a socket).

  Submitted by:   Arne H Juul <[email protected]>
  PR:             docs/80587

PR:		docs/54995, docs/80587
Prodded by:	rionda
2005-08-20 08:36:56 +00:00
Doug Barton 85f86b56e4 MFC 1.1.1.3, a patch to aid in out of memory conditions. 2005-08-19 22:10:48 +00:00
Brian Somers 1e89a6e334 Connect ichsmb to the build. 2005-08-19 18:54:25 +00:00
Brian Somers 2962a4b8ab MFC: Fix up ichsmb.
Sponsored by:	Sophos/ActiveState
2005-08-19 18:50:16 +00:00
Wilko Bulte 0c0d9c6fbd MFC beachhead and FCAL joke 2005-08-19 17:35:42 +00:00
Gleb Smirnoff 80b0090018 MFC:
Add a new switch -h for interface stats mode, which prints all interface
  statistics in human readable form.

  In collaboration with:	vsevolod
  Reviewed by:			cperciva
2005-08-19 15:24:12 +00:00
Pawel Jakub Dawidek 66f1928bb3 MFC: sys/opencrypto/cryptodev.c 1.26
Fix bogus check. It was possible to panic the kernel by giving 0 length.
This is actually a local DoS, as every user can use /dev/crypto if there
is crypto hardware in the system and cryptodev.ko is loaded (or compiled
into the kernel).

Reported by:    Mike Tancsa <[email protected]>
Security:	Local DoS on systems with crypto HW and with /dev/crypto available
2005-08-19 12:06:40 +00:00
Matt Jacob 6edbb598f0 MFC 1.48: The divide by zero panic must have been due to a bogus
period value. I suppose the BT adapter driver should be
fixed, but more importantly we should protect against
dividing by zero.
2005-08-19 05:03:08 +00:00
Marcel Moolenaar 3f9bbc8695 MFC 1.3: Fix backtraces. 2005-08-19 04:05:30 +00:00
Murray Stokely acab433a01 MFC: Catch up with last few months of changes on HEAD. Correct typos,
correct dates, add entries for Pope John Paul II, etc.
2005-08-19 03:30:44 +00:00
Giorgos Keramidas f987d35b75 Merge spelling fixes from CURRENT. The revisions MFC'ed are:
Revision  Path
  1.9     src/lib/libarchive/archive_entry.3
  1.20    src/lib/libarchive/archive_read.3
  1.9     src/lib/libc/net/inet6_rth_space.3
  1.7     src/lib/libc/posix1e/acl_get_entry.3
  1.14    src/lib/libc/posix1e/mac.3
  1.6     src/lib/libc/posix1e/mac_prepare.3
  1.36    src/lib/libc/stdtime/strftime.3
  1.15    src/lib/libc/sys/kse.2
  1.7     src/lib/libc/sys/uuidgen.2
  1.5     src/share/man/man4/man4.i386/acpi_panasonic.4
  1.39    src/share/man/man4/man4.i386/ep.4
  1.4     src/share/man/man4/man4.i386/snc.4
  1.3     src/share/man/man4/man4.sparc64/snd_audiocs.4
  1.10    src/share/man/man4/witness.4
  1.2     src/share/man/man5/devfs.conf.5
  1.50    src/share/man/man9/ifnet.9
  1.6     src/share/man/man9/printf.9
  1.11    src/usr.bin/file2c/file2c.1
  1.26    src/usr.bin/indent/indent.1
  1.16    src/usr.bin/lockf/lockf.1
  1.89    src/usr.bin/make/make.1
  1.44    src/usr.bin/systat/systat.1
  1.18    src/usr.bin/truss/truss.1
  1.32    src/usr.bin/xinstall/install.1
  1.10    src/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8
  1.3     src/usr.sbin/bluetooth/sdpd/sdpd.8
  1.35    src/usr.sbin/i4b/isdnd/isdnd.rc.5
  1.52    src/usr.sbin/mtree/mtree.8
  1.7     src/usr.sbin/ndiscvt/ndiscvt.8
  1.12    src/usr.sbin/ntp/doc/ntpdc.8
  1.25    src/usr.sbin/pppd/pppd.8
  1.39    src/usr.sbin/syslogd/syslog.conf.5
2005-08-18 15:22:11 +00:00
Ceri Davies f10656edd9 MFC r1.71.
Correct the description of the TAPE environment variable.
  Based on:

PR:             docs/84200
Submitted by:   Gary W. Swearingen <garys at opusnet dot com>
Approved by:    re (hrs)
2005-08-18 11:41:18 +00:00
SUZUKI Shinsuke 07a5e49892 MFC: IPv6 stealth forwarding
Revision  Changes    Path
   1.39      +3 -1      src/sys/netinet6/in6.h
   1.35      +8 -0      src/sys/netinet6/in6_proto.c
   1.30      +8 -0      src/sys/netinet6/ip6_forward.c
   1.34      +3 -0      src/sys/netinet6/ip6_var.h

PR: kern/54625
Approved by: re(kensmith)
2005-08-18 09:39:35 +00:00
Lukas Ertl 9aa5c7c4c2 MFC:
geom_vinum.c        rev. 1.17
  geom_vinum_drive.c  rev. 1.19
  geom_vinum_plex.c   rev. 1.16
  geom_vinum_rm.c     rev. 1.7
  geom_vinum_var.h    rev. 1.9, 1.10
  geom_vinum_volume.c rev. 1.9
2005-08-16 20:55:33 +00:00
Christian Brueffer 4689b6a487 MFC: rev. 1.11
- add missing ether_poll_deregister
- add per-device polling
- move the setting of if_capenable further down so that the
  VLAN caps are honored as well

Approved by:    ru
2005-08-16 20:51:28 +00:00
Maxim Sobolev 9622c6e8d2 MFC: Do not use vm_pager_init() to initialize vnode_pbuf_freecnt variable.
vm_pager_init() is run before required nswbuf variable has been set
to correct value. This caused system to run with single pbuf available
for vnode_pager. Handle both cluster_pbuf_freecnt and vnode_pbuf_freecnt
variableis in the same way.

Tested by:	pre-release.portaone.com
2005-08-16 15:09:44 +00:00
Marcel Moolenaar bb9391f5b8 Sync up with RELENG_6:
o  main.c:1.7.2.1
o  trgt.c:1.2.2.1
2005-08-16 03:52:30 +00:00
Julian Elischer 4114bb082f MFC: reduce warnings when compiled under -W
Obtained from:	Sandvine inc.
2005-08-15 18:51:45 +00:00
Tor Egge fc76c16104 MFC: Check for marker pages when scanning active and inactive page queues. 2005-08-15 15:01:59 +00:00
Tor Egge 5bf44f90e1 MFC: Don't allow pagedaemon to skip pages while scanning active and
inactive page queues due to the vm object being locked.
2005-08-15 14:59:53 +00:00
Suleiman Souhlal 371e5e7547 MFC rev 1.222:
Use atomic operations on runningbufspace.

 PR:             kern/84318
 Submitted by:   ade
2005-08-15 06:26:52 +00:00
Suleiman Souhlal 0bf0e5c0ed MFC rev 1.73:
The kernel is usually at /boot/kernel/kernel nowadays.

 PR:     i386/81756
 Submitted by:   trasz <[email protected]>
2005-08-15 06:18:07 +00:00
Suleiman Souhlal 740438e8ed MFC re 1.10:
it's actually 11 minutes when the machine is assumed to be down and removed
  from the output.

  Obtained from:  DragonFlyBSD
2005-08-15 06:10:13 +00:00
Murray Stokely 6c3ab0af48 MFC: r1.46 - grammar improvements. 2005-08-14 18:53:50 +00:00
Murray Stokely adf9a7ee9b MFC: r1.15 - fix typo. 2005-08-14 18:49:38 +00:00
Bjoern A. Zeeb a6f3984c18 MFC: rev. 1.33 src/sys/net/if_gre.c, rev. 1.20 src/sys/netinet/ip_gre.c
Add support for IPv6 over GRE [1]. PR kern/80340 includes the
 FreeBSD specific ip_newid() changes NetBSD does not have.
Correct handling of non AF_INET packets passed to bpf [2].

PR:		kern/80340[1], NetBSD PRs 29150[1], 30844[2]
Obtained from:	NetBSD ip_gre.c rev. 1.34,1.35, if_gre.c rev. 1.56
Submitted by:	Gert Doering <gert at greenie.muc.de>[2]
2005-08-13 11:31:00 +00:00
Christian Brueffer fe95c50ee4 MFC: rev. 1.42
Remove stray comma
2005-08-12 22:32:55 +00:00
Christian Brueffer 5415f9c4a5 MFC: rev. 1.18
Sort the list of supported hardware.
2005-08-12 22:32:13 +00:00
Nate Lawson 33cc8de902 MFC rev 1.15: use more reasonable boundary for user setting of lowest 2005-08-12 17:26:37 +00:00
Christian Brueffer 70c131f0ce MFC:
More tcpdump 8->1 cleanup.
2005-08-12 16:16:57 +00:00
Nate Lawson 4051add182 Remove CPU_ENABLE_TCC from options also. 2005-08-11 17:19:25 +00:00
Nate Lawson d464541b51 Remove remaining reference to CPU_ENABLE_TCC. It is obsolete with the
cpufreq MFC.

Reported by:	Tijl Coosemans
2005-08-11 17:17:09 +00:00
Stephan Uphoff 755797ddc1 MFC ffs_softdep.c 1.182, softdep.h 1.18
Delay freeing disk space for file system blocks until all
dirty buffers are safely released. This fixes softdep
problems on truncation (deletion) of files with dirty
buffers.
2005-08-10 15:22:17 +00:00
Gleb Smirnoff f032904c4f MFC 1.66:
Use m_uiotombuf() instead of own implementation. This is not just
  a cosmetic change. m_uiotombuf() produces a packet header mbuf, while
  original implementation did not. When kernel is compiled with MAC
  support, headerless mbuf will cause panic.

  Reported by:    Alexander Nikiforenko <asn rambler-co.ru>
  Reported by:    Andrew Korovin <freeside inbox.ru>
  PR:		  kern/77111
2005-08-10 13:59:44 +00:00
Jesus R. Camou a35a5280b9 MFC: config-recursive target.
Approved by:	trhodes (mentor, implicitly)
2005-08-09 23:01:29 +00:00
Jesus R. Camou ddbb2068cc MFC: Information about starting jails
at boot time if specified in rc.conf.

PR:		docs/81040
Submitted by:	matteo
Approved by:	trhodes (mentor)
2005-08-09 21:10:20 +00:00
Giorgos Keramidas 0f3d165d7d MFC 1.35:
# Some grammar, spelling, and mdoc(7) fixes.  No content changes.
#
# PR:		75581
# Submitted by:	Nobuyuki Koganemaru [email protected] (original version)

PR:		docs/84679
Submitted by:	Chris Jones <[email protected]>
2005-08-08 23:37:06 +00:00
John Baldwin 85a8e80ce7 MFC: Fix a bug in pmap_protect() in the PAE case where it could look up the
wrong vm_page_t associated with a pte.

Requested by:	alc
2005-08-08 15:33:53 +00:00
Diomidis Spinellis 259da6636c MFC 1.12 to 1.13
PR:	22612
2005-08-08 12:50:57 +00:00
Diomidis Spinellis 2c864c8a18 MFC 1.19 to 1.22
PR:	22612
2005-08-08 12:50:20 +00:00
Thomas Quinot 70a1fbf024 (atapi_cam_reinit_bus): Guard against the case where atapi_softc_mutex is
not initialized yet (case of the bus being reinitialized during the boot
process).

Note that this change is a fix for RELENG_5 only, not relevant to HEAD.

PR:		kern/84567
Tested by:	Chris Jones <[email protected]>
2005-08-07 20:34:03 +00:00
Christian Brueffer a2e3f00de7 MFC: rev. 1.5
Remove Xref to non-existant usb(3) manpage.
2005-08-07 15:50:59 +00:00
R. Imura 7b5c517906 MFC 1.2: Correctly use a size_t so 64-bit hosts can mount SMB FS's
when using character set conversions.
2005-08-07 10:30:56 +00:00
Markus Brueffer 940839b671 MFC Rev. 1.13
s/Lefler/Leffler/

Approved by:	brueffer
2005-08-06 14:53:25 +00:00
Christian Brueffer 243b787309 MFC: rev. 1.11
Mention that the softc is zeroed after allocation.
2005-08-06 07:27:23 +00:00
Doug Barton e5a60c0362 MFC the removal of threading from BIND.
Original work by:	des
2005-08-06 03:48:18 +00:00
Max Laier d389736d79 MFC: pf.c, 1.35 pfvar.h, 1.12
Prevent a race condition.  As pf_send_tcp() - called for expired synproxy
  states - has to drop the lock when calling back to ip_output(), the state
  purge timeout might run and gc the state. This results in a rb-tree
  inconsistency.  With this change we flag expiring states while holding the
  lock and back off if the flag is already set.

  Reported by:	glebius
2005-08-06 01:54:11 +00:00
Remko Lodder f10df9fc9e Ofcourse FreeBSD-SA-05:19.zlib should have been FreeBSD-SA-05:19.ipsec
Pointed out by:		simon
2005-08-05 21:46:12 +00:00
Remko Lodder ca24bd8c02 Add FreeBSD-SA-05:18.zlib and FreeBSD-SA-05:19.zlib to the errata page's 2005-08-05 21:43:16 +00:00
Bjoern A. Zeeb b7f0ed2f4b MFC rev. 1.220
Correct 32 vs 64 bit signedness issues.
2005-08-05 19:50:05 +00:00
Bjoern A. Zeeb 3b5c7164e2 MFC rev. 1.104
Deal with failed malloc calls[1].
While there also check for failed device_add_child calls.

Found by:	Coventry Analysis tool[1].
Submitted by:	sam[1]
2005-08-05 18:12:17 +00:00
George V. Neville-Neil e709114e46 MFC
Fix for PR 83885.

Make sure that there actually is a next packet before setting
nextrecord to that field.

PR: 83885
Submitted by: [email protected]
Obtained from:  Patch suggested in the PR
2005-08-05 13:30:10 +00:00
George V. Neville-Neil 776b02ae04 Fix for PR 82974. We were not checking that the route looked up in
the case of an RTM_CHANGE was specific, i.e. that it matched completely.  This
led to a route change of a non-existent route changing the default route
as the radix code would simply back track to that point and hand that
route back to the routing socket code.

PR: 82974
Reviewed by: Tai-hwa Liang <[email protected]>
               Ben Kaduk <[email protected]>
               Bjoern A. Zeeb <[email protected]>
Obtained from:  OpenBSD with modifications.
2005-08-05 12:21:14 +00:00
Diomidis Spinellis 667edbb708 MFC version 1.18
Interpret correctly the glob(3) return value.
Previously, interactive commands specifying a non-existent file or
directory used to display an "out of memory error".
2005-08-05 11:14:25 +00:00
Christian Brueffer 1247143223 MFC: rev. 1.28
Mention the default value of PATH and that it may be overridden.
2005-08-04 19:59:32 +00:00
John-Mark Gurney 7ba91eea16 MFC: v1.40 help.common, v1.45 intro.2
Fix a couple documentation issues...
2005-08-01 20:25:41 +00:00
Ruslan Ermilov b96c83eee3 MFC:
1.72: deref correct mbuf ptr to collect any vlan tag
1.73: fix null ptr deref when nge_newbuf is called with an existing mbuf

PR:		75201
2005-08-01 10:05:04 +00:00
Garance A Drosehn c094557f3c MFC *: Add the recently-implemented -v, -P, and -S options, along with
subsequent bug fixes.  While the -S feature is not as useful in RELENG_5
as it is in RELENG_6 and HEAD, for people writing scripts it is useful
if the same features are available in all recent releases.  I intend to
commit this to RELENG_4 too, after a few more weeks.  Since these are
new features, they should not effect any presently-working scripts.

[* = 1.6 env/Makefile, 1.6->1.9 env.1, 1.12->1.16 env.c,
     1.1->1.4 envopts.c, 1.1 envopts.h]

MFC after:	12 days
2005-08-01 02:24:19 +00:00
Maksim Yevmenkin 43f9b51ef6 Insta-MFC to RELENG_5
Fix typo and check correct (rsp) pointer against the NULL value.

Submitted by:	Oliver < urnenfel at tiscali dot es >
Approved by:	re (kensmith)
2005-07-29 16:45:21 +00:00
Hajimu UMEMOTO e37e667814 MFC 1.12: don't accept invalid form of an address like 1:2:3:4:5:6:7::8. 2005-07-29 16:21:33 +00:00
R. Imura d958cd4ffd MFC rev 1.2: Fix core dump when "smbutil lc". 2005-07-29 16:11:18 +00:00
Xin LI 0d3168ebac MFC 1.123:
Allow PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
through umass(4), in order to make cdcontrol(1) to issue commands to a USB
CD driver.

The command IDs were obtained from the CAM subsystem.  This was tested
on half dozen of USB CD drivers from different vendors.

Suggested by:   "intron" <intron at intron dot ac>
PR:             usb/83439
Reviewed by:    sanpei
Approved by:    re (kensmith)
2005-07-29 15:40:34 +00:00
Tai-hwa Liang 921bc0d60a MFC: (1.5) Fixing an off-by-one error. 2005-07-28 14:40:08 +00:00
Giorgos Keramidas 9e6fd8f3c0 MFC:
Makefile	-> 1.58
devfs.conf.5	-> 1.1
devfs.rules.5	-> 1.1

# Add manpages for devfs.conf and devfs.rules.  These have been
# initially written by Roland, but hacked for a while by me.  Any
# good parts are the results of Roland's hard work.  Any typos or
# style mistakes are mine.
#
# Submitted by:   Roland Smith <[email protected]>
# PR:             docs/63808, docs/75433, docs/80458, docs/80459
# MFC after:      2 weeks
2005-07-27 12:03:48 +00:00
Giorgos Keramidas e07638f114 MFC 1.17:
# Expand n't contractions.

MFC: 1.18:
# Document that /etc/rc.d/ntpdate will read this file to find out a
# list of NTP hosts, if ntpdate_hosts is unset or empty.
#
# PR:             conf/79712
# Submitted by:   Tsurutani Naoki <[email protected]>
# mdoc text by:   Matteo Riondato <[email protected]>
2005-07-27 11:53:19 +00:00
Colin Percival 08f9a01323 Correct a buffer overflow which can occur when decompressing a
carefully crafted deflated data stream. [1]

Correct problems in the AES-XCBC-MAC IPsec authentication algorithm. [2]

Submitted by:   suz [2]
Security:       FreeBSD-SA-05:18.zlib [1], FreeBSD-SA-05:19.ipsec [2]
2005-07-27 08:41:56 +00:00
Matthew N. Dodd c958938be7 MFC: 1.13
Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.
2005-07-25 20:22:49 +00:00
Jonathan Chen 32a8fab4a8 MFC of 1.34: fix innetgr() returning false positives and negatives when reverse netgroup matching is used.
PR: 35506
2005-07-25 18:09:03 +00:00
Maksim Yevmenkin 968706d8da MFC to RELENG_5 ng_ubt.c v1.25
Add support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears that
there are at least two versions of the adapter. Version 1 (product ID 0x2200)
of the adapter does not work with ng_ubt(4) and require special driver and
firmware. Version 2 (product ID 0x3800) seems to work just fine, except it
does not have bDeviceClass, bDeviceSubClass and bDeviceProtocol set to required
(by specification) values. This change forces ng_ubt(4) to attach to the
version 2 adapter.

Ignore AVM BlueFRITZ! USB Bluetooth Adapter v1.0 (product ID 0x2200).
It does not work with ng_ubt(4) and require special driver and firmware.

Submitted by:	Rainer Goellner < rainer at jabbe dot de >
Approved by:	re (kensmith)
Obtained from:	Marcel Holtmann < marcel at holtmann dot org >
2005-07-25 16:24:44 +00:00
Robert Watson f5fe66e28e Merge mac_stub.c:1.54 from HEAD to RELENG_5:
Remove duplicate initialization of mpo_create_stub pointer.

  PR:             83779
  Submitted by:   Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>
2005-07-25 09:46:17 +00:00
Roman Kurakin 3e59971055 MFC cx/if_cx.c:
----------------------------
	revision 1.45
	date: 2005/07/09 16:14:05;  author: rik;  state: Exp;  lines: +1 -1
	Use m_length (m, NULL) instead of m->m_pkthdr.len.

	Problems reported by: strijar at urai dot ru
	Approved by:	re (scottl)
	----------------------------
	revision 1.44
	date: 2005/07/09 14:31:48;  author: rik;  state: Exp;  lines: +3 -2
	Lost cx_mpsafenet check.

	Pointy hat:	me
	Approved by:	re (scottl)
	----------------------------
	revision 1.42
	date: 2005/07/09 14:23:42;  author: rik;  state: Exp;  lines: +4 -0
	Lost CX_UNLOCK().

	Pointy hat:	me
	Approved by:	re (scottl)
	----------------------------
	revision 1.41
	date: 2005/07/09 14:03:02;  author: rik;  state: Exp;  lines: +2 -0
	Protect from partially initialized channels.

	Approved by:	re (scottl)
2005-07-25 07:09:52 +00:00
Roman Kurakin a7df01c10f MFC ctau/if_ct.c:
----------------------------
	revision 1.25
	date: 2005/07/09 16:14:05;  author: rik;  state: Exp;  lines: +1 -1
	Use m_length (m, NULL) instead of m->m_pkthdr.len.

	Problems reported by: strijar at urai dot ru
	Approved by:	re (scottl)
	----------------------------
	revision 1.24
	date: 2005/07/09 14:03:02;  author: rik;  state: Exp;  lines: +2 -0
	Protect from partially initialized channels.

	Approved by:	re (scottl)
2005-07-25 07:09:15 +00:00
Roman Kurakin 74932b319e MFC cp/if_cp.c:
----------------------------
	revision 1.24
	date: 2005/07/09 16:14:04;  author: rik;  state: Exp;  lines: +1 -1
	Use m_length (m, NULL) instead of m->m_pkthdr.len.

	Problems reported by: strijar at urai dot ru
	Approved by:	re (scottl)
	----------------------------
	revision 1.23
	date: 2005/07/09 14:03:02;  author: rik;  state: Exp;  lines: +2 -0
	Protect from partially initialized channels.

	Approved by:	re (scottl)
2005-07-25 07:08:26 +00:00
R. Imura a7d649dfcb MFC 1.45: Fix looking up files having invalid short name.
PR:		77074
2005-07-23 17:05:00 +00:00
Pawel Jakub Dawidek 5ebb071577 MFC: pf 1.7
When reloading rules via rc.d/pf, flush everything but existing state
entries that way when rules are read in, it doesn't break established
connections.

OK'ed by:	mlaier
Forgotten by:	seanc
2005-07-23 12:18:35 +00:00
Jonathan Chen 17511c8cd7 fix that little lie I told six months ago about doing an MFC in 3 days...
MFC from 1.33: remember to reset nextgrp in getnetgrent(), so that subsequent calls to getnetgrent() doesn't return bogus information.
2005-07-22 22:11:13 +00:00
Bruno Ducrot bb824b7b7b MFC: cpufreq man pages updates, revs 1.6 through 1.11.
Approved by:	ru, njl, imp (mentor)
2005-07-22 06:58:04 +00:00
Bruno Ducrot 4cac1d5851 MFC: Import the powerd(8) daemon.
Approved by:	njl, imp (mentor)
2005-07-21 09:35:33 +00:00
Bruno Ducrot c1ad43f11f MFC: add all other cpufreq specific drivers that do not belong to acpi.
Approved by:	njl, imp (mentor)
2005-07-21 09:20:10 +00:00
Bruno Ducrot a861b1a1cb MFC: update acpi to current cpufreq interface, add the acpi_perf cpufreq
driver.  Do not include yet thermal stuff from ume@ since this need more
testing in -current.

Approved by:	njl, imp (mentor)
2005-07-21 08:50:26 +00:00
Bruno Ducrot 3866abd679 MFC 1.14: bring up cpufreq interface up to date.
Approved by:	njl, imp (mentor)
2005-07-21 08:46:20 +00:00
Hartmut Brandt a8100eca2f MFC 1.123
Fix a longstanding bug with the .END target. Need to pass the ENDNode
to the Run function instead of some random node.

PR:		bin/83698
Submitted by:	Max Okumoto <[email protected]>
2005-07-20 19:16:25 +00:00
cvs2svn 75b4dab603 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-07-20 18:59:26 +00:00
Simon L. B. Nielsen 6468264ebf Add FreeBSD-SA-05:17.devfs. 2005-07-20 14:04:14 +00:00
Simon L. B. Nielsen ef3afc272d MFC rev 1.116 of src/sys/fs/devfs/devfs_vnops.c:
Correct devfs ruleset bypass.

Submitted by:	csjp
Reviewed by:	phk
Security:	FreeBSD-SA-05:17.devfs
Approved by:	cperciva
2005-07-20 13:35:44 +00:00
Pawel Jakub Dawidek aa4c13e62d MFC: g_concat.c 1.25
g_stripe.c	1.26

Before calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know
to destroy it.

PR:		kern/81758
Submitted by:	trasz <[email protected]>
2005-07-20 13:15:11 +00:00
Robert Watson e38324af70 Merge ip_input.c:1.302 from HEAD to RELENG_5:
Remove spl() calls from ip_slowtimo(), as IP fragment queue locking was
  merged several years ago.
2005-07-20 12:04:14 +00:00
Robert Watson c9879bb61f Merge if_sbsh.c:1.13 from HEAD to RELENG_5:
Mark if_sbsh as IFF_NEEDSGIANT, because it does.
2005-07-20 10:01:36 +00:00
Robert Watson 7daec6c566 Merge if_cnw.c:1.19 from HEAD to RELENG_5:
Mark if_cnw as IFF_NEEDSGIANT, because it does.
2005-07-20 10:01:15 +00:00
Doug White 2e2642d737 MFC: Undo 5.4-R bge hacks by default and provide kernel option to override. 2005-07-20 06:04:21 +00:00
Pawel Jakub Dawidek 424772c7d7 MFC: geom_raid3.c 1.12
Don't forget to initialize 'id' field.
2005-07-18 16:15:56 +00:00
Joe Marcus Clarke db1e62a42c MFC: revs 1.23 and 1.24
* Replace fch{mod,own} with straight ch{mod,own} as the former cannot be used
  on socket file descriptors
* Open permissions on /var/run/devd.pipe so that any user can read devd events
  from this socket
* Enable non-blocking I/O on devd.pipe to keep clients from wedging devd.
  If a write(2) on devd.pipe would block, the client in question will be
  removed

Approved by:	imp
2005-07-18 14:13:18 +00:00
Sheldon Hearn 6c51de9f3a MFC rev 1.34: regen 2005-07-18 07:46:21 +00:00
Robert Watson ed1e925594 Merge sem_init.3:1.18, sem_post.3:1.15, sem_wait.3:1.13 from HEAD to
RELENG_5:

  Cross-reference sem_getvalue(3) from several other semaphore-related
  functions.
2005-07-17 19:34:37 +00:00
Xin LI f6d4ae3d07 MFC revision 1.13
date: 2005/07/13 10:40:07;  author: delphij;  state: Exp;  lines: +7 -4
Better memory handling:

 - It is acceptable to call free(3) when the given pointer itself
   is NULL, so we do not need to determine NULL before passing
   a pointer to free(3)
 - Handle failure of malloc(3)

Submitted by:	Dan Lukes <dan at obluda cz>
PR:		bin/83352
Approved by:	re (scottl)
2005-07-17 17:29:22 +00:00
Christian Brueffer 6d272bfc1b MFC: rev. 1.321
MLINK firewire.4 to ieee1394.4
2005-07-17 14:50:07 +00:00
Hiroki Sato 003850028e MFC: Add support for IODATA USB-RSAQ3 USB-Serial Adapter.
Reported by:    Tomokazu Hirai
2005-07-16 09:15:55 +00:00
Ruslan Ermilov 09ba3c738f MFC: 1.3: Fixed two bugs in the Perl to C conversion. 2005-07-15 15:32:00 +00:00
Markus Brueffer 4635e9f5cd MFC: rev. 1.5 + 1.6
- Grammar fixes
- s/spdcontrol/sdpcontrol/
- Added the EXIT STATUS section where appropriate

Approved by:	brueffer
2005-07-14 20:17:18 +00:00
John Baldwin 3d254d5163 Regen. 2005-07-14 19:09:49 +00:00
John Baldwin 75bb308049 MFC: Add the preadv() and pwritev() system calls. 2005-07-14 19:08:22 +00:00
John Baldwin a1407e0211 MFC 1.143: Use ssize_t for cnt in dofile{read,write}() rather than long. 2005-07-14 18:59:58 +00:00
John-Mark Gurney 84d388d310 MFC: v1.68 of pkg_create.1, v1.50 of plist.c
remove a few uses of the word `really'
2005-07-12 06:58:03 +00:00
John Baldwin 6954165841 MFC: Increase the maximum number of USB busses to 40. 2005-07-11 17:22:13 +00:00
John Baldwin 9e9ec8ce76 MFC: Fix what(1) on kernel binaries by axeing sccspad[] and duplicating the
first line of version[] in sccs[].
2005-07-11 17:18:53 +00:00
John Baldwin 3dfd97543f MFC: Increase MAXCPU to 16 for SMP kernels to cope with APIC IDs >= 8. 2005-07-11 17:16:18 +00:00
Ken Smith 3483214d1e MFC v1.2, Add -D_FREEFALL_CONFIG to CFLAGS via Makefile so that just
defining _FREEFALL_CONFIG in /etc/make.conf is all that is required
for the clusterisms to take effect.
2005-07-11 13:25:54 +00:00
Ken Smith 0d94b93828 MFC v1.16, Add -D_FREEFALL_CONFIG to CFLAGS via Makefile so that just
defining _FREEFALL_CONFIG in /etc/make.conf is all that is required
for the clusterisms to take effect.
2005-07-11 13:22:13 +00:00
Ken Smith 5af2ffc7cb MFC v1.15, Add -D_FREEFALL_CONFIG to CFLAGS via Makefile so that just
defining _FREEFALL_CONFIG in /etc/make.conf is all that is required
for the clusterisms to take effect.
2005-07-11 13:16:26 +00:00
Xin LI 9ba0d4d4d8 MFC 1.47:
Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the
situation.  One can exercise this bug by referring a dangling link with
something like */the-link.

Submitted by:   Simon 'corecode' Schubert [corecode fs ei tum de]
Obtained from:  NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly
                rev. 1.6)
2005-07-10 15:17:53 +00:00
Hiroki Sato d3f44a4d17 MFC:
$jail_<name>_flags for rc.d/jail, and
	pkg_version(1) -I flag.
2005-07-10 03:47:21 +00:00
Maxim Sobolev df27ad23e3 MFC (sort of): revert k_lock member to be of type void* and use explicit
casts to struct mtx* where necessary, like it's done the version that
has been committed into the HEAD.

Light shed by:	scottl
2005-07-09 04:00:42 +00:00
David E. O'Brien 23059e6635 Add additional sub-systems to the warning users get when they build a
kernel that has become GPL infected.
2005-07-08 00:00:05 +00:00
David E. O'Brien acc961c873 MFC: rev. 1.5: later options nullify mutually exclusive earlier options. 2005-07-07 22:55:40 +00:00
Marcel Moolenaar 5160e33f11 MFC rev. 1.113: Handle B-unit break instructions. 2005-07-06 20:02:05 +00:00
Marcel Moolenaar 1f74b10f72 MFC rev. 1.112: Copyright update. 2005-07-06 19:56:34 +00:00
Marcel Moolenaar fbbb9c7b3c MFC rev. 1.111: Cosmetic: s/u_int64_t/uint64_t/g 2005-07-06 19:53:38 +00:00
Simon L. B. Nielsen f20375f4d4 Add FreeBSD-SA-05:16.zlib. 2005-07-06 14:27:35 +00:00
Colin Percival a0a4f0c485 MFC rev. 1.6 of src/lib/libz/inftrees.c:
Correct a buffer overflow which occurred in the handling of some
  particularly corrupt deflated data streams.

Security:	FreeBSD-SA-05:16.zlib
2005-07-06 14:01:11 +00:00
Paul Saab 892f3e2166 MFC: 1.279
Fix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
does not clear tlen and frees the mbuf (leaving th pointing at freed
memory), if the data segment is a complete duplicate.
2005-07-05 19:25:42 +00:00
Hideyuki KURASHINA f42c16eb99 MFC: dev.sgml (rev 1.282)
bs driver was already removed.

    Reviewed by:	nyan
2005-07-04 14:30:18 +00:00
Colin Percival dd958362c5 MFC revisions 1.174-1.175: Document some limitations of uid/gid rules. 2005-07-04 08:29:11 +00:00
Dag-Erling Smørgrav 8fe97c87d2 MFC: (1.9) honor dumpdev kenv variable if rc.conf specifies AUTO. 2005-07-04 02:36:17 +00:00
Maxim Sobolev 869d818c8c Unbreak ndis(4) when it's statically compiled into the kernel. 2005-07-03 20:46:57 +00:00
Stephan Uphoff 9fbfd56d6a MFC: kern/kern_switch.c 1.112, 1.114-1.116
kern/sched_4bsd.c 1.74 1.75

Fix some race conditions for pinned threads that may cause them to run
on the wrong CPU.

Add IPI support for preempting a thread on another CPU.
( To reduce diff for future MFCs, The required MD Part to support
  IPI preemption is not part of this MFC)
2005-07-03 20:08:04 +00:00
Stephan Uphoff 703ac63cc3 MFC: 1.9 Zero terminate empty string in kdb_sysctl_available. 2005-07-03 19:35:15 +00:00
Hiroki Sato b55d92224b Remove SA-05:12.bind9 because it is not applicable to 5.4R.
Submitted by:	Daniel Gerzo
PR:		www/82798
2005-07-03 13:46:30 +00:00
Pawel Jakub Dawidek 51b4b5f957 MFC: rc.d/jail 1.23
defaults/rc.conf	1.252

Introduce new per-jail variable jail_<name>_flags, which allows to specify
jail(8) flags (before the change we had hardcoded "-l -U root").

Submitted by:	Frank Behrens <[email protected]>
PR:		conf/80244
2005-07-03 12:40:13 +00:00
Dag-Erling Smørgrav 8779fc1a28 MFC: (1.75, 1.76) flush the send side rather than shut it down. 2005-07-03 10:40:23 +00:00
Daniel Harris 5851dfeecf MFC revs 1.23-4 and re-add the "command" command. 2005-07-03 01:49:58 +00:00
Xin LI c35c0f73fb MFC revision 1.52
date: 2005/06/28 02:23:56;  author: delphij;  state: Exp;  lines: +1 -1
Correct a comment in ucred.h.

Submitted by:	Wojciech A. Koszek <dunstan at freebsd czest pl>
PR:		kern/82708
2005-07-02 20:14:18 +00:00
Stefan Farfeleder 0bc528c465 MFC 1.7: Add _Qp_cmp() and _Qp_cmpe(). 2005-07-01 16:55:50 +00:00
Pawel Jakub Dawidek dbe6084140 MFC: kern_ktrace.c 1.100,1.101
Fix information leaks from ktrace(2).

OK'ed by:	rwatson
2005-07-01 00:30:50 +00:00
Bruce A. Mah 5951c223b4 List new security advisories: SA-05:13.ipfw, SA-05:14.bzip2,
SA-05:15.tcp.
2005-06-30 19:39:45 +00:00
Bruce A. Mah 12b17b1ab7 MFC: SA-05:10.tcpdump, SA-05:11.gzip, SA-05:13.ipfw, SA-05:14.bzip2,
SA-05:15.tcp.  (Basically make sure all applicable security advisories
are listed.)

While here, also add a missing word in autoboot note.
2005-06-30 18:40:37 +00:00
Mike Makonnen df5647e6e8 MFC:
Sync description of IP portrange sysctls with reality.
2005-06-30 13:11:48 +00:00
Simon L. B. Nielsen 9ce41d7659 Correct ipfw packet matching errors with address tables.
Security:	CAN-2005-2019
Security:	FreeBSD-SA-05:13.ipfw

Correct bzip2 denial of service and permission race vulnerabilities.

Obtained from:	Redhat, Steve Grubb via RedHat
Security:	CAN-2005-0953, CAN-2005-1260
Security:	FreeBSD-SA-05:14.bzip2
Approved by:	obrien

Correct TCP connection stall denial of service vulnerability.

A TCP packets with the SYN flag set is accepted for established
connections, allowing an attacker to overwrite certain TCP options.

Security:	CAN-2005-2068
Security:	FreeBSD-SA-05:15.tcp

Approved by:	cperciva
2005-06-29 21:38:48 +00:00
Max Laier 8781a3f0b4 MFC: pf_ioctl.c, 1.20 if_pfsync.h, 1.7 and if_pfsync.c, 1.16-1.19
Defer ip_output of pfsync updates to an independent callout thread instead
  of just dropping the lock around the ip_output call.  This used to cause
  corrupted state tree walks for some call-paths.

  Mark pf callouts as NET_MPSAFE.

Tested by:  Sascha Luck, Matthew Grooms and pfsense.org (via Scott Ullrich)
2005-06-29 19:12:14 +00:00
Paul Saab 10f5839822 MFC:
Wrap copyin/copyout for kevent so the 32bit wrapper does not have
to malloc nchanges * sizeof(struct kevent) AND/OR nevents *
sizeof(struct kevent) on every syscall.
2005-06-29 18:08:31 +00:00
John Baldwin 5c8d132dcc MFC: Clear devinfo_generation in devinfo_free(). 2005-06-29 15:37:01 +00:00
John Baldwin 896e632e04 MFC 1.50: Don't ignore VESA devices that claim to be non-VGA devices. This
fixes VESA on vmware.
2005-06-29 15:33:23 +00:00
John Baldwin acd7249a15 MFC revs 1.290 and 1.291: Don't enable I/O or memory mode in a device's
command register for BARs with a base of 0.
2005-06-29 15:25:01 +00:00
John Baldwin f22f32f8d2 MFC revs 1.18 and 1.19 to fix random(6) on 64-bit platforms.
PR:		amd64/81279
2005-06-29 15:20:05 +00:00
Hideyuki KURASHINA ac600ee433 Merge the following from the English version:
1.227.2.26.2.2 -> 1.227.2.31	hardware/common/dev.sgml

Update a Japanese override of dev-auto.sgml.
2005-06-28 16:46:19 +00:00
Hideyuki KURASHINA c8f4ac20d3 Merge the following from the English version:
1.5   -> 1.5.2.1	hardware/common/artheader.sgml
	1.256 -> 1.227.2.26.2.2	hardware/common/dev.sgml
	1.7   -> 1.9		hardware/ia64/proc-ia64.sgml

Update a Japanese override of dev-auto.sgml.

Submitted by:	Ryusuke Suzuki <ryusuke at nucl dot sci dot hokudai dot ac dot jp>
Reference:	[doc-jp-work 1116, 1158]
2005-06-28 15:57:30 +00:00
David Xu d245115713 MFC Revision 1.123:
Fix off-by-one nanosecond in macro TIMESPEC_ADD.
2005-06-28 05:46:49 +00:00
Xin LI 5147c56095 MFC revision 1.20
date: 2005/06/14 10:56:02;  author: ru;  state: Exp;  lines: +3 -3
When IPC_NOWAIT is set and there is no message, msgrcv() fails
with errno set to ENOMSG.

PR:		docs/82217
2005-06-27 11:07:48 +00:00
Tai-hwa Liang 480c21d448 MFC: (1.154) Fixing a memory leak in xpt_release_device(). 2005-06-27 02:51:03 +00:00
Tom Rhodes 6b8fa54310 MFC:
According to the information on:
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS.  Leave the prototype in string.h for
now, for backwards compat.

PR:		74751
Submitted by:	Craig Rodrigues <[email protected]>
Discussed with:	das
2005-06-27 01:54:40 +00:00
Tom Rhodes 82bee6bb58 Sync up to CURRENT, effectively closing:
PR:	76981
2005-06-27 00:04:24 +00:00
Brian Feldman d35720f9db MFC: fix for NFS client deadlock with exceptionally large write sizes.
src/sys/kern/vfs_bio.c r1.489, src/sys/nfsclient/nfs_bio.c r1.151-152,
     src/sys/nfsclient/nfs_vfsops.c r1.177, src/sys/nfsclient/nfsargs.h r1.68,
     src/sys/nfsclient/nfsmount.h r1.30, src/sys/sys/buf.h r1.186,
     src/sys/sys/bufobj.h r1.15
2005-06-26 23:55:50 +00:00
Eric Anholt 74fb73dfc2 MFC r1.24, which should fix failure to probe for many:
Backout the code which tries to use undocumented way to determine if
  fm801 has sound capabilities or not. Unfortunately this code doesn't
  work as expected.

PR:		kern/45182, kern/48738, kern/82107
Submitted by:	many
2005-06-26 20:51:17 +00:00
Maxim Konovalov 4487f22b09 MFC rev. 1.19 sys/kern/uipc_accf.c to sys/kern/uipc_accf.c and
sys/kern/uipc_socket.c, bug fixes for: setsockopt(2) cannot remove accept
filter, getsockopt(SO_ACCEPTFILTER) always returns success on listen socket.

MFC rev. 1.4 tools/regression/sockets/accf_data_attach/accf_data_attach.c:
Add regression tests for these bugs.
2005-06-26 06:59:50 +00:00
R. Imura b5d5f717ab MFC r1.57: Fix udf_iconv on amd64. 2005-06-25 15:01:00 +00:00
R. Imura 5f9c72b7c3 MFC: iconv_xlat16.c r1.3, iconv.h r1.10
Fix kiconv on the 64bit plathomes.

PR:	amd64/75488, amd64/77470
2005-06-25 14:59:11 +00:00
Hiroki Sato 8f9dc78a57 MFC: Document NetBSD 2.0.2.
Submitted by:	SODA Noriyuki (soda at NetBSD dot org)
PR:		doc/82619
2005-06-25 07:10:09 +00:00
Christian Brueffer fc56901150 MFC: rev. 1.19
Whitespace cleanup from last commit.

Translators can ignore this.
2005-06-24 16:06:49 +00:00
Christian Brueffer 70087308bb MFC: rev. 1.18
Limit entries to their respective architectures.  We don't need e.g.
ISA troubleshooting in the amd64 installation guide.

Also note that amd64 and ia64 use ACPI.
2005-06-24 16:03:56 +00:00
Colin Percival d8c70ae2fc MFC the addition of sha256 to libmd and md5(1).
Also, bump __FreeBSD_version so that ports code knows that sha256 is
now in the base system.

Requested by:	Lots of people
2005-06-24 13:32:25 +00:00
Hiroki Sato 1997ef73a5 Document floppy disk based installation is not supported
on FreeBSD/sparc64 now.

Pointed out by:	Brett D.Estrade (estrabd at mailcan dot com)
2005-06-24 09:05:49 +00:00
Hiroki Sato bd01763e27 Document FreeBSD/sparc64 graphical console issue on 5.4R.
Discussed with and submitted by:	marius
2005-06-24 08:52:41 +00:00
Ceri Davies acf2812fdc Remove an extra 't' that I inexplicably managed to insert during the
last commit.

Pointy hat awarded by: 	ru
2005-06-23 22:45:22 +00:00
Ceri Davies 17b5272619 MFC r1.17:
A lot of people may want to submit PRs from systems that are not
    connected to the Internet or systems that do not have a correctly
    configured email subsystem.  Now that the send-pr web interface has
    antispam protection, mention that it is ok to use it for submitting
    problem reports.
2005-06-23 22:31:08 +00:00
Ceri Davies 682e317946 MFC r1.18:
1. Add the threads and usb categories.
	2. Fill in the blanks on the advocacy category.
	3. Expand a contraction while I'm in here.
2005-06-23 22:28:05 +00:00
Peter Wemm 0fff3093a2 MFp4: oops, the amd64 crash dump code was using the i386 dump version. 2005-06-23 19:54:26 +00:00
Peter Wemm 5c6fe3a2eb MFp4: fix comment about copyin/out and fubyte family. There is no dos
emulator and no 386 protection emulation needed.
2005-06-23 19:51:25 +00:00
Peter Wemm 0a9e58c15b MFp4: Various s/386/amd64/ fixes 2005-06-23 19:49:20 +00:00
Peter Wemm b026ada0ea Fix a source of 'trap xxx with interrupts disabled'. This was a cut/pasto. 2005-06-23 19:46:29 +00:00
Gleb Smirnoff 693491651b MFC:
- style(9) fixes from ru (rev. 1.58)
 - fix exit status for get and set command (rev. 1.57, 1.58)
2005-06-23 07:34:07 +00:00
David Xu 5485a173c5 MFC Revision 1.306:
> Fix a bug relavant to debugging, a masked signal unexpectedly interrupts
> a sleeping thread when process is being debugged.
>
> PR: GNU/77818
> Tested by: Sean C. Farley <sean-freebsd at farley org>
2005-06-23 05:50:58 +00:00
David Xu 9f2a7175bf MFC Revision 1.216:
> Remove sleep queue hack, it is no longer needed with current sleep queue.
> Actually, it causes process to hang when it is being debugged.
>
> PR: gnu/77818
2005-06-23 04:44:09 +00:00
Greg Lehey e2c795e172 MFC: Clarify that gif doesn't do GRE tunnels. 2005-06-22 03:06:12 +00:00
Dag-Erling Smørgrav 746fb98fdd MFC: (1.9) add zless script 2005-06-20 07:13:01 +00:00
Dag-Erling Smørgrav 2fb5c15c16 Bring in from HEAD. 2005-06-20 07:12:48 +00:00
Dag-Erling Smørgrav b4b31e9f27 MFC: (1.2) fall back on cat, exec the handlers 2005-06-20 07:11:24 +00:00
Dag-Erling Smørgrav 0c57e0a6c2 MFC: (1.23) don't use cast as lvalue; make it obvious we don't support IPv6 2005-06-20 07:07:36 +00:00
Dag-Erling Smørgrav ea2b8cc1d8 MFC: (1.13) don't free(sock) before it's even allocated. 2005-06-20 07:06:32 +00:00
cvs2svn 43d4dcaacc This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-06-20 03:43:26 +00:00
Marcel Moolenaar 12377f8dcd MFC: Include the puc(4) bus frontend for ppc(4).
PR: kern/80737
2005-06-20 01:25:34 +00:00
Doug White 6995a0cf48 MFC rev 1.292: Mask off the type bits when comparing the base address,
and restore the old value if zero.
2005-06-19 20:06:05 +00:00
Doug White 9df7e8c482 MFC rev 1.214: Fix passthrough allocation case 2005-06-19 20:02:24 +00:00
Christian S.J. Peron a6c33bb510 MFC revision 1.105
date: 2005/06/10 04:44:38;  author: csjp;  state: Exp;  lines: +1 -1
Correct grammar error in comment
2005-06-19 07:30:09 +00:00
Christian Brueffer bf3f44ae80 MFC: rev. 1.24
Remove the obsolete device count.
2005-06-19 06:48:42 +00:00
Christian Brueffer 262d39c7bb MFC: rev. 1.73
Remove Xref to mount_hpfs(8), it's not hooked up to the build.
2005-06-19 06:47:29 +00:00
Christian Brueffer 98c3a5aaea MFC: rev. 1.2
Remove Xref to nonexistant smapi(9).

Submitted by:	markus
2005-06-19 06:46:28 +00:00
Marcel Moolenaar db36695fc3 MFC rev 1.22: In uart_cnprobe(), fill in the cn_name field of the
consdev structure.
2005-06-18 01:04:48 +00:00
Marcel Moolenaar a33574b88f MFC rev 1.11: Fix using uart(4) as the serial console on a ds10. 2005-06-18 00:48:53 +00:00
Brian Feldman 260df4b8ea MFC: r1.101
Invoke the transmission of IPFW's stateful keep-alives once the
     locks have been dropped, thus preventing a deadlock between
     IPFW and the ifnet.
2005-06-17 23:56:59 +00:00
Brian Feldman a02fbaf8a5 MFC: ipfw.8 r.1.172, ip_fw2.c r.1.100
Properly document the IPFW ALTQ first-match behavior that was
     intended, as well as actually implementing it.
2005-06-17 23:30:32 +00:00
Bernd Walter ff3ee9ac58 MFC: usbdevs Rev 1.227 device ID for FT2232 chips
uftdi.c Rev 1.22 support for FT2232 chips
	     Rev 1.21 remove useless usbd_errstr

Reminded by: Mike Tancsa <[email protected]>
2005-06-17 14:15:27 +00:00
John Baldwin 63ccfdabb9 MFC: Remove the remaining references to boot_userconfig and RB_CONFIG. 2005-06-16 18:54:26 +00:00
John Baldwin 4c17fa639c MFC: Remove obsolete and scary note. The loader has worked fine for
several years now.
2005-06-16 18:42:02 +00:00
John Baldwin 4b6509a768 MFC: Add support to the loader for multiple consoles. 2005-06-16 18:40:34 +00:00
John Baldwin 6fbb9ac342 MFC: Remove some more userconfig cruft. 2005-06-16 18:36:34 +00:00
John Baldwin da6888ab83 MFC: Fix a warning by adding a missing 'const'. 2005-06-16 18:25:48 +00:00
John Baldwin 296b4b859d MFC: Remove one of the last vestiges of the old userconfig support. 2005-06-16 18:23:32 +00:00
John Baldwin 0b10be7b8e MFC: Print out the commands from /boot.config after parsing them so that
the output is sent to the correct console(s).
2005-06-16 18:22:06 +00:00
Dejan Lesjak 991e283673 MFC BSD.x11-4.dist rev. 1.27:
Move couple of directories out of mtree and into their respective
ports. This mtree now specifies basic structure of X11BASE, similarly
to BSD.local.dist.
2005-06-16 08:50:41 +00:00
Christian Brueffer 1ef10bced0 MFC: rev. 1.92 + 1.93
Hex strings are _pre_ceded by 0x, not _pro_ceeded.

PR:		82187
Submitted by:	Anthony Rogers <[email protected]>
		David Adam <[email protected]>
2005-06-16 08:03:58 +00:00
Pawel Jakub Dawidek 088cc64077 MFC: kern_ktrace.c 1.99
Remove process information leak from inside a jail, when
security.bsd.see_other_uids is set to 0, etc.
One can check if invisible process is active, by doing:

	# ktrace -p <pid>

If ktrace returns 'Operation not permitted' the process is alive and
if returns 'No such process' there is no such process.
2005-06-16 07:25:27 +00:00
Maxim Sobolev 8ac6613e87 MFC: recursive package creation move (-R). 2005-06-15 10:35:14 +00:00
Hiroki Sato 92aefb2eb0 Enable table endnotes in printed version. The footnote number
will be "a,b,c,..." independently from footnotes in the document
body, and content of the footnotes will be put just after the table.
2005-06-15 08:46:01 +00:00
Wilko Bulte 771a93d179 MFC:
Empty CMOS batteries can cause agony with your AlphaBIOS versus
SRM selection.

Found out the hard way by: gallatin
2005-06-14 17:43:40 +00:00
Robert Watson 99157b4eda Merge tcp_usrreq.c:1.123 from HEAD to RELENG_5:
Assert tcbinfo lock, inpcb lock in tcp_disconnect().
  Assert tcbinfo lock, inpcb lock in in tcp_usrclosed().
2005-06-14 12:01:03 +00:00
Robert Watson 55177f9e7f Merge tcp_subr.c:1.227 from HEAD to RELENG_5:
Assert that tcbinfo is locked in tcp_input() before calling into
  tcp_drop().
2005-06-14 11:59:46 +00:00
Robert Watson 6aa557d286 Merge tcp_input.c:1.275 from HEAD to RELENG_5:
Assert that tcbinfo is locked in tcp_input() before calling into
  tcp_drop().
2005-06-14 11:59:20 +00:00
Robert Watson 24f06cc8d8 Merge tcp_input.c:1.274 from HEAD to RELENG_5:
Assert the tcbinfo lock whenever tcp_close() is to be called by
  tcp_input().
2005-06-14 11:58:40 +00:00
Robert Watson 4728af25c8 Merge tcp_usrreq.c:1.122 from HEAD to RELENG_5:
Assert tcbinfo lock in tcp_attach(), as it is required; the caller
  (tcp_usr_attach()) currently grabs it.
2005-06-14 11:57:44 +00:00
Robert Watson 6e52e2c899 Merge in_pcb.c:1.164-1.165 from HEAD to RELENG_5:
Assert pcbinfo lock in in_pcbdisconnect() and in_pcbdetach(), as the
  global pcb lists are modified.

  Commit correct version of previous commit (in_pcb.c:1.164).  Use the
  local variables as currently named.
2005-06-14 11:57:06 +00:00
Vinod Kashyap 00692201fa Update the driver version. 2005-06-13 17:47:10 +00:00
Vinod Kashyap 39b2e4f116 MFC: Acquire Giant before making some CAM calls that need Giant to be held.
MFC after:2 days
2005-06-13 17:46:10 +00:00
Hiroki Sato 1e786660a9 Fix security advisory table in the printed version.
XXX: generating footnotes from <ulink> in <table> has
     been disabled temporarily because it will put wrong
     footnote number and does not respect (define bop-footnotes #t).
2005-06-13 17:13:24 +00:00
Maxim Konovalov 95048f37a6 MFC rev. 1.99: teach login(1) to respect "hushlogin" and "nocheckmail"
attributes defined in user's $HOME/.login_conf.
2005-06-13 12:27:06 +00:00
Maxim Konovalov 7eeff881af MFC rev. 1.37: missed colon in getopt(3) argument makes tftpd(8) crash. 2005-06-13 12:19:31 +00:00
Benno Rice 84ca6d262d MFC: Identify the Intel ICH4 EHCI controller. 2005-06-13 09:00:19 +00:00
Marcel Moolenaar d2a2f1a168 MFC: Refactor the NETSMBCRYPTO option. 2005-06-13 04:45:58 +00:00
Hiroki Sato 3bad2663ce Use a simple table for security advisories applicable to the
release.  This will be automated in some way.

Discussed with:	bmah and simon
2005-06-12 13:51:51 +00:00
Lukas Ertl 70443ffdf2 MFC:
When a drive dies, don't call g_wither_geom() directly, but instead
   post an event to the geom event queue that will take care of it,
   letting outstanding bios finish, and closing the consumers.

   Plus some cosmetic clean ups.
2005-06-12 12:18:22 +00:00
Christian Brueffer 6cfd7d2c39 MFC: rev. 1.32
Add the Dell PERC 4/IM as supported.
2005-06-12 11:34:37 +00:00
Kirill Ponomarev bf6bb7bcc9 MFC: main.c:1.5, perform.c:1.12, pkg_version:1.33, version.h:1.4
date: 2005/05/24 08:26:44;  author: cperciva;  state: Exp;  lines: +1 -0
  Add an -I option to pkg_version:

    -I  Use only the index file for determining if a package is out of
        date.  This is much faster than using the version number from a
        port's Makefile, at the expense of potentially giving an incor-
        rect result if the index file is out of date.

  Without this option, the index file is only consulted if "make -V PKGNAME"
  cannot be used.
2005-06-12 08:24:09 +00:00
Pawel Jakub Dawidek 70867fd404 MFC: kern_linker.c 1.116,1.117
Prevent loading modules with are compiled into the kernel.
2005-06-11 13:12:39 +00:00
Max Laier 1c951642e0 MFC: pfil.c, 1.13:
Fix semantics of ph_busy_count == -1 to pass instead of block.

  PR:             kern/81128
  Submitted by:   Joost Bekkers
2005-06-11 06:21:37 +00:00
Marcel Moolenaar 6c0dfabdc7 MFC rev. 1.4: Fix getsecs(). 2005-06-11 05:44:54 +00:00
Marcel Moolenaar b314b57dd5 MFC rev. 1.4: Fix delay(). 2005-06-11 05:42:51 +00:00
Colin Percival 9dc4a9f998 Belatedly document the disabling of Hyper-Threading. Security issues
are not normally documented in UPDATING on the stable branches, but
since this is a user-visible change, it needs to be here.

This is not an MFC since Hyper-Threading is enabled by default in HEAD.

Pointed out by:	Erik Trulsson, via freebsd-stable
2005-06-11 00:08:45 +00:00
Stefan Farfeleder 1cd72a7c3a MFC s_ceill.c 1.2 and s_floorl.c 1.2:
Fix raising the inexact exception (FE_INEXACT) if the result differs from the
  argument.
2005-06-10 21:36:51 +00:00
Stefan Farfeleder b6ec8278cb MFC fpu_explode.c 1.6 and fpu_qp.c 1.6:
Fix long (and long long) to long double, unsigned to long double and unsigned
  long (and unsigned long long) to long double conversions.
  - Add a parameter that specifies the position of the sign bit to the _QP_TTOQ
    macro, previously it always looked at bit 31.  Pass a negative number to
    disable sign inspection for unsigned types.  This fixes _Qp_xtoq(),
    _Qp_uitoq() and _Qp_uxtoq().
  - In the functions __fpu_itof() and __fpu_xtof(), look at the sign bit to
    decide whether we're doing a conversion from an unsigned type.  If so, don't
    negate the mantissa if the integer exceeds the biggest signed number.
2005-06-10 19:00:51 +00:00
Ollivier Robert 26eaa96a4f MFC chkgrp.8: 1.15 & chkgrp.c: 1.9
- Add further functionality to check for invalid characters
  - Remove keyword 'continue' for more indepth error reporting on each line
  - WARNS 6 Clean

  Submitted by:   Liam J. Foy <[email protected]>
2005-06-10 15:33:13 +00:00
Pyun YongHyeon 58bb0ad701 MFC rev. 1.6:
Clarify that systems that have the GPIO pins wired to the hardware
  volume control need a device resource hint.
2005-06-10 10:16:32 +00:00
Robert Watson adb2dba170 Merge udp_usrreq.c:1.175 from HEAD to RELENG_5:
De-spl UDP.
2005-06-10 08:50:31 +00:00
Robert Watson 19e69f4034 Merge ipx.h:1.21 from HEAD to RELENG_5:
Back out ipx.h:1.18, which introduced a Linux API compatibility field in
  the ipx_net data structure.  Doing so introduced a stronger alignment
  requirement for the address structure, which in turn propagated into
  other dependent data structures, which turns out not to be suported by
  the available IPX source code.  As a result, a number of user space
  applications, such as IPX routing components, failed to operate
  correctly.

  RELENG_5_3 candidate?

  PRs:            74059, 80266
  Pointy hat to:  bms
  Fix by:         bde
  Tested by:      Keith White <Keith dot White at site dot uottawa dot ca>
  Suffering:      great
2005-06-10 08:49:12 +00:00
Robert Watson 3f91c3f56f Merge pcpu.h:1.15 from HEAD to RELENG_5:
Add 'curcpu', a shortcut to the current CPU ID, similar to curthread,
  curproc, et al.  Useful for indexing into per-CPU data structures.
2005-06-10 08:47:05 +00:00
Robert Watson a17d47fe8a Merge nfs.h:1.78 and nfs_serv.c:1.156 from HEAD to RELENG_5:
NFS write gathering defers execution of NFS server write requests to wait
  to see if additional write requests will arrive that can be coalesced and
  clustered with earlier ones.  When doing so, it must determine whether
  the two requests are made by credentials with the same access writes, so
  as not to coalesce improperly.  NFSW_SAMECRED() implements a test of two
  credentials using a binary compare.

  Replace NFSW_SAMECRED() macro with nfsrv_samecred() function, which is
  aware of the contents and layout of a struct ucred, rather than a simple
  binary compare.  While the binary compare works when ucred is simply a
  zero'd and embedded 'struct ucred' in the NFS descriptor, it will work
  less well when the ucred associated with an NFS descriptor is "real", so
  has defined and populated reference count, mutex, etc.

  Obtained from:  TrustedBSD Project
2005-06-10 08:45:58 +00:00
Robert Watson aba09a60fa Merge uipc_syscalls.c:1.215 and 1.216 from HEAD to RELENG_5:
De-spl kern_connect().

  Remove now unused 'int s' from spl().
2005-06-10 08:41:56 +00:00
Robert Watson 1ef20a2982 Merge uipc_socket2.c:1.146 from HEAD to RELENG_5:
In the current world order, each socket has two mutexes: a mutex
  that protects socket and receive socket buffer state, and a second
  mutex to protect send socket buffer state.  In some places, the
  mutex shared between the socket and receive socket buffer will be
  acquired twice, once by each layer, resulting in some
  inconsistency, but providing the abstraction benefit of being able
  to more easily separate the two mutexes in the future if desired.

  When transitioning a socket to the SS_ISDISCONNECTING or
  SS_ISDISCONNECTED states, grab the socket/receive socket buffer lock
  once rather than grabbing it as the socket lock, modifying socket
  state, then grabbing a second time as the receive lock in order to
  modify the socket buffer state to indicate no further data can be
  read.  This change is believed to close a race between the change in
  socket state and the change in socket buffer state, which for a
  remotely initiated close on a UNIX domain socket, resulted in
  soreceive() returning ENOTCONN rather than an EOF condition.

  A similar race still exists in the case of send, however, and is
  harder to fix as the socket and send socket buffer mutexes are not
  the same, and we would like to avoid holding combinations of socket
  mutexes over sb_upcall until we've finished clarifying the locking
  protocol for upcalls.

  This change has the side affect of reducing the number of mutex
  operations to initiate disconnect or perform disconnect on a
  socket by two.

  PR:             78824
  Reported by:   Marc Olzheim <[email protected]>
2005-06-10 08:35:40 +00:00
Gleb Smirnoff 57611c2b83 MFC 1.23:
MPPC node is not thread safe.

  PR:             kern/79990
  Reported by:    Arcadiy Ivanov
  Reported by:    atckoe.zlo @ gmail.com
2005-06-10 06:48:48 +00:00
Suleiman Souhlal d83784cec3 MFC 1.23:
- Avoid a memory leak if realloc(3) fails by using reallocf(3)

  Submitted by:   Liam J. Foy <[email protected]>
  Approved by:    mdodd (in-lieu of mentor who is away)
2005-06-10 00:40:05 +00:00
SUZUKI Shinsuke 160a74730e MFC 1.20 and 1.21 (typo and grammar fix) 2005-06-10 00:37:35 +00:00
John-Mark Gurney 7d8567585e back out previous commit as it breaks NFS.. 2005-06-09 20:04:04 +00:00
Wilko Bulte e1023bdedf Lucent FW322/323 == Lucent / Agere FW322/323
Triggered by: reading the chip markings when adding a FW card to my system.
2005-06-09 17:46:06 +00:00
Mark Santcroos 1b25bd644d MFC rev. 1.64: Use AcpiUtStrupr() instead of strupr() as the latter will
disappear in future versions of acpica.
2005-06-09 09:46:56 +00:00
Robert Watson 0fda32a251 Merge tcp_usrreq.c:1.124 from HEAD to RELENG_5:
When aborting tcp_attach() due to a problem allocating or attaching the
  tcpcb, lock the inpcb before calling in_pcbdetach() or in6_pcbdetach(),
  as they expect the inpcb to be passed locked.
2005-06-09 07:32:50 +00:00
Robert Watson 56e16ce2bb Merge raw_ip.c:1.150 from HEAD to RELENG_5:
Slight white space tweak.
2005-06-09 07:31:24 +00:00
Robert Watson bda82589ec Merge udp6_usrreq.c:1.54 from HEAD to RELENG_5:
Lock udbinfo and inp before calling in6_pcbdetach() from udp6_abort().
2005-06-09 07:30:20 +00:00
Simon L. B. Nielsen 2947f63b06 Fix several denial-of-service vulnerabilities in tcpdump.
Security:	FreeBSD-SA-05:10.tcpdump
Security:	CAN-2005-1267, CAN-2005-1278, CAN-2005-1279, CAN-2005-1280
Obtained from:	tcpdump.org

Correct directory traversal and race condition vulnerabilities in gzip.

Security:	FreeBSD-SA-05:11.gzip
Security:	CAN-2005-0988, CAN-2005-1228
Obtained from:	Steve Grubb via RedHat, Debian

Approved by:	nectar
2005-06-08 21:26:27 +00:00
Pyun YongHyeon f4bf1b1c9c MFC rev. 1.28: make snd_maestro3(4) mpsafe 2005-06-08 05:44:27 +00:00
Pyun YongHyeon f5aaf7b400 MFC rev. 1.36
According to STP2002QFP User's Guide, it seems that driver should
  program RXMAC to discard frames with SA field matching the stations's
  MAC address. Experimentation shows that HME receives its own frames
  when it operates at 10Mbps half-duplex. With this change HME runs at
  10Mbps half-duplx should work with IPv6.
2005-06-08 05:36:13 +00:00
Maxim Konovalov 55e16da3be MFC revs. 1.90 - 1.94: FreeBSD 5.4, MacOS 10.4, OpenBSD 3.7,
FreeBSD 1.1, 1.1.5, 1.1.5.1, 2.0 release dates.
2005-06-08 03:58:46 +00:00
Tim Kientzle e5030828be MFC: ZLib 1.2.2 (Part 2: Files unchanged from vendor distribution) 2005-06-08 03:41:03 +00:00
Tim Kientzle 3d1039f8d0 MFC: ZLib 1.2.2 (Part 1: files with FreeBSD-local changes) 2005-06-08 03:38:28 +00:00
Christian S.J. Peron d9b6918f3b MFC revision 1.11
date: 2005/06/05 23:49:35;  author: csjp;  state: Exp;  lines: +1 -1
Append a newline character to the usage string.
2005-06-08 02:48:16 +00:00
Andre Oppermann 2fb87a7972 MFC:
tcp_subr.c rev 1.225

 If we don't get a suggested MTU during path MTU discovery
 look up the packet size of the packet that generated the
 response, step down the MTU by one step through ip_next_mtu()
 and try again.

 Suggested by:	dwmalone
2005-06-07 11:43:15 +00:00
Andre Oppermann b62077d213 MFC:
ip_icmp.c 1.101

 Add another step of 1280 (gif(4) tunnels) to ip_next_mtu().
2005-06-07 11:41:07 +00:00
Andre Oppermann f7edcd10a2 MFC:
ip_icmp.c rev 1.99, ip_icmp.h rev 1.24, tcp_subr.c rev 1.223

 Move Path MTU discovery ICMP processing from icmp_input() to
 tcp_ctlinput() and subject it to active tcpcb and sequence
 number checking.

 Security:	draft-gont-tcpm-icmp-attacks-03.txt Section 7.2
2005-06-07 11:38:42 +00:00
Gleb Smirnoff 0d2e82b555 MFC 1.8:
Fix module build.
2005-06-07 07:49:49 +00:00
John-Mark Gurney 627f280059 MFC: v1.209
make sure that the socket is either accepting connections or is connected
when attaching a knote to it...  otherwise return EINVAL...
2005-06-07 07:11:03 +00:00
John-Mark Gurney 713f8e8d5c MFC: v1.91
make stat return an zero'd struct, and be a FIFO again...  This is only
  to fix libc_r since it requires stat to close fd's, and so commented in
  the code...
2005-06-07 06:35:10 +00:00
Wilko Bulte 1cda590cda When operating the diopter adjustment knob with your eye to the view-
finder, be careful not to put your fingers or fingernails in your eye.
                -- found in the users manual of the Nikon D2x camera,
                   a camera for professional photographers
%
2005-06-06 15:43:00 +00:00
Maxim Sobolev b784e5d367 MFC: wonderful recoverdisk utility. 2005-06-06 00:24:46 +00:00
Jens Schweikhardt cb9bd97c2a MFC: Chop a '>' in a feature name (RSVD2>) that snuck in;
this now balances the <> flags displayed at boot, e.g. without this
Features2=0x41d<SSE3,RSVD2>,MON,DS_CPL,CNTX-ID>
2005-06-05 08:44:08 +00:00
Christian S.J. Peron 08a5c36007 MFC revision 1.27
date: 2005/05/24 23:42:09;  author: csjp;  state: Exp;  lines: +1 -1
If sysctlbyname fails for kernel related reasons, tag the errno
string to the end of the error message. I think we used errx()
there when we really wanted an err().
2005-06-05 03:44:34 +00:00
Mark Murray 0566b9d73f MFC: Say what I really mean by my MAINTAINER status. 2005-06-04 11:55:39 +00:00
Marcel Moolenaar 02c58518f0 MFC rev. 1.20: Fix the load64 and store64 macros. 2005-06-04 05:38:31 +00:00
Hajimu UMEMOTO 8e80413c87 MFC 1.54: reduce cast. 2005-06-03 04:57:50 +00:00
Hajimu UMEMOTO 2513da796e MFC 1.21 (partly): reflect type change of n_net. 2005-06-03 04:51:49 +00:00
Hartmut Brandt 8e878407dd Fix a bug in suffix parsing. Under certain circumstances the code
would access memory before the beginning of the string to match (the
suffix match starts from the end of both the suffix and the string
to match and proceedes until either the start of the suffix is hit or
the character does not match). This could lead to a memcpy copying
into random memory. This leads to make dumping core on amd64 (on i386
the overwritten memory for some reason does not cause a core dump).
Fix this by checking the length of the string too.

MFC of:		1.57
Submitted by:	Matt Dillon <[email protected]>
Tested by:	Julian H. Stacey <[email protected]>
MFC after:	2 weeks
2005-06-02 09:17:22 +00:00
Warner Losh db1bf4d6ab Update details for updating to 5.x from 4.x:
o Note non-standard /usr/src and /usr/obj gotchas
o No need for mount -u / before mount -a
o Note pam gotchas
o Note /lib
o Note named issue
2005-06-02 09:04:00 +00:00
Warner Losh cb22666396 Minor simplification 2005-06-02 08:27:26 +00:00
John Baldwin 5b955be72d Add support for the SATA controller in the ICH6 mobile part. Note this
isn't really an MFC since support for this part was part of the ata mkIII
mega commit.

PR:		kern/80656
Submitted by:	Vlad Galu vladgalu at gmail dot com
2005-06-01 14:39:23 +00:00
John Baldwin d27669234d MFC: Actually use the iterating variable in the for loop to set
shminfo.shmmax.
2005-06-01 14:17:35 +00:00
John Baldwin b25c2180cc MFC: Add NTP servers for Japan. 2005-06-01 14:12:24 +00:00
John Baldwin 0dac1c2ff8 MFC: Update the current NTP servers for .nl.
PR:		bin/80659
2005-06-01 14:11:25 +00:00
Marcel Moolenaar 587add233a MFC 1.51: In bus_dmamap_load(), temporarily point the segments pointer
in the DMA tag to a local variable so that we don't dereference a NULL
pointer.

PR: alpha/30486
2005-06-01 05:14:57 +00:00
David Schultz 967e483e60 MFC rev 1.1, 1.2:
More optimized math functions.

  Prevent these functions from using stack outside of their frame.
2005-05-31 22:17:08 +00:00
David Schultz f768ec06e6 MFC rev 1.2:
Prevent these functions from using stack outside of their frame.
2005-05-31 22:16:54 +00:00
Maksim Yevmenkin f792d29609 MFC to RELENG_5
Do not treat 128-bit UUID as int128. Provide separate macros to get/put
128-bit UUID in libsdp(3). Fix 128-bit UUID printing in sdpcontrol(8).
2005-05-31 16:55:05 +00:00
Maksim Yevmenkin c3d5784aff MFC to RELENG_5
Move AVM USB Bluetooth-Adapter BlueFritz! from "broken" devices list
(where I incorrectly put it initially) to "ignored" devices list (where
it should be). Pointy hat goes to me.
2005-05-31 16:47:19 +00:00
Peter Wemm 84513296aa Remove unused (but initialized) variables. Merge 1.635 - set PCB_FULLCTX
so that all of the registers that a debugger tries to set are used..
2005-05-30 18:22:28 +00:00
Maxim Konovalov 589940d872 MFC rev. 1.68: terminate an endless loop sh -T goes into in dowait()
around waitproc().
2005-05-30 13:41:59 +00:00
Hajimu UMEMOTO cd45841cb7 MFC 1.79:
- do DNS lookup for symbolic names specified for a destination
  or gateway.
- improves error reporting using gai_strerror(3) instead of
  printing "bad value".
- remove "0" for servname argument for getaddrinfo(3).
2005-05-30 04:04:54 +00:00
Bruce A. Mah a9cb8645d5 Remove dangling reference to the no-longer-existant-in-this-branch
Migration Guide.

Pointed out by:	keramida
2005-05-29 17:32:27 +00:00
Hajimu UMEMOTO 05fc4073c5 MFC 1.36: add targets for ipnodes.byname and ipnodes.byaddr which
carries IPv6 addresses.  these targets are off by default, and
these are built when there is /var/yp/ipnodes.
2005-05-29 17:06:09 +00:00
Hajimu UMEMOTO 0ef3664db0 MFC: teach IPv6 to async DNS resolver in ypserv:
- query AAAA RR on ipnodes.byname query.
  - query .ip6.arpa. on ipnodes.byaddr query.

	usr.sbin/ypserv/yp_dnslookup.c:	1.26
	usr.sbin/ypserv/yp_extern.h:	1.17
	usr.sbin/ypserv/yp_server.c:	1.38, 1.39
2005-05-29 16:08:39 +00:00
Pawel Jakub Dawidek d8c7f0e775 MFC: named 1.22
We need to use 'applyset' command for devfs, 'apply hide' is not enough,
because new devfs entries can show up later and one can access such entires
from inside named's chroot.
In rc.d scripts we can use devfs_domount() function with devfsrules_hide_all
policy and unhide 'null' and 'random' manually.
2005-05-29 10:36:37 +00:00
Christian Brueffer 902a145612 MFC: rev. 1.264 by simon
Add snd_audiocs(4).
2005-05-29 10:34:38 +00:00
Christian Brueffer 42586860f1 MFC: rev. 1.281
Sort the sound section by driver name.  The exception to this is sound(4),
which is the master driver and will hopefully be renamed to snd(4) soon.
2005-05-29 10:29:21 +00:00
Hajimu UMEMOTO 33bfde0a40 MFC: The ai_addrlen of a struct addrinfo used to be a size_t, per RFC
2553.  In XNS5.2, and subsequently in POSIX-2001 and RFC 3493, it was
changed to a socklen_t.  And, the n_net of a struct netent used to be
an unsigned long integer.  In XNS5, and subsequently in POSIX-2001, it
was changed to an uint32_t.  To accomodate for this while preserving
ABI compatibility with the old interface, we need to prepend or append
32 bits of padding, depending on the (LP64) architecture's endianness.

	include/netdb.h:		1.36 (partly)
	lib/libc/net/getaddrinfo.c:	1.69
	lib/libc/net/getnetbydns.c:	1.30
	lib/libc/net/getnetbyht.c:	1.15
	lib/libc/net/getnetbynis.c:	1.18
	lib/libc/net/getnetnamadr.c:	1.20 (partly)
	lib/libc/net/netdb_private.h:	1.9
2005-05-29 10:21:38 +00:00
Christian Brueffer 1207bdd88d MFC:
- Autogenerate device listings for sound(4) aka pcm(4)
- Rename the Audio Devices section into Sound Devices, this is more
  in line with out sound and snd_* drivers
2005-05-29 10:20:13 +00:00
Christian Brueffer 4775fdc8e6 MFC: rev. 1.39
- Add a HARDWARE section based on the previous 'Supported Cards'
  subsection and the hardware notes.
- Xref all snd_* drivers
2005-05-29 10:17:29 +00:00
Gleb Smirnoff dc1bedc34f Fix mismerge. Unbreak kernel build. Please tinderbox. Put on pointy hat.
Phone call from:	maxim
2005-05-28 18:25:52 +00:00
Hajimu UMEMOTO e956878508 MFC: NI_WITHSCOPEID cleanup
contrib/tcp_wrappers/hosts_access.c:		1.5
	contrib/tcp_wrappers/socket.c:			1.8
	contrib/telnet/telnetd/telnetd.c:		1.28
	lib/libc/net/rcmd.c:				1.41
	lib/libc/net/res_send.c:			1.50
	lib/libpam/modules/pam_unix/pam_unix.c:		1.50
	lib/libutil/logwtmp.c:				1.20
	lib/libutil/realhostname.c:			1.18
	libexec/rlogind/rlogind.c:			1.44
	libexec/tftpd/tftpd.c:				1.36
	release/picobsd/tinyware/login/pico-login.c:	1.6
	sbin/ifconfig/af_inet6.c:			1.2
	sbin/route/route.c:				1.78
	usr.bin/netstat/route.c:			1.76
	usr.sbin/inetd/inetd.c:				1.129
	usr.sbin/lpr/common_source/net.c:		1.9
	usr.sbin/lpr/lpd/lpd.c:				1.41
	usr.sbin/mountd/mountd.c:			1.81
	usr.sbin/ppp/ncpaddr.c:				1.16
	usr.sbin/rip6query/rip6query.c:			1.7
	usr.sbin/syslogd/syslogd.c:			1.143
2005-05-28 11:54:38 +00:00
Seigo Tanimura eb25d55723 MFC 1.52: 6300ESB. 2005-05-28 09:41:40 +00:00
Christian Brueffer 99cd132bc7 MFC: rev. 1.31
Document support for some Dell PERC adapters.
2005-05-28 07:17:51 +00:00
Hajimu UMEMOTO 0fa05f1d52 MFC 1.38: fixed a bug that incorrect IPsec request level may be
returned for proto AH
2005-05-27 19:49:16 +00:00
Gleb Smirnoff 5d413408d2 MFC:
Make netgraph ISR and callout MPSAFE.
2005-05-27 14:51:32 +00:00
Gleb Smirnoff 4a35053bc8 MFC:
Use uma(9) for allocating netgraph items:
    - ng_getqblk() simply runs uma_zalloc().
    - ng_free_item() simply frees.
    - ngq_mtx is pushed down under NETGRAPH_DEBUG.
    - NGQF_FREE is removed.

  Increase default maxalloc to 512.

  Reviewed by:    julian
2005-05-27 14:48:35 +00:00
Gleb Smirnoff 1c1d04785d Make NETGRAPH_DEBUG a kernel option, so that it can be turned off
without hacking source.

  In collaboration with:  ru, julian
2005-05-27 14:22:30 +00:00
Gleb Smirnoff 69be04639a MFC:
In div_output() explicitly set m->m_nextpkt to NULL. If divert socket
  is not userland, but ng_ksocket, then m->m_nextpkt may be non-NULL. In
  this case we would panic in sbappend.
2005-05-27 12:32:29 +00:00
Gleb Smirnoff d7c2f304d4 MFC:
When used as divert socket we need to decouple stack when node is entered
  from socket side. Use ng_queue_fn() instead of ng_send_fn().
2005-05-27 12:31:49 +00:00
Gleb Smirnoff 91c01004cf MFC:
Since there is no way to queue a function call to node, create
  ng_queue_fn() - a queue version of ng_send_fn().
2005-05-27 12:31:29 +00:00
Gleb Smirnoff bc3ce4b770 Add vnode_if.h to SRCS. 2005-05-27 12:05:24 +00:00
Gleb Smirnoff 35727aa6dc MFC:
1.30: Remove extra ifnet pointer from private data. It can be accessed via arpcom.
  1.29: Remove ng_connect_t where it is unused.
  1.28: Use subr_unit allocator instead of own functions.
2005-05-27 12:04:13 +00:00
Gleb Smirnoff 49a3518f77 MFC 1.40:
Use subr_unit allocator instead of own functions.
2005-05-27 12:03:11 +00:00
Gleb Smirnoff abd3224c1b MFC:
o Use subr_unit allocator. This simplifies code much:
    - Remove get_free_unit().
    - Remove SLIST of nodes.
    - Remove global mutex.

  o Increase NGD_MAX to 999.
  o Move ngd_mod_event() up to netgraph methods.
2005-05-27 12:02:35 +00:00
Gleb Smirnoff a8ae72f3a2 Merge kernel unit allocator.
Approved by:	phk
2005-05-27 11:58:01 +00:00
Olivier Houchard 145291ba4a MFC rev 1.50:
Fix one more misuse of u_long when uint32_t is actually meant.

Submitted by:   oliver
2005-05-27 00:40:06 +00:00
Alfred Perlstein f5a9deaef7 MFC: 1.48 utimes/chflags. 2005-05-26 22:51:04 +00:00
Alfred Perlstein be3cdfdd1c MFC:
When doing the initial open of the proc via procfs, complain if we are
unable to open the /proc/pid/mem file.  Otherwise doing a truss on
a nonexistant pid makes us return success even though no such process
exists.

I've been working on this somewhat so I'm moving the
parts I'm touching to be as style(9) compliant as I can.
2005-05-26 21:26:00 +00:00
Alfred Perlstein f822c551c8 MFC: procctl doc xref. 2005-05-26 20:50:46 +00:00
Alfred Perlstein 839dac6f63 MFC: 1.46, 1.47 2005-05-26 20:47:29 +00:00
Stefan Farfeleder 03487716fb MFC 1.3:
The header glue.h should provide just a declaration for the variable
__sglue, not a definition.
2005-05-26 19:51:59 +00:00
Bruce A. Mah 2fdafa2304 MFC: autoboot_delay -1, sed(1) -l. 2005-05-26 14:43:26 +00:00
Andrey A. Chernov dcd5cd68a1 MFC: 1.20 printed output flags (onocr) and (onlret)
PR:             81256
2005-05-26 09:42:18 +00:00
Doug Rabson 36eb82ceb5 MFC: Align stack for SSE. 2005-05-26 09:33:28 +00:00
Doug Rabson a9c42fe97f MFC: r1.4 - align stack for SSE. 2005-05-26 09:32:41 +00:00
Adam Weinberger ca5abd1961 MFC rmuser.sh 1.9: Fix a particularly egregious grammar error.
It's not that I mind the implication that a user's name owns a
punctuation mark, but I think life is simpler this way.

Approved by:	ssouhlal and wes
2005-05-26 04:21:53 +00:00
Christian S.J. Peron 8ac172db52 MFC revision 1.144
date: 2005/05/19 21:09:44;  author: csjp;  state: Exp;  lines: +2 -0
Add cases for ENOBUFS and ENETDOWN. We need to make sure that we
catch all transient errors. This fixes situations where transient
error conditions such as network interfaces losing carrier signals
or the system running out of mbufs would result in the permanent
removal of forwarding syslog messages.
2005-05-26 00:31:38 +00:00
Sheldon Hearn 8299c3e96e MFC rev 1.11: release maintainership 2005-05-25 16:32:14 +00:00
Peter Edwards 6536ab4a13 MFC 1.15:
lockmgr(...,LK_DRAIN,...) requires a balancing LK_RELEASE.
    Remove an unused variable.
2005-05-25 16:27:43 +00:00
Christian Brueffer 49512f0545 MFC: rev. 1.17 + 1.18
Document support for the 5714 and 5789.
2005-05-25 15:44:10 +00:00
Christian Brueffer 8b95e9320b MFC:
soundcard -> sound card
2005-05-25 15:41:28 +00:00
Xin LI 32f06706ad MFC 1.65(phk):
Do not attach MBR on top of an MBR.

Approved by:	phk
2005-05-25 12:57:02 +00:00
Paul Saab 99ebad331c MFC: rev 1.32 copyout to userland if kern_sigaction succeeds 2005-05-24 17:53:27 +00:00
Christian Brueffer 9f5f99f45d MFC:
3Com 3C2000-T reported as working.
2005-05-24 15:44:02 +00:00
Maksim Yevmenkin eaa9a6b2a9 MFC to RELENG_5
Fix problem with session termination. bthidd(8) maintains two L2CAP
connections to Bluetooth HID device. As soon as Bluetooth HID device
is powered off (or goes out of RF range) the stack will terminate both
connections. File descriptors for both connections will become active
on next select(2) call. Because bthidd(8) processes file descriptors
in order, it will detect descriptor for one of the closed connections
first and kill the session. However, there is still a second (active)
descriptor that used to point to the same session. bthidd(8) used to
assert() if it cant find session by file descriptor, which was wrong.

While I'm here fix a couple of typos in parser.y

Reported by:    Eric Anderson anderson AT centtech DOT com
2005-05-23 19:52:54 +00:00
Maxim Sobolev fa5cbb8f84 MFC: add cdce(4). 2005-05-23 16:25:11 +00:00
Maxim Sobolev 8c2fe34d77 MFC: Don't allow user to interrupt autoboot from console when autoboot_delay
is set to -1.
2005-05-23 14:59:33 +00:00
Gleb Smirnoff 1081fe35be MFC:
Add option -l, to make output line buffered.

  PR:             bin/78692
  Submitted by:   Eugene Grosbein
2005-05-23 13:27:49 +00:00
Christian Brueffer ea41a50b34 MFC:
New release notes:

- uaudio(4) sync
- bge(4) support for BCM5714 and 5789
- ixgb(4) MPSAFE
- xl(4) polling
2005-05-23 12:25:15 +00:00
Bruce A. Mah 833b638749 Grrr. Put the SA-05:09.htt item in the security advisories section,
not the open issues section.

Pointy hat to:			bmah
Needs to call it a night:	bmah
2005-05-23 03:35:17 +00:00
Bruce A. Mah ce35c6ad5b Somewhat belatedly, add an errata entry for SA-05:09.htt. 2005-05-23 02:47:21 +00:00
Bruce A. Mah 4eff86bc80 MFC: gethostby*(3) thread-safe, getnetby*(3) thread-safe. 2005-05-23 02:39:51 +00:00
Bruce A. Mah ab161a08c8 MFC: New ndisulator driver generation procedure, getproto*(3)
thread-safe, getserv*(3) thread-safe, kldstat(8) -m, default stack
size increases.
2005-05-22 18:25:20 +00:00
Bill Paul dd88210dac Sync everything up with -current, except for the WPA support, which
won't work with the 5.x version of net80211. This includes all fixes
to date, and support for new cards such as the AirGo MIMO and Ralink
RT2500. This also includes the new driver configuration/conversion
mechanism. Remember that you should use ndisgen(8) to create new
drivers now, and if_ndis.ko will always be pre-built.
2005-05-22 18:18:13 +00:00
Mike Silbersack 8b0d180036 MFC: Add PCI ID for BCM5789. 2005-05-22 03:17:49 +00:00
Poul-Henning Kamp 556b0da6c4 MFC:
Make make.conf overridable (remember absolute path!)
	Add newfs params for space saving
	call Customize/files by default
2005-05-20 11:04:50 +00:00
Poul-Henning Kamp 183a0e6335 MFC:
Add standard admin scripts
2005-05-20 09:54:23 +00:00
Poul-Henning Kamp b02ba21078 MFC:
add the files and pkgs customize scripts
2005-05-20 09:51:46 +00:00
Christian S.J. Peron 27bdbb77fb MFC revision 1.622
date: 2005/05/02 02:07:55;  author: csjp;  state: Exp;  lines: +2 -4
Since it is not possible for curthread to be NULL in this context,
drop the check+initialization for a straight initialization. Also
assert that curthread will never be NULL just to be sure.
2005-05-20 04:16:47 +00:00
Paul Saab af26cc7b01 MFC: support for the 5714 2005-05-19 21:12:04 +00:00
Jesus R. Camou ee041169c6 MFC: Correct path to package-split.py.
Approved by:	trhodes (mentor)
2005-05-19 16:10:31 +00:00
cvs2svn 72d8960f33 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-05-19 15:23:48 +00:00
Bruce A. Mah 660675189b MFC: SA-05:09.htt. 2005-05-19 14:46:54 +00:00
Gleb Smirnoff ee22597c16 MFC:
Add startup script and default configuration file for bsnmpd.
  Reviewed by:    harti
2005-05-19 11:35:15 +00:00
Poul-Henning Kamp 6ae6de50c7 MFC:
reorganize pruning in size order.
2005-05-19 11:27:18 +00:00
Poul-Henning Kamp 92cf63c022 MFC:
add NANOBSD_PRUNE support
2005-05-19 11:26:25 +00:00
Poul-Henning Kamp 7e3c7a43a5 MFC:
use df -i, we can run out of inodes as well.
2005-05-19 11:25:58 +00:00
Hajimu UMEMOTO 15441213d8 MFC: our get{addr,name}info() is considered thread-safe.
lib/libc/net/getaddrinfo.3:	1.31
	lib/libc/net/getnameinfo.3:	1.23
2005-05-19 11:12:45 +00:00
Hajimu UMEMOTO 06ac63058e MFC:
- _gethostbynis{addr,name}() can handle an IPv6, now.
- we don't need mutex lock to call _gethostbynis*(), anymore.
- raise readability bit.

	lib/libc/net/getipnodebyname.3:	1.17
	lib/libc/net/name6.c:		1.47-1.50, 1.52
2005-05-19 11:11:09 +00:00
Gleb Smirnoff 2047c23a11 Merge a small piece of code from HEAD, that suppresses carp(4) preemption
until pfsync(4) has synchronized.

Reviewed by:	dhartmei, mlaier
Sponsored by:	Rambler
2005-05-19 10:59:22 +00:00
Gleb Smirnoff 9f5d8f34ef MFC 1.7:
- Document net.inet.carp.suppress_preempt MIB.
  - Xref pfsync(4)
2005-05-19 10:57:01 +00:00
Hajimu UMEMOTO cdcf6a56c3 MFC: sync _map_v4v6_host*() with bind9's. it treats align better bit.
lib/libc/net/gethostbydns.c:	1.52
	lib/libc/net/gethostnamadr.c:	1.26
	lib/libc/net/map_v4v6.c:	1.9
	lib/libc/net/netdb_private.h:	1.8
2005-05-19 10:57:00 +00:00
Gleb Smirnoff 1c554fdde5 MFC 1.24:
- When carp interface is destroyed, and it affects global preemption
    suppresion counter, decrease the latter. [1]
  - Add sysctl to monitor preemption suppression.

  PR:             kern/80972 [1]
  Submitted by:   Frank Volf [1]
2005-05-19 10:55:14 +00:00
Hajimu UMEMOTO 650ffd58c5 MFC:
- add IPv6 awareness for NIS query of gethostby*().
- make gethostby*() thread-safe.
- do validation check and IPv4-mapped IPv6 address handling before
  any query.
- don't query against IPv6 link-local address.
- use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros.
- use memcpy() instead of bcopy().

	lib/libc/net/gethostbydns.c:	1.51, 1.53, 1.54
	lib/libc/net/gethostbyht.c:	1.19-1.23
	lib/libc/net/gethostbyname.3:	1.33, 1.34
	lib/libc/net/gethostbynis.c:	1.18-1.25
	lib/libc/net/gethostnamadr.c:	1.25, 1.27, 1.28
	lib/libc/net/netdb_private.h:	1.7
2005-05-19 10:46:14 +00:00
Gleb Smirnoff 3490112e9f MFC 1.63:
Run em_local_timer() once per second instead of running it once per 2 seconds.
  This makes gathering of error stats more precise, and netstat(1) output look
  right.

  Reviewed by:    tackerman
2005-05-19 08:23:06 +00:00
Pawel Jakub Dawidek cf53a3fdba MFC: geom_sunlabel.c 1.44
Protect against recursive labels creation in simlar way as it is done
in BSD and MBR classes, ie. if provider below us uses the same metadata,
don't create labels based on the metadata.
This allows to create labels on geoms with rank != 1 without hacks.
2005-05-18 21:50:14 +00:00
Hajimu UMEMOTO ebcfd3e3d0 ensure parsing numeric address before any host query.
lib/libc/net/gethostbydns.c:	1.49
	lib/libc/net/gethostnamadr.c:	1.23
2005-05-18 16:01:24 +00:00
Hajimu UMEMOTO 22c6fe4a87 make getnetby*() thread-safe.
lib/libc/net/getnetbydns.c:	1.29
	lib/libc/net/getnetbyht.c:	1.13, 1.14
	lib/libc/net/getnetbynis.c:	1.16, 1.17
	lib/libc/net/getnetent.3:	1.20
	lib/libc/net/getnetnamadr.c:	1.19
	lib/libc/net/getprotoent.c:	1.5
	lib/libc/net/getservent.c:	1.19
	lib/libc/net/netdb_private.h:	1.6
2005-05-18 15:58:15 +00:00
Christian S.J. Peron 4818dd318b MFC
Move MAC check_vnode_mmap entry point out from being exclusive to
MAP_SHARED so that the entry point gets executed un-conditionally.
This may be useful for security policies which want to perform access
control checks around run-time linking.

-add the mmap(2) flags argument to the check_vnode_mmap entry point
 so that we can make access control decisions based on the type of
 mapped object.
-update any dependent API around this parameter addition such as
 function prototype modifications, entry point parameter additions
 and the inclusion of sys/mman.h header file.
-Change the MLS, BIBA and LOMAC security policies so that subject
 domination routines are not executed unless the type of mapping is
 shared. This is done to maintain compatibility between the old
 vm_mmap_vnode(9) and these policies.
2005-05-18 00:32:05 +00:00
Alan Cox 95a341165c MFC
Add locking and enable INTR_MPSAFE.  Eliminate spl calls.
2005-05-17 21:41:11 +00:00
Maksim Yevmenkin cc6189faf2 MFC to RELENG_5
while i'm here MFC ru's changes as well. Sort sections.
2005-05-17 18:06:23 +00:00
Maksim Yevmenkin 33206b52ef MFC to RELENG_5
ng_ubt(4) no longer provides device nodes interface. Update the
man page to document this.
2005-05-17 18:01:01 +00:00
Maksim Yevmenkin f33f4ec792 MFC to RELENG_5
Get rid of device nodes interface. It is useless and confusing.
The original idea was to use it for firmware upgrading and similar
operations. In real life almost all Bluetooth USB devices do not
need firmware download. If device does require firmware download
then ugen(4) (or specialized driver like ubtbcmfw(8)) should be
used instead.
2005-05-17 17:56:28 +00:00
Maksim Yevmenkin b412b2b7d3 MFC to RELENG_5
Mark AVM USB Bluetooth-Adapter BlueFritz! as "broken". This device is not
supported by ng_ubt(4) driver and needs its own driver.

PR:		kern/76205
Submitted by:	Tim Hemel < bsd AT timit DOT nl >
2005-05-17 17:30:25 +00:00
Kris Kennaway 2e1cd80a4f MFC: Enable mpsafevm by default on sparc64.
Approved by:	alc
2005-05-16 19:10:58 +00:00
Hajimu UMEMOTO c90a8bac77 MFC: hide implementation specific internal functions from netdb.h.
include/netdb.h:		1.35
	lib/libc/net/gethostbydns.c:	1.50
	lib/libc/net/gethostbyht.c:	1.18
	lib/libc/net/gethostnamadr.c:	1.24
	lib/libc/net/getnetnamadr.c:	1.18
	lib/libc/net/name6.c:		1.46
	lib/libc/net/netdb_private.h:	1.5
2005-05-16 18:28:19 +00:00
Hajimu UMEMOTO c96e7f66f3 MFC: our get{proto,serv}by*() use a thread-specific data space.
lib/libc/net/getprotoent.3:	1.11
	lib/libc/net/getservent.3:	1.14
2005-05-16 17:18:50 +00:00
Hajimu UMEMOTO b1be707c9c MFC: make getproto{byname,bynumber,ent} thread-safe.
lib/libc/net/getproto.c:	1.4
	lib/libc/net/getprotoent.c:	1.4
	lib/libc/net/getprotoname.c:	1.4
	lib/libc/net/netdb_private.h:	1.4
2005-05-16 17:13:21 +00:00
Hajimu UMEMOTO 34d949d43c MFC:
- we are no longer shareing any resources to be locked between
  getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
- now, our getservbyname(3) is thread-safe.  So, we don't need
  to protect it with mutex lock.

	lib/libc/net/getaddrinfo.c:	1.62, 1.65
	lib/libc/net/name6.c:		1.43, 1.44
2005-05-16 17:02:01 +00:00
Hajimu UMEMOTO b051132820 MFC: make getserv{byname,byport,ent} thread-safe.
lib/libc/net/getservbyname.c:	1.5-1.7
	lib/libc/net/getservbyport.c:	1.5-1.7
	lib/libc/net/getservent.c:	1.14-1.18
	lib/libc/net/netdb_private.h:	1.1-1.3
2005-05-16 16:29:04 +00:00
Hajimu UMEMOTO 2507ae8a57 MFC 1.17: fix signed/unsigned comparison warnings. 2005-05-16 16:07:45 +00:00
Hajimu UMEMOTO e59ca104fe MFC 1.60, 1.67: make yp stuff re-entrant. 2005-05-16 15:53:50 +00:00
Max Khon 12cbe5a1b2 MFC:
- Use kldstat -m (finds geom_uzip even if it is compiled in statically).
- Create output files with x bit set.
- Make mkuzip 64-bit clean.
- Fix typo in error message.
- Enable mkuzip on all archs.
2005-05-16 15:10:15 +00:00
Max Khon a5a18ace3a MFC: Document kldstat -m modname. 2005-05-16 15:05:22 +00:00
Max Khon 75c8bc2bab MFC: Add -m modname option (find module by name). 2005-05-16 15:01:00 +00:00
Gleb Smirnoff 0105a9d1aa MFC 1.13:
- Return error, if there was one.
  - No need to initialize error here.
2005-05-16 12:44:32 +00:00
Gleb Smirnoff 4a1479121a MFC 1.28:
NG_MKRESPONSE() macro includes sizeof struct ng_mesg when doing allocation.
2005-05-16 12:43:36 +00:00
Tim Kientzle f54806cfe2 MFC several libarchive bugfixes:
* "make distfile" uses correct automake/autoconf commands
   * Rewrite path shortening to avoid crash on certain paths
       between 245 and 255 characters long
   * Fix broken ACL configuration on FreeBSD 4 and Linux
   * Fix GNU tar long symlink handling
2005-05-16 04:37:59 +00:00
Tim Kientzle c8b6063b2c MFC: Zip improvements (large files, Unix metadata, faster listing)
The bulk of this is from archive_read_support_format_zip.c 1.5 with
minor supporting changes to several other files.
2005-05-16 04:32:16 +00:00
Tim Kientzle baf971cc70 MFC
Makefile 1.32, archive_entry.c 1.25, archive_entry.h 1.13,
   archive_read_extract.c 1.38

Support extracting very long pathnames.
2005-05-16 02:54:04 +00:00
Tim Kientzle c18fffe04c MFC a number of small changes from about 2 months ago:
archive_write_open_file.c 1.11: Non-regular files can be added
         to an archive, even if output is going to that file.
 archive_read_support_compression_gzip.c 1.9: better error messages
 archive_read_open_file.c 1.8: better error messages
 archive_read_support_format_cpio.c 1.12: better handling of I/O errors
 archive_read_support_format_tar.c 1.31: better error handling
2005-05-16 02:47:34 +00:00
Robert Watson a5c0564437 Merge in_pcb.c:1.163 from HEAD to RELENG_5:
o Tweak the comment a bit.
2005-05-16 00:00:38 +00:00
Alan Cox be6cc49b5f MFC
Add machine-specific, optimized implementations of bcmp, bcopy, bzero,
 memcmp, memcpy, memmove, and memset.
2005-05-15 20:26:48 +00:00
cvs2svn e5a62f0b6a This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-05-15 20:15:16 +00:00
Dag-Erling Smørgrav 94dc8f1835 MFC: add pentium-m, spell pentiumpro correctly, move nocona to Intel 2005-05-15 11:46:20 +00:00
Christian Brueffer 2a5a80dc7d MFC: rev. 1.14
Fix typo.
2005-05-15 07:19:51 +00:00
Christian Brueffer 16fed7ad89 MFC: rev. 1.15
Wordsmithing.
2005-05-15 07:15:06 +00:00
Joe Marcus Clarke 1bf995915e MFC rev 1.115:
Add libdata/pkgconfig.  It is used under ${LOCALBASE} as much (if not more)
than under ${X11BASE}.
2005-05-14 19:47:53 +00:00
Lukas Ertl 40a119731a MFC:
Only allow RAID5 plexes to be parity checked.

   PR:           kern/80427
   Submitty by:  Stijn Hoop <[email protected]>
--
   Don't allow to synchronize a plex that is already sychronizing.

   Reset the 'syncing' flag in case of errors, too.

   Some cosmetics.
2005-05-14 14:55:47 +00:00
Lukas Ertl 4ec0abac24 MFC:
Remove test for zero sectorsize when tasting.  This check doesn't
  seem to be necessary anymore, and it prevents tasting a valid drive
  when booting with geom_vinum already loaded, since SCSI disks set their
  sectorsize not until first opening them.
2005-05-14 14:54:49 +00:00
Lukas Ertl ba4933de51 MFC:
Add support for Sitecom USB to serial cable (v2)

    PR:            usb/79230
    Submitted by:  Rick van der Zwet <[email protected]>

MFC reminder by: n_hibma
2005-05-14 14:47:19 +00:00
Christian Brueffer 70da2f9c71 MFC: rev. 1.56
Fix three typos in comments.  Two of them obtained from OpenBSD.
2005-05-14 08:50:35 +00:00
Vinod Kashyap 675ac7d678 Corrected driver version. 2005-05-13 19:59:09 +00:00
Hajimu UMEMOTO 2aa8f2cdaa MFC 1.47-1.49: do mutex lock for each yp calls. 2005-05-13 17:06:52 +00:00
Gleb Smirnoff 58528668ff MFC 1.109:
- refactor changes introduced in rev. 1.100: do not prepend a new tag
  unconditionally. Before doing this check whether we have one.
2005-05-13 11:47:41 +00:00
Christian Brueffer 0284a2d2bc MFC:
Manual page for the "mn" Siemens Easy321-R1 E1/T1 device driver.
This is based on the comments in if_mn.c.
2005-05-13 07:08:06 +00:00
Jacques Vidrine 7ddcececdc Add a knob for disabling/enabling HTT, "machdep.hyperthreading_allowed".
Default off due to information disclosure on multi-user systems.

Submitted by:	cperciva
Reviewed by:	jhb
2005-05-13 00:10:56 +00:00
Maksim Yevmenkin e0ba1610eb MFC to RELENG_5 src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c, v1.17
In ng_btsocket_rfcomm_receive_frame() correctly set length variable when
EA bit is set in hdr->length (16-bit length). This currently has no effect
on the rest of the code. It just fixes the debug message.
2005-05-12 16:48:24 +00:00
Maksim Yevmenkin 0b88d9c070 MFC sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c,v 1.16
move ptr use down to after null check

Noticed by:	Coverity Prevent analysis tool
Submitted by:	sam
2005-05-12 16:45:10 +00:00
Brian Feldman efb93e779a MFC: IPFW ALTQ(4) classification support, diverted traffic match rules,
and the TCP packet data length match rule.
2005-05-12 15:11:30 +00:00
Philip Paeps 81791e665b The long-procrastinated sync of acpi_asus(4) with CURRENT.
MFC acpi_asus.c r1.12 - r1.24
    acpi_asus.4 r1.5 - 1.9
2005-05-12 12:37:19 +00:00
Giorgos Keramidas 36c98d9ba9 MFC 1.18: There is no /etc/rc.network anymore. 2005-05-12 10:08:45 +00:00
Dag-Erling Smørgrav 6b25dcdcea MFC: (1.10) record xdm logins in lastlog / wtmp / utmp. 2005-05-12 08:36:40 +00:00
Maksim Yevmenkin a47e52c295 MFC to RELENG_5
Change m_uiotombuf so it will accept offset at which data should be copied
to the mbuf. Offset cannot exceed MHLEN bytes. This is currently used to
fix Ethernet header alignment problem on alpha and sparc64. Also change all
users of m_uiotombuf to pass proper offset.

Reviewed by:	jmg, sam
Approved by:	re
2005-05-11 21:54:44 +00:00
Matthew N. Dodd a5c692532b MFC: 1.219
Replace spl protection in rtcin() and writertc() with spinlocks
using the existing clock_lock mutex.
2005-05-11 20:02:16 +00:00
Jesus R. Camou 909553e66d o Revert the cuaa->cuaad changes done by error
in previous MFC.

o MFC the last change done in HEAD by brian@:
  Delete the tun N section.

Reviewed by:	brian
Approved by:	trhodes (mentor, implicitly)
2005-05-11 18:51:06 +00:00
Joe Marcus Clarke 9398b7a4d0 Increment __FreeBSD_version for the thread stacksize changes. 2005-05-11 15:57:39 +00:00
Joe Marcus Clarke 6cefbed18f MFC:
Increase the default stacksizes:

              32-bit  64-bit
main thread     2MB     4MB
other threads   1MB     2MB

Approved by:    eischen
                re (scottl no longer objects since 5.4 is out)
2005-05-11 15:56:04 +00:00
Joe Marcus Clarke 5f82bdf6f2 MFC:
Increase the default stacksizes:

              32-bit  64-bit
main thread     2MB     4MB
other threads   1MB     2MB

Approved by:    mtm
                re (scottl no longer objects since 5.4 is out)
2005-05-11 15:55:41 +00:00
Joe Marcus Clarke 9f01ba12a0 MFC:
Increase the default stacksizes:

		32-bit	64-bit
main thread	2MB	4MB
other threads	1MB	2MB

Approved by:	eischen
		re (scottl no longer objects since 5.4 is out)
2005-05-11 15:54:51 +00:00
Gleb Smirnoff 62bb875101 MFC 1.94:
With recent changes to _callout_stop_safe() we can remove a hack
  in ng_uncallout().
2005-05-11 11:41:26 +00:00
Gleb Smirnoff 785c2b576c MFC 1.94, 1.95 (cperciva):
Make "c->c_func = NULL" conditional on the CALLOUT_LOCAL_ALLOC flag,
  i.e., only clear c->c_func if the callout c is being used via the old
  timeout(9) interface.
2005-05-11 11:38:14 +00:00
Maxim Konovalov de2b6114c6 MFC rev. 1.22 and rev. 1.23: fix a comment. 2005-05-11 10:59:47 +00:00
Gleb Smirnoff a103ade72e Sync with HEAD:
- 1.9, joel. Expand contractions.
- 1.8, Reword HOOKS paragraph also mentioning how data received on out* hooks
       is handled.
- 1.7, Describe usage of newly implemented out* hooks.
2005-05-11 10:52:17 +00:00
Gleb Smirnoff 3fd47ac3e9 MFC:
Implement "verbose" optional keyword for "show" command. This is analog
  of Cisco's "show ip cache verbose flow" command.
2005-05-11 10:48:48 +00:00
Gleb Smirnoff 57efdd2be2 MFC the following changes:
Add a possibility to bypass unmodified accounted data to special
  hook(s). Data received on these hook(s) is sent back to ifaceX hook(s).

  Refactor node so that it does not modify mbuf contents:
  - In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
    IP header, and TCP/UDP header.
  - Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
    headers are guaranteed to by after it.
  - Merge make_flow_rec() function into ng_netflow_flow_add().
2005-05-11 10:45:31 +00:00
Denis Peplin b8a8f6d594 Merge the following from the English version:
1.69.2.16 -> 1.69.2.17 errata/article.sgml
2005-05-11 09:11:12 +00:00
Dag-Erling Smørgrav 6e40d81632 MFC: (1.19) tweak description of "w" mode. 2005-05-11 08:28:00 +00:00
Eric Anholt ee93840bde MFC: Add the agp driver to GENERIC. 2005-05-10 22:45:14 +00:00
Ken Smith 1154929592 Note date of 5.4-REL here too. I've been forgetting to do it in the
development branches.

Prodded by:	cperciva and others
2005-05-10 17:28:52 +00:00
cvs2svn 55f89ab8af This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-05-10 16:48:04 +00:00
Hajimu UMEMOTO 5d7d68e6ed MFC 1.63: remove needless res_init() call. 2005-05-09 19:04:27 +00:00
Hajimu UMEMOTO fc305b6112 MFC: the 3rd argument of getsockname() should be socklen_t*.
lib/libc/net/getaddrinfo.c:	1.66
	lib/libc/net/name6.c:		1.51
2005-05-09 18:57:13 +00:00
Hajimu UMEMOTO 04a0c9ecf4 MFC 1.48: remove unused variable. 2005-05-09 18:51:57 +00:00
Hajimu UMEMOTO c28a5145ef MFC 1.59: make _files_getaddrinfo() re-entrant. 2005-05-09 18:47:41 +00:00
Hajimu UMEMOTO 3047e5eecc MFC: hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

	lib/libc/net/getaddrinfo.c:	1.64
	lib/libc/net/gethostbydns.c:	1.47
	lib/libc/net/res_query.c:	1.30
2005-05-09 18:40:11 +00:00
Hajimu UMEMOTO 01bd664a45 MFC 1.12: if last line didn't have trailing space, network address
was also treated as an alias.
2005-05-09 18:32:38 +00:00
Hajimu UMEMOTO 5de644835e MFC 1.45:
- nuke deprecated and unused getnodeby(3).
- remove unused variable.
2005-05-09 17:19:40 +00:00
Hajimu UMEMOTO 67ffe95961 MFC 1.41, 1.42:
- nuke the logic for AF_UNSPEC and simplify.  once, it was introduced
  to improve getaddrinfo(3).  but, it is not needed for a long time
  since getaddrinfo(3) became providing its own res_*N() functions.
- add missing mutex unlock.
2005-05-09 17:16:36 +00:00
Xin LI ca13161f0a MFC 1.15+1.16: Remove a check about whether sa->sa_len is equal to salen
from getnameinfo(3).  This improves API compatibility with other POSIX
complaint operating systems.

PR:		standards/80008
Requested by:	Xin Liu <[email protected]>
Reviewed by:	freebsd-standards (das)
MFC After:	2 weeks
2005-05-09 13:11:47 +00:00
Ian Dowse 7d04e61560 MFC 1.174: don't copy the NFSMNT_* flags into struct statfs's f_flags
field, as they have no connection with the expected MNT_* flags.
2005-05-09 01:09:48 +00:00
Dag-Erling Smørgrav 1cc43173b5 MFC: report added / removed partitions, require -a to remove all partitions 2005-05-08 13:26:59 +00:00
Colin Percival 2b927f8843 MFC: Fix two issues which were missed in FreeBSD-SA-05:08.kmem.
Reported by:	Uwe Doering
2005-05-08 10:19:37 +00:00
Maxime Henrion 19d48c1be6 MFC: Use BUS_PROBE_DEFAULT for pci probe return value. 2005-05-08 01:36:02 +00:00
Maxime Henrion 4c9f0486a4 MFC: Remove an outdated comment about ifnet not being locked. 2005-05-08 01:31:58 +00:00
Maxime Henrion 245beb126c MFC: Enable extended RFDs and TCBs, and thus checksum offloading, for
82551 chipsets (revision IDs 0x0e, 0x0f and 0x10).
2005-05-08 01:27:29 +00:00
Maxime Henrion 9e97a8f2d6 MFC the conversion to C99 types to reduce differences with HEAD. 2005-05-08 01:16:41 +00:00
Scott Long 3426f0d419 Revert 1.228.2.4, it causes more problems than it solves. 2005-05-07 17:47:39 +00:00
SUZUKI Shinsuke 5e05b0be8a MFC Rev 1.12
fixed a possible reference to a broken memory
2005-05-07 08:31:55 +00:00
Bruce A. Mah 2248b93893 New errata items: SA-05:06.iir, SA-05:07.ldt, SA-05:08.kmem.
While 5.4-RELEASE contains the fixes for these bugs, it would have
been too difficult, at this stage in the release cycle, to add these
items to the 5.4 release notes and get all the various translations
updated.  Thus we put them in the not-as-time-critical errata
document.

Approved by:	re (hrs)
2005-05-07 04:22:54 +00:00
Colin Percival b9d1474367 If we are going to
1. Copy a NULL-terminated string into a fixed-length buffer, and
2. copyout that buffer to userland,
we really ought to
0. Zero the entire buffer
first.

Security: FreeBSD-SA-05:08.kmem
2005-05-06 02:50:00 +00:00
Colin Percival 370ca70d9d Correctly validate inputs to the i386_get_ldt syscall.
Security: FreeBSD-SA-05:07.ldt
2005-05-06 02:40:18 +00:00
Colin Percival 5d3dd1a9ec Correct improper permissions on /dev/iir. The earlier permissions
of 0644 allowed for people to do Evil Things via ioctl(2).

Security: FreeBSD-SA-05:06.iir
2005-05-06 02:33:46 +00:00
Doug White 389cbb3b60 Insta-MFC 1.86:
Fix 5704S on IBM/Intel blade servers.

Approved by:	re
2005-05-06 00:38:02 +00:00
Paul Saab 74f1081d20 MFC:
- Tweak kern_msgctl() to return a copy of the requested message queue id
  structure in the struct pointed to by the 3rd argument for IPC_STAT and
  get rid of the 4th argument.  The old way returned a pointer into the
  kernel array that the calling function would then access afterwards
  without holding the appropriate locks and doing non-lock-safe things like
  copyout() with the data anyways.  This change removes that unsafeness and
  resulting race conditions as well as simplifying the interface.
2005-05-05 19:57:04 +00:00
Paul Saab 19833d34ae MFC:
Split out kernel side of msgctl(2) into two parts.
2005-05-05 19:55:08 +00:00
Christian Brueffer f0bf293b38 MFC: rev. 1.37
Document the device burncd uses by default.
2005-05-05 19:30:28 +00:00
Tom Rhodes 2a0568049c MFC: Spell default correctly in a comment. 2005-05-05 19:05:19 +00:00
Tom Rhodes 3426dd29b0 MFC: 1.10
Fix two typos in comments.
2005-05-05 19:01:31 +00:00
Robert Watson cf65c1664c Merge ipcs.c:1.24 from HEAD to RELENG_5:
third of several commits to allow kernel System V IPC data structures
  to be modified and extended without breaking the user space ABI:

  Make the "ipcs" tool, which grubs around in kernel memory to report
  status relating to System V IPC, use the _kernel variants on the
  System V IPC data structures.

  Submitted by:   Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
  Obtained from:  TrustedBSD Project
  Sponsored by:   DARPA, SPAWAR, McAfee Research

Requested by:	ps
2005-05-05 18:54:58 +00:00
Robert Watson b7f1bdbe66 Merge sysv_msg.c:1.54, sysv_sem.c:1.71-1.72, sysv_shm.c:1.98,
msg.h:1.18:

  Second of several commits to allow kernel System V IPC data structures
  to be modified and extended without breaking the user space ABI:

  Use _kernel variants on _ds structures for System V sempahores, message
  queues, and shared memory.  When interfacing with userspace, export
  only the _ds subsets of the _kernel data structures.  A lot of search
  and replace.

  Define the message structure in the _KERNEL portion of msg.h so that it
  can be used by other kernel consumers, but not exposed to user space.

  Submitted by:   Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
  Obtained from:  TrustedBSD Project
  Sponsored by:   DARPA, SPAWAR, McAfee Research

  Correct two incorrectly merged changes introduced in sysv_sem.c:1.71:
  return EINVAL rather than setting error, and don't free sops
  unconditionally.  The first change was merged accidentally as part of
  the larger set of changes to introduce MAC labels and access control,
  and potentially lead to continued processing of a request even after
  it was determined to be invalid.  The second change was due to changes
  in the semaphore code since the original work was performed.

  Pointed out by: truckman

NOTE: Change to ipcs.c in user space that catches up with kernel header
changes to follow shortly in a second commit.  The API has changed, but
not the ABI.

Requested by:	ps
2005-05-05 18:53:13 +00:00
Tom Rhodes 9735517718 MFC: 1.117:
Get the directory structure correct in a comment.

Submitted by:	Samy Al Bahra
2005-05-05 18:36:03 +00:00
Robert Watson 56089485cc Merge msg.h:1.17, sem.h:1.28, shm.h:1.20 from HEAD to RELENG_5:
First of several commits to allow kernel System V IPC data structures
  to be modified and extended without breaking the user space ABI:

  Define _kernel wrapper data structures for the user-exposed data
  structures that current server as the internal data structures for
  the implementation:

  - struct msqid_kernel wraps struct msqid_ds.
  - struct semid_kernel wraps truct semid_ds.
  - struct shmid_kernel wraps struct shmid_ds.
  - Don't expose extern definition 'shmsegs' outside of sysv_shm.c.

  Submitted by:   Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
  Obtained from:  TrustedBSD Project
  Sponsored by:   DARPA, SPAWAR, McAfee Research

Requested by:	ps
2005-05-05 18:25:14 +00:00
Wilko Bulte 26b8114997 ICH5 is also supported by ichsmb 2005-05-05 12:03:36 +00:00
Doug White abe1c89707 Commit a workaround to panics in ttwwakeup() during open and closes of the
terminal sharing /dev/console. Peek at tty structs passing through ttymalloc()
and pass them to ttyrel() if they'd get reaped due to the refcount dropping
to 0. Also loosen up the refcount check in ttyrel() to account for
refcounting problems caused by the incestuous relationship. I left the
KASSERT alone in case people want to look into the underlying issue.

Reaping dying tty structs helps keep stale data from growing in the knote
lists, which eventually get tripped over, causing the panic.

This change does not apply to -CURRENT due to differences in tty handling.

MFC after:	3 days
2005-05-05 03:48:08 +00:00
Marcel Moolenaar ad82ba4279 MFC 1.6: Put gnome-lite and kde-lite on disc2 for ia64.
MT5.4 after: 2 days
2005-05-05 01:14:39 +00:00
Marcel Moolenaar 86d86bf0c3 MFC 1.2: Remove only the packages sub-directory before recreating it. 2005-05-05 01:02:39 +00:00
Marcel Moolenaar b817c338b7 MFC 1.883: Allow specifying which INDEX file to use by setting PKG_INDEX. 2005-05-05 00:53:29 +00:00
Vinod Kashyap 8f055ea1ec MFC of recent changes corresponding to the 9.2 release of twa.
MFC after:3 weeks
2005-05-04 19:26:30 +00:00
Hajimu UMEMOTO c472ad315c add missing mutex unlock in previous commit. 2005-05-04 18:49:00 +00:00
Hajimu UMEMOTO c44677fc7e enclose getservbyport(3) call with mutex lock.
since our getservbyport(3) is thread-safe on CURRENT, we don't need
this workaround on CURRENT.  however, it is not MFC'ed to RELENG_5,
yet.  so, we need this for RELENG_5.
this fix is candidate for MFS to be in time for 5.4-RELEASE.

Found by:	tools/regression/lib/libc/resolv/resolv -r
Reviewed by:	hrs
Tested by:	hrs
2005-05-04 18:00:33 +00:00
Peter Wemm 091d04ffc9 Record the freebsd.org cluster's configs to aid 5.x conversion. For
pam_krb5:
* disable pam_setcred, it fails very noisily on the cluster
* disable WARNS for the now-unused things from the first item
2005-05-04 16:30:10 +00:00
Peter Wemm 6cfa970556 Add the freebsd.org custer's source modifications under #ifdefs to aid
keeping things in sync.  For ksu:
* install suid-root by default
* don't fall back to asking for a unix password (ie: be pure kerberos)
* allow custom user instances for things like www and not just root
2005-05-04 16:26:58 +00:00
Andre Oppermann e108f29514 MFC:
tcp_output.c rev 1.109, tcp_subr.c rev 1.222, tcp_var.h rev 1.120.

  Ignore ICMP Source Quench messages for TCP sessions.  Source Quench is
  ineffective, depreciated and can be abused to degrade the performance
  of active TCP sessions if spoofed.

  Replace a bogus call to tcp_quench() in tcp_output() with the direct
  equivalent tcpcb variable assignment.

  Security:	draft-gont-tcpm-icmp-attacks-03.txt Section 7.1
2005-05-04 13:59:26 +00:00
Scott Long 66b5ee4769 Do the Giant locking dance when calling xpt_done(). This is not an MFC since
6-CURRENT solves the problem differently.  Thanks to Marcus Grando for
reporting and testing this.  5.4 candidate.
2005-05-03 20:10:40 +00:00
Scott Long a5b395531b Bugger, made the same typo in the previosu commit as the one to HEAD. Add a
needed comma.
2005-05-03 19:20:17 +00:00
Scott Long 48a4b414dd MFC rev 1.156: Don't ask busdma for an alignment for buffers. Fixes busdma
from trying to exhaust all virtual memory.  5.4 candidate.
2005-05-03 19:09:15 +00:00
Scott Long 7106495c4a MFC rev 1.17: Remove an extra mutex unlock. 5.4 candidate. 2005-05-03 19:04:56 +00:00
Jesus R. Camou 55bdc3177f MFC: Updates to the ppp(8) man page.
Approved by:	trhodes (mentor)
2005-05-02 07:22:37 +00:00
Maxim Konovalov 0e2d5e2faa MFC rev. 1.86: fix a typo. 2005-05-01 14:37:21 +00:00
Scott Long 7865825003 MFC rev 1.57: Fix speaker output for the AD1888 codec.
Submitted by: David Cross
2005-05-01 14:31:06 +00:00
Poul-Henning Kamp a2279c08c0 MFC:
open slices for write, otherwise we cannot modify the layout.
2005-05-01 07:35:23 +00:00
Yoshihiro Takahashi aa2d114f72 MFC: Add KDB_STOP_NMI option. 2005-05-01 06:06:27 +00:00
Doug White 08bcc11413 MFC: KDB_STOP_NMI functionality
Insta-MFC approved by:	re
2005-05-01 05:34:47 +00:00
Yoshihiro Takahashi 29f27abb52 MFC: Remove the wl driver. 2005-05-01 04:15:37 +00:00
Colin Percival 536789b006 MFC revision 1.26: Add PROC_UNLOCK(p) to PTRACESTOP_SC(p, td, flag), in
order to catch up to changes in the behaviour of ptracestop().

Approved by:	re (kensmith)
2005-05-01 04:03:06 +00:00
Christian S.J. Peron 114c3a9849 MFC revision 1.8
date: 2005/04/14 03:56:06;  author: csjp;  state: Exp;  lines: +2 -0
Do not remove logging sockets. This fixes an issue where logging
sockets placed into prisons from the host environment get clobbered
by the prison's instance of cleanvar. (assuming /etc/rc is run in
the prison).
2005-05-01 01:28:57 +00:00
Christian S.J. Peron 847397aa21 MFC revision 1.228
date: 2005/04/05 01:11:43;  author: csjp;  state: Exp;  lines: +1 -0
Assert that the vnode is locked. This is meant to catch bugs or
mis-use of the vnode API in conditions where IO_NODELOCKED has been
used without the vnode actually being locked.
2005-05-01 01:26:25 +00:00
Doug White 036888e19a Enable interrupts in smp_tlb_shootdown() and smp_targeted_tlb_shootdown()
to workaround Opteron Errata 106.  The while loop runs entirely out of
the instruction cache, which blocks updates to the cache from other CPUs.
Interrupts break the lock, allowing the write to post.

Many thanks to Paul Vixie and Peter Losher at ISC for providing resources
to troubleshoot the issue; Stephen Uphoff and Alan Cox for their
expertise; and the rest of the RE team for pushing the resolution along
so we can ship 5.4 with this fix.
2005-04-30 19:39:28 +00:00
Dag-Erling Smørgrav 5a26379573 MFC: (1.52) fix two long-standing bugs in pfs_readdir()
(1.56) fix an old cosmetic pasto
2005-04-30 18:40:47 +00:00
Poul-Henning Kamp 8161fe1b0c MFC:
Add Solaris new slice identifier.
	Don't prepend /dev if already absolute path.
	Open in correct mode if we resort to trying the slices.

Approved by:	re
2005-04-30 18:29:07 +00:00
Dag-Erling Smørgrav e7f31b123b MFC: if dumpdev is "AUTO", pick the first usable swap device from fstab. 2005-04-30 16:21:04 +00:00
Colin Percival 3e8db597ec MFC rev. 1.65: netstart is now obsoleted by /etc/rc.d/*, not by
/etc/rc.network.
2005-04-29 22:40:47 +00:00
cvs2svn 8f7e5c59f1 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-29 20:03:21 +00:00
Pawel Jakub Dawidek 1223d0f6c4 MFC: g_raid3.c 1.40
If an error occurs, clean up before returning from g_raid3_connect_disk().
2005-04-29 08:27:40 +00:00
Pawel Jakub Dawidek 74065fbff0 MFC: g_mirror.c 1.61
Make the code more obvious - when an error occurs in g_mirror_connect_disk(),
detach and destroy consumer before returning.
2005-04-29 08:24:56 +00:00
Pawel Jakub Dawidek 097f458c09 MFC: g_raid3_ctl.c 1.9
Check for return values.

Found by:	Coverity Prevent analysis tool
2005-04-29 08:17:15 +00:00
Pawel Jakub Dawidek 97a7014a42 MFC: g_mirror_ctl.c 1.10
Check for return values.

Found by:	Coverity Prevent analysis tool
2005-04-29 08:15:39 +00:00
Pawel Jakub Dawidek 59586b1b69 MFC: gstripe.8 1.25
Fix stripe size in example.

Found by:	kris
2005-04-29 08:08:28 +00:00
Pawel Jakub Dawidek 2b97510d13 MFC: g_mirror_ctl.c 1.11
Fix provider's size check for 'insert' command.
Before this fix one was able to insert one sector too small provider.
2005-04-29 08:07:00 +00:00
Pawel Jakub Dawidek 833ef1cb27 MFC: Makefile.inc 1.7
Allow classes to specify local source files.
2005-04-29 08:00:46 +00:00
Pawel Jakub Dawidek d92bedd8f2 MFC: geom.c 1.21
Empty error buffer is not an error.
2005-04-29 07:58:29 +00:00
Scott Long ae19aa7439 MFC rev 1.67 and 1.68: Create /dev/rdpt alias for /dev/asr to make the
management tools happy.
2005-04-29 04:48:12 +00:00
Scott Long 590a80f662 MFC: Don't compile EHCI for PAE. 2005-04-29 04:12:12 +00:00
Scott Long d82f9d42e1 MFC: Don't pretend to support CAM_DATA_PHYS 2005-04-29 04:11:30 +00:00
Marcel Moolenaar d9938f0d6e MFC rev. 1.12: Make the Z8530 more reliable as low-level console. 2005-04-28 18:59:52 +00:00
Paul Saab d7bf16f886 MFC:
Add support for the P600 and name the E400.
2005-04-28 14:49:52 +00:00
Paul Saab 6324f43600 MFC:
Provide a way to soft reset a proxy controller such as an MSA20 or
MSA500.
2005-04-28 14:47:05 +00:00
Yoshihiro Takahashi 6a952d8e09 MFi386: revision 1.597.2.7. 2005-04-28 13:48:34 +00:00
Kris Kennaway dfca97f5b3 MFC:
Add the vm.exec_map_entries tunable and read-only sysctl, which controls
  the number of entries in exec_map (maximum number of simultaneous execs
  that can be handled by the kernel).  The default value of 16 is
  insufficient on heavily loaded machines (particularly SMP machines), and
  if it is exceeded then executing further processes will generate a SIGABRT.

  This is a workaround until a better solution can be implemented.
2005-04-28 00:29:24 +00:00
Ken Smith e40f5853d7 MFC of revision 1.5 :
> date: 2005/04/17 23:30:20;  author: kensmith;  state: Exp;  lines: +0 -3
> Needed to drop "lang/gnat", "print/teTeX", and "textproc/docproj-jadetex"
> to make the packages fit on the CDs...
2005-04-27 13:52:45 +00:00
Hartmut Brandt dfceb6eb92 MFC: insert a comment character between .else/.endif and strings following
on the same line.
2005-04-27 13:52:35 +00:00
David Xu 9abd505d04 MFC Revision 1.261:
Wake up swapper process.
2005-04-27 13:00:29 +00:00
David Xu 9323e6b75a MFC Revision 1.251:
Inherit signal mask from parent process.
2005-04-27 11:32:23 +00:00
Doug Barton 4d1a9ca6d2 MFC 1.17 - 1.21:
1. Make sure that the /etc/namedb symlink is pointing to the right place.
2. Unmount the devfs when stop'ing (including on shutdown).
3. Require cleanvar.
2005-04-27 05:16:31 +00:00
Peter Wemm 3715713ded Partial MFC:
implement kernel side of i386_set_gsbase(2) and friends.
Add symbol to tell NDIS which slot to use.
Notable differences to -current:
  * gdt renumber not merged
  * user %cs/%ds still live in the ldt.
  * NDIS_SEL defined to same value as ndis code had hardcoded(!).

We could have libc and rtld switch to using this as the primary API
to implement TLS and avoid having a custom LDT for every process.
2005-04-26 21:20:20 +00:00
John Baldwin ff7a604c34 MFC: Close a race between sleepq_broadcast() and sleepq_catch_signals() by
merging sleepq_resume_thread() and sleepq_remove_thread().  This also
reduces the overall number of lock operations for sleep queue operations.
2005-04-26 18:01:31 +00:00
Marcel Moolenaar 66ba1d0808 Intend: unbreak the alpha tinderbox: The use of INT_MAX in the kernel
requires the explicit inclusion of <sys/limits.h>

Tested: not -- not even compiled. Just like the previous revision.
2005-04-25 23:02:21 +00:00
Peter Wemm 4b28631e8d Add 6.x-compatable fs/gsbase functions. This means we can use libraries with
these symbols to satisfy things like libpthread.so.0 when running on
a 6.x machine when the app is linked against libc.so.5.  Note that these
don't actually do anything on 5.x kernels yet.  I'd actually like to have
5.x use these in the future though, in order to get rid of the evil
#ifdef COMPAT_32BIT stuff.
2005-04-25 20:30:24 +00:00
Alexander Kabaev 1a26cdb57a MFC r1.14:
Do not try to store 64 bits into 32 bit errno variable.

Approved by:	re (kensmith)
2005-04-25 20:04:53 +00:00
Scott Long f3ac963ae1 Remove the ACPI_MAX_THREADS option. 2005-04-25 19:59:09 +00:00
Gleb Smirnoff 705b6b203e MFC 1.53:
Fix panics with misconfigured routing:
  - Backout previous revision, the check is useless.
  - Turn node to queue mode, since it is edge node.

Approved by:	re (kensmith)
2005-04-25 17:04:13 +00:00
Gleb Smirnoff f62e665c1c MFC 1.28:
Fix error in synproxy connection completion. Source and
  destination windows were confused, one instead of other.

Approved by:	re (kensmith)
2005-04-25 15:24:30 +00:00
Denis Peplin c53adaec59 Merge the following from the English version:
1.227.2.25 -> 1.227.2.28 hardware/common/dev.sgml

Update also Russian override of dev-auto.sgml
CVg:
2005-04-25 12:49:57 +00:00
David Xu 389c989106 MFC:
Fix race between thread_stopped and kern_wait.
2005-04-24 23:20:52 +00:00
Bjoern A. Zeeb 2751ae3f40 MFC: rev. 1.13
Add note to remove nis entries when compiling with NO_NIS.

Approved by:	pjd (mentor)
2005-04-24 20:33:06 +00:00
Bjoern A. Zeeb 40ef237a98 MFC: rev. 1.25 (HARDWARE section only)
Add D-Link DGE-530T to list of supported hardware.

Approved by:	pjd (mentor)
2005-04-24 20:31:14 +00:00
Paul Saab 04bb8ef07a MFC:
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().
2005-04-23 22:47:57 +00:00
Paul Saab 144ab4604c MFC:
- Use kern_setitimer(), kern_getitimer(), kern_select(), kern_utimes(),
  kern_statfs(), kern_fstatfs(), kern_fhstatfs(), kern_stat(),
  kern_fstat(), and kern_lstat().
2005-04-23 22:09:17 +00:00
Paul Saab e33e91e75e MFC:
Implement a kern_pathconf() wrapper for pathconf() which can take the
filename from either a user space or a kernel space pointer.
2005-04-23 22:02:07 +00:00
Paul Saab 5916f35031 MFC: rev 1.65
- Use kern_{l,f,}stat() and kern_{f,}statfs() functions rather than
  duplicating the contents of the same functions inline.
- Consolidate common code to convert a BSD statfs struct to a Linux struct
  into a static worker function.
2005-04-23 21:57:43 +00:00
Paul Saab 1140444cf4 MFC: rev 1.28
Make linux_emul_convpath() a simple wrapper for kern_alternate_path().
2005-04-23 21:56:04 +00:00
Paul Saab a55c931f30 MFC:
- Implement kern_foo wrappers for stat(), lstat(), fstat(), statfs(),
  fstatfs(), and fhstatfs().  Use these wrappers to cut out a lot of
  code duplication for freebsd4 and netbsd compatability system calls.
- Add a new lookup function kern_alternate_path() that looks up a filename
  under an alternate prefix and determines which filename should be used.
  This is basically a more general version of linux_emul_convpath() that
  can be shared by all the ABIs thus allowing for further reduction of
  code duplication.
2005-04-23 21:53:05 +00:00
Simon L. B. Nielsen d915db9929 MFC:
Cross reference ehci(4).
2005-04-23 21:42:29 +00:00
Paul Saab bba7788260 MFC rev 1.114 & 1.115
- Various and sundry style fixes.
- If the pointer to the new itimerval is NULL in kern_setitimer(),
  just read the old value via kern_getitimer().
2005-04-23 17:28:40 +00:00
Paul Saab d52f834a5f MFC: rev 1.165
Use kern_setitimer() to implement linux_alarm() instead of fondling the
real interval timer directly.
2005-04-23 16:38:27 +00:00
Paul Saab a6306d69d4 MFC: rev 1.50
Use kern_open() directly rather than a stackgap detour via open().
2005-04-23 16:36:52 +00:00
Yoshihiro Takahashi 87b90f880e MFC: Rename from apm_bioscall.s to apm_bioscall.S. 2005-04-23 13:32:35 +00:00
Pawel Jakub Dawidek 281ceec453 MFC: ufs_vnops.c 1.268
- Plug memory leak.
- Fix two style nits.

Found by:	Coverity Prevent analysis tool
Reviewed by:	rwatson
2005-04-23 12:29:22 +00:00
Pawel Jakub Dawidek d324a05667 MFC: Makefile 1.257
Add missing links.
2005-04-23 12:22:45 +00:00
Pawel Jakub Dawidek 953aac98eb MFC: gmirror.8 1.16
Remove duplicated description of 'clear' subcommand.

Pointed out by:	marck
2005-04-23 12:18:04 +00:00
Robert Watson cf6e43fa85 Merge libugidfw.c:1.7 from HEAD to RELENG_5:
In practice, you need to include <sys/types.h> and
  <security/mac_bsdextended/mac_bsdextended.h> in order to include
  <ugidfw.h>, so document that.
2005-04-23 11:54:15 +00:00
SUZUKI Shinsuke 04e4385ef0 MFC Rev1.11
plugged memory leak
2005-04-23 08:25:52 +00:00
SUZUKI Shinsuke c938956432 MFC Rev 1.14
FAITH's base spec has already been an RFC
2005-04-23 08:20:32 +00:00
Nate Lawson 2990c125fc MFC: Add the debug.acpi.max_threads tunable. 2005-04-22 23:26:46 +00:00
Nate Lawson a1fdf9939d MFC: Document debug.acpi.max_threads 2005-04-22 23:23:04 +00:00
Simon L. B. Nielsen 5385c6206d MFC:
Correct multiple security related errors: a buffer overflow, NULL
pointer dereferences, possible use of uninitialized variables, and
memory leaks.

Security:	CAN-2005-0753
Security:	FreeBSD-SA-05:05.cvs
Approved by:	peter
2005-04-22 18:01:04 +00:00
Remko Lodder 9274a7f521 MFC:
date: 2005/04/10 19:03:48;  author: remko;  state: Exp;  lines: +1 -0
Add myself to the calendar.

MFC after:      1 week
Approved by:    simon (mentor)
2005-04-22 17:28:17 +00:00
Tim J. Robbins 703b10f386 MFC rev. 1.30: correctly handle inputs with missing newline at EOF
in -f mode.
2005-04-22 11:41:45 +00:00
Pawel Jakub Dawidek 8dead41fb0 MFC: gmirror.8 1.15
Document 'clear' and 'dump' subcommands.
2005-04-22 09:20:23 +00:00
Maxim Konovalov c3e3d461e8 MFC rev. 1.162: disable random port allocation when
ip.portrange.first == ip.portrange.last.
2005-04-22 08:08:54 +00:00
Paul Saab 83ccd73358 MFC:
- Move the function prototypes for kern_setrlimit() and kern_wait() to
  sys/syscallsubr.h where all the other kern_foo() prototypes live.
2005-04-21 22:19:22 +00:00
Paul Saab 2ce08b36ec MFC:
Split out kernel side of {get,set}itimer(2) into two parts: the first that
pops data from the userland and pushes results back and the second which does
actual processing. Use the latter to eliminate stackgap in the linux wrappers
of those syscalls.
2005-04-21 22:00:10 +00:00
Paul Saab fcfbbebf81 MFC:
kern_kevent prototype
2005-04-21 21:14:03 +00:00
Paul Saab 7497ba49d6 MFC:
regen after changing the freebsd32_kevent prototype.
2005-04-21 21:12:17 +00:00
Paul Saab 5ad1fecaf8 MFC:
Use kern_kevent instead of the stackgap for 32bit syscall wrapping
and correct the freebsd32_kevent prototype.
2005-04-21 21:11:24 +00:00
Paul Saab a6a52a2550 regen for kevent 2005-04-21 21:01:47 +00:00
Paul Saab dbf4b084e1 MFC: rev 1.186
Change the prototype of kevent to remove the const from the changelist.
2005-04-21 21:00:18 +00:00
Jesus R. Camou 44ee75e56a MFC: changes that have been applied over the years
to the devfs(8) man page.

Approved by:	trhodes (mentor)
2005-04-21 20:51:51 +00:00
Paul Saab b999e4002d MFC:
kern_ntptime.c, kern_time.c, sys_generic.c p1003_1b.c, syscallsubr.h:
- Implement kern_adjtime(), kern_readv(),
  kern_sched_rr_get_interval(), kern_settimeofday(), and
  kern_writev() to allow for further stackgap reduction in
  the compat ABIs.

osf1_misc.c:
- Use a custom version of copyinuio() to implement
  osf1_{read,write}v() via kern_{read,write}v().

linux32_machdep.c:
- Use a custom version of copyinuio() to implement readv/writev using
  kern_readv/writev.
- Use kern_sched_rr_get_interval() rather than the stackgap.

freebsd32_misc.c:
- Use a custom version of copyinuio() to implement readv/writev using
  kern_readv/writev.
- Use kern_settimeofday() and kern_adjtime() rather than
  stackgapping it.

ibcs2_misc.c:
- Use kern_settimeofday() to avoid stackgap use.
2005-04-21 20:33:05 +00:00
Warner Losh ab4f63c403 MFC 1.158: enable mii/phy on Xircom cards before probing for the mii/phy
rather than after.

This should be merge to RELENG_5_4 too.
2005-04-21 17:54:11 +00:00
Warner Losh 87e678347b MFC: Fix parsing of nomatch events. Also, sync usage to man page.
This should be merged to RELENG_5_4.
2005-04-21 17:51:26 +00:00
David E. O'Brien e7c9a3d9f6 MFC: rev 1.30: default boot0 to packet mode. 2005-04-21 15:51:44 +00:00
David E. O'Brien 9445266f88 MFC: rev 1.14: remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS). 2005-04-21 15:42:28 +00:00
Marius Strobl 3ef4eb62cf MFC: 1.16
Release the IRQ resource on detach. This fixes repeatedly loading and
unloading the hme(4) module in case it attaches to sbus(4).
2005-04-20 23:37:01 +00:00
Marius Strobl 2112f03a3a MFC: 1.125 (partial)
- In sparc64_init() remove the call to tick_stop(). There's no need to
  call tick_stop() again after tick_init() as tick interrupts already
  have been disabled as part of tick_init().
- Use FBSDID.
2005-04-20 23:36:29 +00:00
Marius Strobl 359e25c162 MFC: cpufunc.h 1.19, 1.20; tick.c 1.16 (partial)
- Add a workaround for a bug in BlackBird CPUs (said to be part of the
  SpitFire erratum #54) which can cause writes to the TICK_CMPR register
  to fail. This seems to fix the dying clocks problem reported by jhb@
  and kris@.
- In tick_init() just use tick_stop() for stopping the tick interrupts
  until a proper handler is set up later. This also stops the system
  tick interrupt on USIII systems earlier.
- Some minor changes, e.g. use FBSDID, remove unused headers, etc.
2005-04-20 23:35:52 +00:00
Marius Strobl 242a5795da MFC: 1.22
Some changes to intr_execute_handlers():
- Fix NULL pointer dereferences caused when an ithread or a handler is
  NULL which happens when a stray interrupt triggers after the respective
  device interrupt was torn down.
- Remove the critical section around INTR_FAST handlers which actually
  was a nested critical section. Both tl0_intr() and tl1_intr() already
  enter a critical section for calling intr_execute_handlers().
2005-04-20 23:34:37 +00:00
cvs2svn 1e4e7f70c0 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-20 19:11:06 +00:00
Philip Paeps 8b6049c9f9 MFC snmp_pf. From the original commit message:
| Add snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
 | Currently implemented are most things related to states and interfaces, todo
 | are address tables and altq.  I've tried to keep this roughly in sync with a
 | project implementing this for net-snmpd.
2005-04-20 08:45:13 +00:00
Stefan Farfeleder 8a653559c7 MFC rev. 1.31 and 1.32:
Replace buggy for-loops to skip certain character with strspn().  If *fmt was
'\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating
null character.

Assign 0.0 to the variable passed to getfloating() if the argument is missing.
2005-04-20 08:03:58 +00:00
Julian Elischer 05ad169e2a MFC 1.12: a small change to allow a record-only USB device. 2005-04-20 06:43:41 +00:00
Paul Saab 1655f06d0e MFC: rev 1.142
Deal with zero length transfers before we even get to fo_ops->fo_read().
2005-04-19 20:02:37 +00:00
Paul Saab 02fa045d29 MFC: rev 1.10 tcp_sack.c, 1.118 tcp_var.h, 1.69 inet.c
Add limits on the number of elements in the sack scoreboard both
per-connection and globally. This eliminates potential DoS attacks
where SACK scoreboard elements tie up too much memory.
2005-04-19 18:37:26 +00:00
Paul Saab d6efbec6e6 MFC: rev 1.271 tcp_input.c, rev 1.13 tcp_sack.c, rev 1.119 tcp_var.h
Fix for a TCP SACK bug where more than (win/2) bytes could have been
in flight in SACK recovery.
2005-04-19 18:34:06 +00:00
Paul Saab 3dcc33acd3 MFC: rev 1.270 of tcp_input.c, rev 1.25 of tcp_seq.h
- Tighten up the Timestamp checks to prevent a spoofed segment from
  setting ts_recent to an arbitrary value, stopping further
  communication between the two hosts.
- If the Echoed Timestamp is greater than the current time,
  fall back to the non RFC 1323 RTT calculation.
2005-04-19 18:32:35 +00:00
Paul Saab a62f724865 MFC: rev 1.269 of tcp_input.c, rev 1.221 of tcp_subr.c
- If the reassembly queue limit was reached or if we couldn't allocate
  a reassembly queue state structure, don't update (receiver) sack
  report.
- Similarly, if tcp_drain() is called, freeing up all items on the
  reassembly queue, clean the sack report.
2005-04-19 18:30:40 +00:00
Paul Saab 8e3960c4bc MFC: rev 1.12
When the rightmost SACK block expands, rcv_lastsack should be updated.
2005-04-19 18:28:23 +00:00
Paul Saab edf71d9367 MFC: rev 1.11
Remove some unused sack fields.
2005-04-19 18:27:34 +00:00
Thomas Quinot 82b1e8532d MFC rev. 1.11: Fix discrepancy between documentation and implementation:
the destination port is incremented for each packet sent to the same hop.
2005-04-19 11:58:04 +00:00
Hiroki Sato 41eb07d717 Add -S option which allows to change the pathname of the privileged
socket /var/run/logpriv.  MFC from:

	src/usr.sbin/syslogd/syslogd.8	1.60
	src/usr.sbin/syslogd/syslogd.c	1.142
2005-04-19 09:33:14 +00:00
Peter Wemm 44a6b15a04 MFC: stop vm86bios calls from panicing the system or corrupting the first
4 bytes of random pages.  Rename the vm86 data structure in the pcb from
__pcb_spare[] to pcb_vm86[] to hopefully avoid this happening again.

This was broken in September 2003, and the bug is present in 5.2 and later.
2005-04-18 21:21:47 +00:00
Nate Lawson 998b49f885 MFC 1.10: Fix overflow of buf from printing the XSDT address. 2005-04-18 16:48:10 +00:00
Nate Lawson ee7a4011f2 MFC 1.44: Fix multi-byte access with optimized mbnambuf. 2005-04-18 16:45:50 +00:00
Yoshihiro Takahashi 761cf8fafe MFC: Fix the apm module on pc98. 2005-04-18 12:49:10 +00:00
Yoshihiro Takahashi 64cc5c2597 MFC: Remove unneeded include. 2005-04-18 12:45:11 +00:00
Xin LI e9ea4041e2 MFC 1.8: Remove duplicated "bytes". 2005-04-18 10:00:02 +00:00
Colin Percival fd9bf0a3d7 MFC revision 1.31: Use bsdtar instead of GNU tar.
Discussed with:	kientzle, kensmith
2005-04-18 06:08:28 +00:00
Colin Percival 235dbcc731 Add edwin (not to be confused with erwin, who added himself 22 months
ago).
2005-04-18 01:29:30 +00:00
Maxim Konovalov b1826c4657 o MFC rev. 1.89: add DragonFly 1.2.0. 2005-04-17 12:16:45 +00:00
Maxim Konovalov 7e214bb184 MFC rev. 1.36: document net.inet.ip.maxfragpackets and maxfragsperpacket
sysctls.
2005-04-17 12:13:44 +00:00
Robert Watson 1bffa83eeb Merge kern_malloc.c:1.139 from HEAD to RELENG_5:
Consistently style function declarations in kern_malloc.c.
2005-04-16 18:41:07 +00:00
Robert Watson a6af937ddf Merge README:1.6 from HEAD to RELENG_5:
Update copyright: parts of the netipx implementation are covered by a
  2005 copyright.
2005-04-16 18:40:23 +00:00
Robert Watson 5dad66d4fb Merge ipx_input.c:1.51 from HEAD to RELENG_5:
Compare (mbuf *) with NULL, not 0.
2005-04-16 18:39:33 +00:00
Robert Watson 650617ee4d Merge Makefile:1.13 from HEAD to RELENG_5:
Don't define FS_DEBUG by default, as this causes growfs to write debugging
  information to /tmp/growfs.debug, which is a world-writable directory.

  Reported by:    Jon Passki <[email protected]>

RELENG_5_4 candidate.
2005-04-16 18:38:16 +00:00
Robert Watson fa6ec9f9e9 Merge ffsinfo.8:1.16 and ffsinfo.c:1.10 from HEAD to RELENG_5:
Don't default to '/var/tmp/ffsinfo' for the output of ffsinfo(8), since
  /var/tmp is a world-writable directory.

  Reported by:    Jon Passki <[email protected]>

RELENG_5 candidate.
2005-04-16 18:37:40 +00:00
Simon L. B. Nielsen 21ad58339b MFC 1.30:
- Add Dell PERC 4ei to the list of supported devices.  It's an
  alias used by Dell sometimes for PERC 4e/Si. [1]
- Delete some trailing whitespace.

Rapported by:	Jon Kuster <[email protected]> [1]
2005-04-16 16:30:52 +00:00
Ruslan Ermilov 7f117cf1c1 MFC: polling(4) support for xl(4). 2005-04-16 05:36:09 +00:00
John Baldwin 2e3782c764 MFC: Explicitly linux_base 8. 2005-04-15 22:18:55 +00:00
Christian Brueffer 7f77c68caa MFC: rev 1.5
Correct typo.
2005-04-15 14:59:37 +00:00
Gleb Smirnoff 3f29477f5d MFC 1.27:
Fix mss byte order, only affects synproxy code path.

  Submitted by:   John L. Scarfone via OpenBSD
  Reviewed by:    mlaier
  Obtained from:  OpenBSD, rev. 1.483

Approved by:	re (kensmith)
2005-04-15 13:22:03 +00:00
Denis Peplin adfc7c69fe Typo fix 2005-04-15 13:13:08 +00:00
Denis Peplin 74b4f6bb70 Merge the following from the English version:
1.761.2.39 -> 1.761.2.41 relnotes/common/new.sgml
2005-04-15 12:49:24 +00:00
Julian Elischer 02f895789b MFC of changes fro NetBSD and Kazuhito HONDA
to enable recording and source selection on uaudio devices.
2005-04-15 04:15:24 +00:00
Colin Percival 753520d95a Zero the ifr.ifr_name buffer in ifconf() in order to avoid
accidental disclosure of kernel memory to userland.

Security:	FreeBSD-SA-05:04.ifconf
2005-04-15 01:52:40 +00:00
Doug Barton ead05243bc MFC fixes for rc.d/random:
/var/db/entropy -> /var/db/entropy-file, and
Fix error message when save fails.

Approved by:	re (kensmith)
2005-04-14 21:58:55 +00:00
Doug Barton 82ebe5d347 MFC bug fix from 1.3 re entropy_save_sz.
Approved by:	re (kensmith)
2005-04-14 21:51:33 +00:00
Nate Lawson 04e9e0b5ac Hook devclass_get_drivers man page to the build.
Reminded by:	brueffer
2005-04-14 18:20:59 +00:00
Nate Lawson 40eabed7d7 MFC: prototype for devclass_get_drivers()
Pointy hat:	njl
2005-04-14 18:11:13 +00:00
Denis Peplin a177392bdb Merge the following from the English version:
1.27.2.2 -> 1.27.2.3 install.sgml
   1.9 -> 1.8.2.1 layout.sgml
   1.16 -> 1.14.2.1 trouble.sgml
2005-04-14 14:02:27 +00:00
Nate Lawson 5c0934710d MFC 1.39 - 1.43: Optimize mbnambuf and chksum routines, saving 75% wall time. 2005-04-14 04:58:40 +00:00
Nate Lawson 6a2dff0d71 MFC: devclass_get_maxunit() fix and docs, add devclass_get_drivers() 2005-04-14 04:54:15 +00:00
Christian Brueffer 8aca2ec173 MFC:
Autogenerate hardware notes for snd_als4000.4, snd_fm801.4 and snd_via8233.4.
2005-04-13 20:24:43 +00:00
Ian Dowse daa923680c MFC 1.57: fix the handling of the UCS_RXSTOP flag so that it always
tracks whether or not the receive pipe is stopped. This ensures
that we do not attempt to start the same transfer twice, and it
allows ucomstop() to skip the restarting of the read pipe if it was
not originally running, such as when called indirectly from
ucomreadcb()

PR:		kern/79420
2005-04-12 23:45:34 +00:00
Maksim Yevmenkin 1d632169c3 MFC to RELENG_5 ng_btsocket.c v1.11
Remove PR_ATOMIC flag in ng_btsocket_protosw[] for BLUETOOTH_PROTO_RFCOMM
protocol. RFCOMM is a SOCK_STREAM protocol not SOCK_SEQPACKET. This was a
serious bug caused by cut-and-paste. I'm surprised it did not bite me before.
Dunce hat goes to me.

Approved by:	re (kensmith)
2005-04-12 16:56:09 +00:00
Maksim Yevmenkin 08e1e80368 MFC to RELENG_5 ng_bt3c_pccard.c v1.11
Correct typo that could cause FIFO overflow.

PR:		kern/78431
MFC after:	3 days
Approved by:	re (kensmith)
2005-04-12 16:52:04 +00:00
Christian Brueffer e7591e55e0 Quote sound device names which contain numbers.
Note that this change does not apply to -CURRENT, because config(8)
there has been modified not to require the quoting.
2005-04-12 14:37:36 +00:00
Christian Brueffer 76e08e17eb MFC: rev. 1.249 by simon
Auto generate device listings for the following drivers: snd_csa(4) and
snd_gusc(4).
2005-04-12 14:13:18 +00:00
Christian Brueffer ba9167fed8 MFC: rev. 1.57 by simon
- Fix device names for snd_vibes(4) and snd_via82c686(4).
- Bump copyright year.
2005-04-12 13:59:10 +00:00
Pawel Jakub Dawidek b4898b3ae4 Fix a long-standing bug. Error string has to be copyied from the user
process context.

Approved by:	phk
Approved by:	re (kensmith)
2005-04-12 13:31:31 +00:00
Sheldon Hearn 05d8f352a4 MFC rev 1.33: regen
Approved by:	re (kensmith)
2005-04-12 13:05:41 +00:00
Diomidis Spinellis cd3c96421e MFC: Remove wrong -unfilled .Bd argument implied by -literal. 2005-04-12 06:25:01 +00:00
Brooks Davis c11779a9cb Back out previous commit (MFC of removal of if_name() function) because
it breaks the ABI for at least two kernel modules.  The PR is still
fixed because the real problem is only in 4.x.
2005-04-12 00:48:59 +00:00
Brooks Davis 138c65cf09 MFC:
Since net/net_osdep.c contained only one function that could be
  trivially implemented as a macro, do that and remove it.  NetBSD did
  this quite a while ago.

PR:		kern/33201
Prodded by:	Matteo Riondato <rionda at gufi dot org>
2005-04-12 00:05:10 +00:00
David Malone 142835c90e Sync with -current. Includes man page updates and syslogd.c changes:
1.141	Check facility is not too big.
1.140	Allow : and % in hostnames for IPv6.
1.139	Deal with using whitespace as a hostname delimiter.
2005-04-10 19:56:44 +00:00
Robert Watson b846957210 Merge sched_4bsd.4:1.1-1.2 and sched_ule.4:1.1 from HEAD to RELENG_5:
Add rudimentary man pages for kernel options sched_4bsd and sched_ule,
  which document some of the sysctls available for configuring 4bsd, some
  of the bullet features of ule, and that ule is considered experimental
  still.

  Fix small spelling error.
2005-04-10 18:13:57 +00:00
cvs2svn 57eb54e79f This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-10 18:12:08 +00:00
Diomidis Spinellis c82b2d8a1f MFC the new pipe sub-namespace. 2005-04-10 07:58:05 +00:00
Ken Smith 2ec3152bc2 Disable the NO_MIXED_MODE option by default but leave it as a commented
entry to make it easy to find.  It causes some popular motherboards to
fail and the magic required to make them work isn't widely known.

Requested by:	des and others whose email address I've lost
Discussed with:	peter, obrien, re@
Tested by:	various folks on amd64@, des, kensmith
MTR5_4:		Soon
2005-04-09 17:00:17 +00:00
Xin LI 954177627b MFen to 1.17
Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-09 06:22:32 +00:00
Xin LI f64d4c20f6 MFen to 1.10
Obtained from: The FreeBSD Simplified Chinese Project
2005-04-09 03:09:06 +00:00
Warner Losh 07c88c6202 More information about port upgrading from kris@. Cross reference
/usr/ports/UPDATING at his suggestion.
2005-04-08 23:30:08 +00:00
Warner Losh d7304b1e02 Renumber the footnotes on the 4.x -> 5 section.
Add information from rwatson for the problems he's encountered, along with
expanded advise for ports, packages and updating systems that once ran
2.x and/or 3.x.  Not kerberos issues, even though I have no work around.

This should bring the issues wrt 4.x->5 more up to date.  Let me know if
there are other issues.
2005-04-08 23:02:23 +00:00
Diomidis Spinellis 405b2f9cd8 MFC 1.241-1.242:
- Return POLLHUP rather than POLLIN/POLLOUT on TS_ZOMBIE ttys
- Remove unneeded POLLWRNORM (old bug)
- TS_ZOMBIE ttys will set POLLIN and POLLRDNORM
- Do not call selrecord in TS_ZOMBIE ttys

PR:	kern/73821
2005-04-08 21:42:13 +00:00
David E. O'Brien 6e6bdccc24 'apic' isn't optional, so dont speak as if it is. 2005-04-08 20:24:07 +00:00
John Baldwin 1ec9a928f4 MFC some 64-bit fixes:
- Fix some sign extension problems with implicit 32 to 64 bit conversions.
- Fix the mmap2() wrapper to not truncate high addresses.
2005-04-08 19:41:40 +00:00
Gleb Smirnoff e96262b679 MFC 1.18:
When a packet has been reinjected into ipfw(4) after dummynet(4) processing
   we have a non-NULL args.rule. If the same packet later is subject to "tee"
   rule, its original is sent again into ipfw_chk() and it reenters at the same
   rule. This leads to infinite loop and frozen router.

   Assign args.rule to NULL, any time we are going to send packet back to
   ipfw_chk() after a tee rule. This is a temporary workaround, which we
   will leave for RELENG_5. In HEAD we are going to make divert(4) save
   next rule the same way as dummynet(4) does.

   PR:             kern/79546
   Submitted by:   Oleg Bulyzhin
   Reviewed by:    maxim, andre

Approved by:	re (kensmith)
2005-04-08 12:36:23 +00:00
Gleb Smirnoff a9cf366b92 MFC 1.5, 1.6:
- Be more informative about advbase and advskew.
   - Fix ifconfig commands.

Approved by:	re (kensmith)
2005-04-08 12:31:14 +00:00
Jeff Roberson a8e2f5bac9 - Fix kern/78664, restore the old ioctl length verification code for 5.x.
Contributed by:	Dan Nelson
2005-04-08 12:05:37 +00:00
Gleb Smirnoff 856aeda50a MFC:
part of revision 1.8:
  - Xref flowctl.8
  revision 1.6, 1.5, 1.4:
  - Added the SYNOPSIS section.
  - Sort sections.
  - Markup style.
  revision 1.3:
  1. To give the user a clue about the expiration timeout values, mention
     the default timeouts of 1800 (activity) and 15 (inactivity) seconds.
  2. Fix the "ifinfo" ASCII control message description:
     it requires the interface number as an argument.

Approved by:	re (kensmith)
2005-04-08 11:55:56 +00:00
cvs2svn cbb292f1d5 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-08 05:10:19 +00:00
Matthew N. Dodd 5fc5dd4252 MFC: In ata_finish() don't reset callout if request has timed out.
Thanks to Karl Denninger for finding and testing earlier patches.

Reviewed by:	scottl, sos
Approved by:	re
2005-04-08 03:27:11 +00:00
Peter Wemm e07e70c7ab MFC: Fix sign extension bug in sigreturn(2) that broke signals.
Approved by: re (kensmith)
2005-04-08 03:13:15 +00:00
Nate Lawson 97bc410e5b MFC 1.244: Set freq to high instead of leaving boot default
Approved by:	re (kensmith)
2005-04-07 17:29:04 +00:00
Bruce A. Mah 3ea9259eae Don't try to install the recently deorbited Early Adopters Guide
to a RELNOTESng snapshot.
2005-04-07 16:12:09 +00:00
Hidetoshi Shimokawa a779280ce7 Add missing sources. 2005-04-07 07:00:24 +00:00
Poul-Henning Kamp 84d1a941cf MFC:
revision 1.50

	natd core dumps when -reverse switch is used because of a bug in
	libalias.

Approved by:	re@
2005-04-07 05:57:17 +00:00
cvs2svn 118dccd603 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-07 05:46:47 +00:00
Xin LI e76a37cce8 MFen 1.761.2.42-1.761.2.43
Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-07 03:00:27 +00:00
Hiroki Sato 150f5d9927 Remove the Migration Guide from {release,ftp,cdrom}.* targets.
Pointed out by:	jhb
2005-04-07 02:40:14 +00:00
Xin LI d48755950a Add a missing </para> 2005-04-07 02:40:04 +00:00
Hiroki Sato ccd26fd404 Deorbit the Migration Guide on RELENG_5. 2005-04-06 18:35:13 +00:00
Maxime Henrion b63a982aba MFC if_fxp.c rev 1.230:
date: 2005/03/16 16:39:04;  author: mux;  state: Exp;  lines: +3 -4
  Unload and destroy the TX DMA maps before destroying the DMA tag
  they're attached to, not after.

  Spotted by:     Coverity via sam

Reminded by:	delphij
Approved by:	re@ (kensmith)
2005-04-06 14:14:24 +00:00
Pawel Jakub Dawidek df310c2cec - Add a missing g_io_deliver() in case of allocation failure - we didn't
completed I/O requests here.
- First allocate all needed bios, so if any of allocations fail, we can
  free memory before sending any I/O requests down.

Reported by:	Pawel Malachowski
Approved by:	re (kensmith)
2005-04-06 13:08:24 +00:00
Colin Percival 5849e64080 Fully initialize the required TSS fields so that the io permission
bitmap is set correctly.

Patch from:	peter
Security:	FreeBSD-SA-05:03.amd64
2005-04-06 01:05:51 +00:00
Jacques Vidrine f9b0891844 MFC 1.39: Correct type mismatch. 2005-04-05 18:28:07 +00:00
Jacques Vidrine 5571bad979 MFC rev 1.37, 1.38: Correct a typo that resulted in rexecd behaving as
if the `-i' option was always specified.  Correct some mostly
theoretical bugs related to misuse of the static buffer returned by
getpwnam.

Security: rexecd's document default policy of disallowing root logins
          was not enforced.
2005-04-05 15:28:30 +00:00
Colin Percival dbfbfa0d2e MFC revision 1.103.
Security:	FreeBSD-SA-05:02.sendfile
2005-04-04 23:53:36 +00:00
Ken Smith 69c1ec09e6 Default for hw.ata.atapi_dma is now PIO.
Reminded by:	Joel Dahl <joel (at) automatvapen (dot) se>
2005-04-04 17:23:16 +00:00
Ken Smith 83800a16cb Change the default for hw.ata.atapi_dma so that DMA is off. We are
seeing a lot of install problems that get fixed by turning DMA
off.  The sparc64 mailing list sees the most reports of this but it
does come up on others.  Changing the default should give us a more
robust install, at the expense of people who need DMA for burning
CDs needing to turn it on (maybe).

The same change will be made in HEAD shortly by the ata maintainer.

Discussed with:	sos, scottl
2005-04-04 16:42:35 +00:00
cvs2svn 0856fa56ce This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-04 15:26:52 +00:00
Ruslan Ermilov 22444df86b MFC: 1.2: Fixed "make clean". 2005-04-04 10:04:52 +00:00
Ruslan Ermilov befd9fb516 MFC:
- 1.489: Protect against DESTDIR being set during the build32.
- 1.490: Fix AMD64 cross-builds when NO_LIB32 is not defined.
2005-04-04 10:02:53 +00:00
Xin LI d5363ebbba MFen 1.69.2.17
Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-03 18:10:57 +00:00
Xin LI 09b984c3c4 MFC 1.3 (effectively MFen 1.27.2.2 -> 1.27.2.3)
Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-03 17:43:58 +00:00
Xin LI 7f18120641 MFC 1.3 (a.k.a. MFen 1.276 -> 1.277).
Effectively MFen 1.227.2.25 -> 1.227.2.26

Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-03 16:56:13 +00:00
Warner Losh 5e49a4bcb1 MFC:
o FreeBSD 2-4 dump tape reading
	  - get dates right
	  - get bounds righ
	o FreeBSD 1 dump tape reading
	  - fix old directory and inodes
	o Remove -c and references to it: it was removed a while ago
2005-04-03 16:44:44 +00:00
Xin LI c090784919 MFen 1.761.2.39 -> 1.761.2.41
(1.761.2.42 is excluded intentionally so this can be merged into
RELENG_5_4)

Obtained from:	The FreeBSD Simplified Chinese Project CVS
2005-04-03 16:02:51 +00:00
Hiroki Sato a6b7334328 Trim Errata for the upcoming 5.4R. 2005-04-03 15:33:02 +00:00
Hiroki Sato 61b434e53a Update &release.*; and trim release documentation for
the release after 5.4R.
2005-04-03 15:23:39 +00:00
Ken Smith ec7fca4fbc Add packages-5.4-release. 2005-04-03 08:57:08 +00:00
Ken Smith 4de2e66611 Update __FreeBSD_version for post-RELENG_5_4 branch. 2005-04-03 08:55:19 +00:00
Ken Smith b0ad5123b8 Branch for RELENG_5_4 has been made so RELENG_5 shifts to STABLE. 2005-04-03 08:53:59 +00:00
Ken Smith 3d471a0792 Updates for 5.4. 2005-04-03 08:52:03 +00:00
Ken Smith f86f2b0dde Update for 5.4. 2005-04-03 08:50:00 +00:00
Ken Smith 963e919a2c Caught this while reviewing files in preparation for the branch
tagging.  Change the (commented out) suggestion of what to set
RELEASETAG to so it's RELENG_5.

Approved by:	re (implicit)
2005-04-03 06:01:07 +00:00
Bruce A. Mah c4e8144b24 MFC: arcmsr(4).
Approved by:	re (blanket)
2005-04-02 23:29:42 +00:00
Bruce A. Mah 18431a28a2 MFC: Rewrite the fixit section to reflect reality as I understand it.
trouble.sgml	1.16 -> 1.17

Approved by:	re (blanket)
2005-04-02 20:03:20 +00:00
Bruce A. Mah 42bfb805ff MFC: Mention that CDROMs have a slightly different layout than what is
pictured here.  We might want to show a real CDROM layout here.
Also clarify that whatever's in the floppies/ directory is primarily
useful to users who actually need to boot from floppy to start an
installation.

	layout.sgml	1.9 -> 1.10

Approved by:	re (blanket)
2005-04-02 20:02:42 +00:00
Bruce A. Mah 04d890ff1a MFC: Use <replaceable></replaceable> elements where appropriate for floppy
disk names.  "Approximately three...floppies" is kind of weird to me, so
substitute "several" here instead.

	install.sgml	1.30 -> 1.31

Approved by:	re (blanket)
2005-04-02 20:01:56 +00:00
Christian Brueffer 3eeb5a7222 MFC:
Autogenerate device listings for arcmsr(4).

Approved by:	re (blanket)
2005-04-02 19:44:11 +00:00
Scott Long 9f6a053ddd MFC: Glue the arcmsr driver into the tree.
Approved by: re
2005-04-02 16:37:58 +00:00
Scott Long bcaabd51c5 MFC: Add the arcmsr manpage.
Approved by: re
2005-04-02 16:20:34 +00:00
Scott Long f121c06b83 MFC: Add the arcmsr driver.
Approved by: re
2005-04-02 16:14:54 +00:00
Ken Smith 542ea5915a MFC revision 1.4
> date: 2005/03/31 13:52:12;  author: kensmith;  state: Exp;  lines: +0 -1
> Remove the print/acroread package due to licensing concerns.
>
> Requested by:   trevor (acroread maintainer)
> Seconded by:    Mark Linimon, Joerg Wunsch

Approved by:	re (scottl)
2005-04-02 16:11:54 +00:00
Xin LI 313e3866b5 Update to follow latest RELENG_5 errata custom, with some language
adjustments.

This is MFen 1.69.2.1 -> 1.69.2.16 with current errata items trimmed.

Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-04-02 13:28:15 +00:00
David Schultz 72cc2c5cdf MFC swap_pager.c,v 1.268:
Move the swap_zone == NULL check earlier (i.e. before we dereference
  the pointer.)

Approved by:	re
Requested by:	delphij
2005-04-02 13:05:15 +00:00
Bruce A. Mah 8886063187 MFC: cdce(4), docs moved to disc2.
Approved by:	re (blanket)
2005-04-02 05:44:50 +00:00
John-Mark Gurney e31e295051 MFC:
>   fix misspelling of 0x30...
>
>   Revision  Changes    Path
>   1.43      +1 -1      src/sys/dev/pci/pcireg.h

Approved by:	re (kensmith)
2005-04-02 05:03:34 +00:00
Yoshihiro Takahashi 59449e86dc MFi386: revision 1.413.2.11 (Add a commented-out ehci entry).
Approved by:	re (kensmith)
2005-04-02 04:01:08 +00:00
John-Mark Gurney 2f019d00cc MFC:
>   add some additional pci classes and sub-classes..

and:
>   fix a copy/paste typo for scanner/gameport...

>   Revision  Changes    Path
>   1.284     +25 -1     src/sys/dev/pci/pci.c
>   1.41      +36 -2     src/sys/dev/pci/pcireg.h
>   1.24      +25 -1     src/usr.sbin/pciconf/pciconf.c
>   1.42      +2 -2      src/sys/dev/pci/pcireg.h

Approved by:	re (kensmith)
2005-04-01 22:53:42 +00:00
Jesus R. Camou 2f61b02caf MFC: New manpage for snd_via8233(4).
Approved by: 	re (kensmith), trhodes (mentor)
2005-04-01 22:45:57 +00:00
John Baldwin 39efe5a8f9 MFC: Add HID for the Toshiba SPA40.
Approved by:	re (kensmith)
2005-04-01 20:30:11 +00:00
John Baldwin e9134352fc MFC: Move the docproj docs over to disc2 to make more room on the disc1
ISO image.

Approved by:	re (scottl)
2005-04-01 20:25:00 +00:00
John Baldwin daf0f6f2a6 MFC: Update the Romania NTP server.
Approved by:	re (kensmith)
2005-04-01 20:19:30 +00:00
Doug Rabson 9da76180f3 MFC: 1.106 Initialise unused DTV slots.
Approved by: re
2005-04-01 19:06:56 +00:00
John-Mark Gurney fdbf9af583 MFC:
>   relocate the power state transition statements to the
>   pci_set_powerstate_method function...

and:
>   move the statement about switching power states to just before we do it, so
>   we don't print a false statement if the destination powerstate is
>   unsupported...
>
>   Revision  Changes    Path
>   1.283     +5 -15     src/sys/dev/pci/pci.c
>   1.285     +7 -5      src/sys/dev/pci/pci.c

Approved by:	re (kensmith)
2005-04-01 18:45:44 +00:00
Bill Paul dde0e2c71f MFC kern_ndis.c rev 1.76, make sure ndis_intrhand() is also wrapped
propperly for amd64.

Approved by:	re (kensmith)
2005-04-01 17:14:20 +00:00
John-Mark Gurney bb2b13f521 MFC:
>  Implement mimimum system software delays, per PCI PM 1.1 spec, as
>  suggested by Peter Edwards.  This seems to fix my fxp problems and
>  likely will fix his as well.  Use DELAY rather than *sleep because we
>  can be called from any context.
>
>  Revision  Changes    Path
>  1.274     +55 -38    src/sys/dev/pci/pci.c
>  1.275     +2 -2      src/sys/dev/pci/pci.c

Approved by:	re (scottl)
2005-04-01 16:18:04 +00:00
Xin LI 8d01130249 Several language improvements.
Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-04-01 15:28:25 +00:00
Robert Watson 4216df0718 Socket lock changes associated with the change to solisten() structural
changes were mis-merged when brought from HEAD to RELENG_5, as the
socket lock was acquired before the protocol locks, rather than after,
violating the lock order.  This commit synchronizes the lock acquisition
with the same code in HEAD.

Approved by:	re (scottl)
2005-04-01 15:04:19 +00:00
Robert Watson b59e286a19 Merge sys_socket.c:1.68 from HEAD to RELENG_5:
The SO_NOSIGPIPE socket option allows a user process to mark a socket
  so that the socket does not generate SIGPIPE, only EPIPE, when a write
  is attempted after socket shutdown.  When the option was introduced in
  2002, this required the logic for determining whether SIGPIPE was
  generated to be pushed down from dofilewrite() to the socket layer so
  that the socket options could be considered.  However, the change in
  2002 omitted modification to soo_write() required to add that logic,
  resulting in SIGPIPE not being generated even without SO_NOSIGPIPE when
  the socket was written to using write() or related generic system calls.

  This change adds the EPIPE logic to soo_write(), generating a SIGPIPE
  signal to the process associated with the passed uio in the event that
  the SO_NOSIGPIPE option is not set.

  Notes:

  - The are upsides and downsides to placing this logic in the socket
    layer as opposed to the file descriptor layer.  This is really fd
    layer logic, but because we need so_options, we have a choice of
    layering violations and pick this one.

  - SIGPIPE possibly should be delivered to the thread performing the
    write, not the process performing the write.

  - uio->uio_td and the td argument to soo_write() might potentially
    differ; we use the thread in the uio argument.

  - The "sigpipe" regression test in src/tools/regression/sockets/sigpipe
    tests for the bug.

  Submitted by:           Mikko Tyolajarvi <mbsd at pacbell dot net>
  Talked with:            glebius, alfred
  PR:                     78478

Approved by:	re (scottl)
2005-04-01 15:02:12 +00:00
Xin LI 4300d29a4e MFen: 1.227.2.24 -> 1.227.2.25
Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-04-01 13:45:48 +00:00
Xin LI 8472c954de MFen: 1.761.2.37 -> 1.761.2.39
Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-04-01 13:43:24 +00:00
Denis Peplin 6cf7afb9a0 Merge the following from the English version:
1.21.2.6 -> 1.21.2.7 early-adopter/article.sgml (rev. update)
   1.761.2.37 -> 1.761.2.39 relnotes/common/new.sgml
   1.8 -> 1.8.2.1 share/sgml/release.dsl (rev. update)

Approved by:	re (blanket)
2005-04-01 13:11:04 +00:00
Maxim Sobolev 313c7c52a6 MFC:
o Add new cdce(4) driver;

o move some common code out of every USB etherned driver into a central
  location.

Approved by:	re (scottl)
2005-04-01 12:46:27 +00:00
Xin LI dfe1fb4367 MFC revision 1.151 (gibbs):
date: 2005/03/23 16:43:29;  author: gibbs;  state: Exp;  lines: +13 -2
  Restore queue depth settings across tag disable events.  The system often
  disables tag queuing temporarily in order to allow controllers a window
  to safely perform transfer negotiation with non-compliant devices.  Before
  this change, CAM would restore the queue depth to the controller specified
  maximum or device quirk level rather than any depth determined by reactions
  to QUEUE FULL/BUSY events or an explicit user setting.

  During device probe, initialize the flags field for XPT_SCAN_BUS.
  The uninitialized value often confused CAM into not bothering to
  issue an AC_FOUND_DEVICE async event for new devices.  The reason
  this bug wasn't reported earlier is that CAM manually announces
  devices after the initial system bus scans.

Approved by:	re (scottl)
2005-04-01 12:44:03 +00:00
Xin LI 847f83c7a8 MFC:
Don't pass unadulterated unit numbers to make_dev and its ilk- if you
  have more than 256 units, you die. Horribly. Convert them using
  unit2minor.

Original -HEAD Revisions:
  1.43      +5 -4      src/sys/cam/scsi/scsi_pass.c
  1.31      +1 -1      src/sys/cam/scsi/scsi_ses.c

Approved by:	re (scottl)
2005-04-01 12:40:25 +00:00
Xin LI fbe5501910 MFC revision 1.23 (by scottl)
date: 2005/03/19 06:32:57;  author: scottl;  state: Exp;  lines: +0 -1
  Don't free the SIM object twice.

  Submitted by: Coverity Prevent analysis tool

Approved by:	re (scottl)
2005-04-01 12:29:23 +00:00
Xin LI d1cb66d37a MFC revision 1.281 (by imp)
date: 2005/03/15 22:53:31;  author: imp;  state: Exp;  lines: +3 -1
  If bus_generic_susped returns an error, devlist is not freed.  Free it.

  Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)

Approved by:	re (scottl)
2005-04-01 12:26:21 +00:00
cvs2svn 47ca84ce2a This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-04-01 10:36:10 +00:00
Colin Percival 1b3c3e6536 MFC revision 1.158: Note the passing of Cameron Grant <[email protected]>.
Approved by:	re (scottl)
2005-04-01 10:13:36 +00:00
Robert Watson b25a410353 Merge tcp_usrreq.c:1.116 from HEAD to RELENG_5:
In tcp_usr_send(), broaden coverage of the socket buffer lock in the
  non-OOB case so that the sbspace() check is performed under the same
  lock instance as the append to the send socket buffer.

Approved by:	re (kensmith)
2005-04-01 05:38:58 +00:00
Robert Watson f05e4514b1 Merge bpf.c:1.144 from HEAD to RELENG_5:
In bpf_setf(), protect against races between multiple user threads
  attempting to change the BPF filter on a BPF descriptor at the same
  time: retrieve the old filter pointer under the same locked region
  as setting the new pointer.

Approved by:	re (kensmith)
2005-04-01 05:35:46 +00:00
Robert Watson 994c773b08 Merge bpf.c:1.143 from HEAD to RELENG_5:
Update a comment describing bpf_iflist to indicate that the BPF interface
  structures correspond to specific link layers, so the same network
  interface may appear more than once.

Approved by:	re (kensmith)
2005-04-01 05:35:10 +00:00
Robert Watson 4c4a917c77 Merge uipc_socket2.c:1.144 from HEAD to RELENG_5:
When upcalling from a socket in soisconnected() for an accept filter,
  call with flag M_DONTWAIT rather than M_TRYWAIT, as we don't want to
  do blocking memory allocation (etc) in the netisr.

Approved by:	re (kensmith)
2005-04-01 05:34:18 +00:00
Maxim Sobolev 77e7c164ef MFC: When re-connecting already connected datagram socket ensure to clean
up its pending error state.

Approved by:	re (kensmith)
2005-03-31 22:35:23 +00:00
Maxim Sobolev 01df2deaf3 MFC: Always produce cpuX entries, even in the case when there is only one CPU
in the system. This is consistent with what real linuxes do.

Approved by:	re (kensmith)
2005-03-31 22:27:16 +00:00
Maxim Sobolev 8d9141bb74 MFC: Regen after addition of linux_nosys handler.
Approved by:	re (kensmith)
2005-03-31 22:24:24 +00:00
Maxim Sobolev 83f733eecb MFC: Handle unimplemented syscall by instantly returning ENOSYS instead of sending
signal first and only then returning ENOSYS to match what real linux does.

Approved by:	re (kensmith)
2005-03-31 22:17:42 +00:00
Marius Strobl a7affabe3a MFC: 1.13
- Allocate the interrupt resource as RF_SHAREABLE allowing uart(4) to work
  with shared IRQs in case the bus code, MD interrupt code, etc. permits.
  Together with sys/sparc64/sparc64/intr_machdep.c rev. 1.21 (MFC'ed in
  rev. 1.19.2.1) this fixes an endless loop in uart_intr() when using the
  second NS16550 on the ISA bus of sparc64 machines.
- Destroy the hardware mutex on detach and in case attaching fails.

Approved by:	re (kensmith, scottl)
2005-03-31 21:55:39 +00:00
Marius Strobl 03cbf01365 MFC: 1.20, 1.21
- Assorted style fixes and minor changes.
- Allow multiple INTR_FAST handlers for the same source. The motivation
  for this are the on-board SCCs and UARTs that use a shared IRQ.
- Rework the interrupt counting code to account for shared interrupts.
- In case ithread_add_handler() failed in inthand_add() just return with
  the error code instead of setting up a non-fast handler regardless or
  setting up a non-fast handler instead of a fast handler. I can't think
  of a situation where the former behaviour would do the right thing.

Approved by:	re (kensmith, scottl)
2005-03-31 21:53:15 +00:00
Bill Paul b5c06828af MFC subr_ndis.c 1.83: s/ntoskrnl_functbl/ndis_functbl/ in ndis_findwrap().
Hopefully this will be the last time I need to touch any of this.

Approved by:	re
2005-03-31 21:50:11 +00:00
Ian Dowse 73e3d23bc6 MFC 1.2: update BUGS section to reflect recent EHCI changes.
Approved by:	re (kensmith)
2005-03-31 19:49:06 +00:00
Ian Dowse bd44f2394f MFC 1.35: remove trailing whitespace and update TODO comments.
Approved by:	re (kensmith)
2005-03-31 19:47:11 +00:00
Ian Dowse 3a7e153710 MFC 1.17: Reduce verbosity of ehci boot messages.
Approved by:	re (kensmith)
2005-03-31 19:45:09 +00:00
Ian Dowse 6577677171 Add a commented-out ehci entry.
Approved by:	re (kensmith)
2005-03-31 19:40:49 +00:00
Ian Dowse 4354cf0bdd MFC:
1.120 Use M_NOWAIT when allocating from a callout routine.
 1.121 Fix an incorrect NULL argument to usbd_set_interface()
       associated with the ALT_IFACE_1 quirk.

Approved by:	re (kensmith)
2005-03-31 19:38:40 +00:00
Ian Dowse 1d3dd4523f MFC:
1.67 Root hubs don't have transaction translators, so so skip
      printing the message about them if the hub depth is zero.
 1.68 Fix incorrect language parameter when getting the device serial
      number

Approved by:	re (kensmith)
2005-03-31 19:36:59 +00:00
Ian Dowse 5cf46c8bc5 MFC 1.106: Explore ehci busses before others.
Approved by:	re (kensmith)
2005-03-31 19:33:44 +00:00
Olivier Houchard 88f84e8ace MFC rev 1.37:
date: 2005/01/05 00:06:15;  author: cognet;  state: Exp;  lines: +2 -2
Disable checksum offloading by default. It seems to produce corrupted packets
with some revisions of the chip (particularly when using multiple TX
descriptors).

Approved by:	re
2005-03-31 17:38:39 +00:00
Gleb Smirnoff 08022fab00 When several carp interfaces are attached to Ethernet interface,
carp_carpdev_state_locked() is called every time carp interface is attached.
  The first call backs up flags of the first interface, and the second
  call backs up them again, erasing correct values.
    To solve this, a carp_sc_state_locked() function is introduced. It is
  called when interface is attached to parent, instead of calling
  carp_carpdev_state_locked. carp_carpdev_state_locked() calls
  carp_sc_state_locked() for each sc in chain.

  Reported by:    Yuriy N. Shkandybin, sem

Approved by: re (kensmith)
2005-03-31 17:33:30 +00:00
Pawel Jakub Dawidek 21853f9fd5 Properly return rule number.
Submitted by:	Wojciech A. Koszek
PR:		bin/79292
OK'ed by:	rwatson
Approved by:	re (kensmith)
2005-03-31 17:19:50 +00:00
Gleb Smirnoff fd64f67dff MFC 1.27:
- Don't free mbuf, passed to interface output method if the latter
    returns error. In this case mbuf has already been freed. [1]
  - Remove redundant declaration.

  PR:             kern/78893 [1]
  Submitted by:   Liang Yi [1]
  Reviewed by:    sam

Approved by:	re (kensmith)
2005-03-31 17:03:45 +00:00
Bill Paul fa907d7bd4 MFC fix from subr_ndis.c rev 1.82. This fixes the use of
NdisMInitializeTimer() on amd64. (ndis_timercall() must be wrapped
since it is invoked with MS calling conventions).

Approved by:	re
2005-03-31 17:00:39 +00:00
Bruce A. Mah 2d11b3c83f MFC: SA-05:01, configuration file reader fix,
Approved by:	re (blanket)
2005-03-31 16:57:09 +00:00
Marius Strobl a9454bcc35 MFC: 1.10
When disarming a watchdog by using an interval of WD_TO_NEVER a non-zero
return value of the ioctl doesn't indicate that the command has failed
so don't let watchdog(8) return an error in this case.

Approved by:	re (kensmith)
2005-03-31 15:17:06 +00:00
Maxim Sobolev 16128c84a3 MFC:
o Enable all supported frame types when neither is enabled explicitly in
  the kernel config;

o fix ef(4) driver when kernel compiled w/o IPX.

Approved by:	re (kensmith)
2005-03-31 14:58:36 +00:00
Christian Brueffer 1c0128dabe MFC: rev. 1.2 by ru
Markup and grammar fixes.

Approved by:	re (blanket)
2005-03-31 14:46:03 +00:00
Maxim Sobolev d89614607b MFC: semctl(2) with IPC_STAT command should return zero in case of success.
Approved by:	re (kensmith)
2005-03-31 14:36:50 +00:00
Christian Brueffer 55ec67b83f MFC: rev. 1.9 by ru
Tiny markup fixes.

Approved by:	re (blanket)
2005-03-31 14:35:30 +00:00
Maxim Sobolev 5c6889fe4e MFC: Don't ignore the last line of config files (/etc/hosts, /etc/services,
etc.).

Approved by:	re (kensmith)
2005-03-31 14:33:17 +00:00
Christian Brueffer 0238963499 MFC: rev. 1.16 + 1.17
- The make_dev(9) functions no longer handle dev_ts, but struct cdevs.
- Bump .Dd

Approved by:	re (blanket)
2005-03-31 14:20:12 +00:00
Hiroki Sato 2a071f069d MFC:
re(4) ALTQ support and replace of some RFC derived manual pages.

Update release notes:
        s/Early Adopter's Guide/Migration Guide/[*]

Pointed out by: delphij[*]
Approved by:    re (implicitly)
2005-03-31 06:28:58 +00:00
Nate Lawson ac42334f8c MFC 1.91: Drop down to a single task queue thread
Approved by:	re (kensmith, scottl)
2005-03-31 06:03:59 +00:00
Bill Paul d42be8359f Grrr. I said no if_ndis_usb.c, and I meant it.
Approved by:	re
2005-03-31 04:27:38 +00:00
Bill Paul d7ff03e430 MFC all of the recent enhancements and bug fixes from the head to
RELENG_5. This includes almost everything, except for if_ndis_usb.c,
which is just a stub at the moment and won't be ready in time for
5.4, and for the patches to enable "ifconfig ndis0 scan" to work,
since net80211 in RELENG_5 doesn't support it.

Also turn on ndiscvt(8) for the amd64 platform.

Approved by:	re
2005-03-31 04:24:36 +00:00
George V. Neville-Neil 61f79baa15 Complete the MFC of the man pages from CURRENT to STABLE.
Add in the new files.

Update the Makefile.inc to handle gai_strerror.3

Reviewed by:	re (Hiroki Sato)
Approved by:	re (Hiroki Sato)
2005-03-31 01:52:54 +00:00
George V. Neville-Neil b67eefc7a0 MFC of new IPv6 related man pages from CURRENT to STABLE.
The way this was done in HEAD was to remove the old pages
and add the new pages.  The same process is being followed here in
STABLE.

Reviewed by:	Hiroki Sato for Release Engineering
Approved by:	re (Hiroki Sato) for Release Engineering
2005-03-31 01:27:22 +00:00
Maxime Henrion 7b21d362e4 MFC if_ixgb.c r1.6 to r1.7, if_ixgb.h r1.4 and if_ixgb_osdep.h r1.3:
Fix a bunch of bugs I came accross when looking at the ixgb(4) driver,
  some of which are rather serious:
  - Use the device sysctl tree instead of rolling our own.
  - Don't create a bus_dmamap_t to pass to bus_dmamem_alloc(), it is
    bus_dmamem_alloc() that creates it itself.  The DMA map created
    by the driver was overwritten and its memory was leaked.
  - Fix resource handling bugs in the error path of ixgb_dma_alloc().
  - Don't use vtophys() to get the base address of the TX and RX rings
    when busdma already gave us the correct address to use!
  - Remove now useless includes and the alpha_XXX_dmamap() hack.
  - Don't initialize if_output to ether_output(), ether_ifattach() does
    it for us already.
  - Add proper module dependencies on ether and pci.

Tested by:	Paul Willmann willmann at rice dot edu
Approved by:	re@ (kensmith)
2005-03-30 23:08:46 +00:00
Kenneth D. Merry 0bf87d74fe MFC, scsi_cd.c rev 1.93
Fix a problem with the cd(4) driver -- the CAMGETPASSTHRU ioctl wouldn't
succeed if there was no media in the drive.

This was broken in rev 1.72 when the media check was added to cdioctl().

For now, check the ioctl group to decide whether to check for media or not.
(We only need to check for media on CD-specific ioctls.)

Reported by:	bland
Approved by:	re (kensmith)
2005-03-30 14:54:17 +00:00
Kenneth D. Merry 66bad8ccd4 MFC, scsi_ch.c rev 1.42
Fix a place where we were referencing a pointer after it had been freed.

Submitted by:	"Henry Miller" <[email protected]>
Approved by:	re (kensmith)
2005-03-30 14:52:03 +00:00
Kenneth D. Merry 63d9317146 MFC:
camcontrol.c: 1.53
camcontrol.8: 1.40

Add "report only" functionality to 'camcontrol format', so users can get a
report on the status of a format already running on a drive.

Fix status reporting for 'camcontrol format'.  This was broken in rev 1.34
of camcontrol.c, almost 4 years ago!

Submitted by:	joerg (most of the reportonly changes)
Approved by:	re (kensmith)
2005-03-30 14:48:22 +00:00
Maxim Sobolev 46d85b82e0 MFC: comment out rue_miibus_statchg() function, which messes up PHY after
UP->DOWN->UP sequence of link state changes.

Approved by:	re (kensmith)
2005-03-30 12:31:55 +00:00
John-Mark Gurney 895fbff1ce MFC:
>   remove unimplemented part of the interface..                                >
>   Revision  Changes    Path
>   1.29      +0 -3      src/sys/sys/event.h

Approved by:	re (kensmith)
2005-03-30 08:11:34 +00:00
John-Mark Gurney 662c3e422a MFC:
>   fix kldloading of pci driver modules after boot on sparc64...  since
>   we weren't using the pci module, we weren't restoring the pci state...
>
>   Revision  Changes    Path
>   1.6       +1 -1      src/sys/sparc64/pci/ofw_pcibus.c

Approved by:	re (kensmith)
2005-03-30 08:10:37 +00:00
Simon L. B. Nielsen 794906f479 MFC 1.5+1.6:
- Add nForce4 to the list of supported audio devices.
- Bump documentation date.

Approved by:	re (blanket)
2005-03-30 07:43:45 +00:00
Brian Feldman c06b2d467d MFC r1.147:
You must selwakeup{,pri}() when closing a selectable object or the
    td->td_sel will get trashed and crash the system.  Fix BPF's mistake
    in this area.

Approved by:	re
2005-03-30 05:11:12 +00:00
Tai-hwa Liang 09ee294fe3 MFC: (1.22) Releasing TX/RX descriptor dmamaps during device detachment
instead of doing that in bfe_stop().

Reviewed by:	sam (mentor)
Approved by:	re (kensmith)
2005-03-30 01:50:44 +00:00
Murray Stokely e5b5734a5c MFC: Add device ID for Planet IA 128P-STD card.
Approved by:	re (kensmith)
2005-03-30 01:10:57 +00:00
Murray Stokely 46a8f8bbb5 MFC: Add device ID for nForce 4 audio controller.
Approved by:	re (kensmith)
2005-03-30 01:09:21 +00:00
Murray Stokely 89106ac0b8 MFC: Typo fix
Approved by:	re (kensmith)
2005-03-30 01:07:32 +00:00
Murray Stokely 6ac85545e6 MFC: Comments to note bpf is required for DHCP.
Approved by:	re (kensmith)
2005-03-30 01:05:54 +00:00
David Schultz d213a11778 MFC proc.h,v 1.422 ffs_softdep.c,v 1.179:
Avoid recursively processing the worklist.

Approved by:	re
2005-03-29 07:24:50 +00:00
David Schultz 1a802ddd3d MFC svr4_stream.c,v 1.53:
Bounds check the user-supplied length used in a copyout() in
  svr4_do_getmsg().

Approved by:	re
2005-03-29 07:24:48 +00:00
David Schultz 589592b0cb MFC sys_process.c,v 1.130:
Add missing cases for PT_SYSCALL.

Approved by:	re
2005-03-29 07:24:46 +00:00
David Schultz e627fa36b2 MFC linux32_sysvec.c,v 1.7 exec.h,v 1.32:
Make ps_nargvstr and ps_nenvstr unsigned.

Approved by:	re
2005-03-29 07:24:45 +00:00
David Schultz 58de56de53 MFC mlx_pci.c,v 1.21:
If mlx_attach() returns an error, don't free sc again.

Approved by:	re
2005-03-29 07:24:43 +00:00
David Schultz 7894bc1a13 MFC gui_lib.c,v 1.4:
Don't read past the end of pVDevice[].

Approved by:	re
2005-03-29 07:24:42 +00:00
David Schultz 3c2e3a85ac MFC npx.c,v 1.159 npx.h,v 1.28:
Initialize the mxcsr properly, so the initial value in a process isn't
  just the value that was left over from some other application.

Approved by:	re
2005-03-29 07:24:39 +00:00
David Schultz 7193b113fc MFC entry.c,v 1.7:
Don't write past the end of the VendorId field.

Approved by:	re
2005-03-29 07:24:38 +00:00
David Schultz 27b3a815cb MFC math.h,v 1.57:
Add missing prototypes for fma() and fmaf(), and remove an inaccurate
  comment.

Approved by:	re
2005-03-29 07:24:35 +00:00
David Schultz 8dd3cd9244 MFC fenv.h,v 1.3:
Work around a gcc bug.

Approved by:	re
2005-03-29 07:24:34 +00:00
Colin Percival 0d61ad8223 MFC revision 1.105: If "dangerous" environment variables are used, then
make sure the libraries loaded aren't on a noexec-mounted filesystem.

Approved by:	re (kensmith)
2005-03-29 04:57:32 +00:00
John Baldwin 957cbf2e10 MFC: Simplify the optimizations for spinlocks on UP to just skip the atomic
ops but still preserve mtx.mtx_lock and turn them on.

Approved by:	re (kensmith)
2005-03-28 20:17:30 +00:00
John Baldwin 77ff52db50 MFC: Define mtx_assert() and friends if either INVARIANTS or
INVARIANT_SUPPORT so that modules only need to define INVARIANTS to use it.

Approved by:	re (kensmith)
2005-03-28 19:52:31 +00:00
Scott Long 1f9dc4e98c Fix compile error from last commit.
Approved by: re
2005-03-28 19:03:41 +00:00
Bjoern A. Zeeb 18297d3dae MFC if_sk.c rev. 1.99:
* When adding/deleting multicast addresses, only whack the address filter
    if the interface is marked RUNNING.
  Obtained from:  NetBSD if_sk.c rev. 1.12

  * Don't initialize the card (and start an autonegotiation) every time the IP
    address changes. Makes 'dhclient sk0' invocations way faster and more
    consistant. i.e. one DHCPREQUEST elicits the DHCPACK.
  Obtained from:  OpenBSD if_sk.c rev. 1.56

  * Additional locking changes in sk_ioctl.

MFC if_sk.c rev. 1.100, if_skreg.h rev. 1.26

  * Improve chip identification.
  Obtained from:  NetBSD if_sk.c rev. 1.11

  * Take PHY out of reset for Yukon Lite Rev. A3.
  Submitted by:   postings on net@ in thread "skc0: no PHY found", 2005-02-22

MFC if_sk.c rec. 1.102, if_skreg.h rev. 1.28

  Do not try to free non allocated memory in error case.
  Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...).
  Log if we cannot free because memory still in use.
  Change locking to avoid ''acquiring duplicate lock of same
    type: "network driver"'' and potential deadlock. Also seems to fix LOR #063.
  PR: kern/75677

Approved by:	re (scottl)
Approved by:	rwatson (mentor)
2005-03-28 16:21:16 +00:00
Max Laier e1f76e2e34 MFC, if_re.c, rev. 1.41:
ALTQ support for re(4).

	Submitted by:	Chris Dionissopoulos, Theo Schlossnagle
	PR:		kern/78681

Approved by:	re (kensmith)
2005-03-28 16:05:33 +00:00
Jacques Vidrine e59c23cda9 MFC src/contrib/telnet/telnet.c 1.16: Correct buffer overflows in
telnet(1).
Security: CAN-2005-0468, CAN-2005-0469
Approved by:	re
2005-03-28 15:48:39 +00:00
Andrew Gallatin 1c3e0126be MFC:
Zero the reserved fields of the header, as per rfc 2734.  This change
results in connectivty to MacOSX hosts via fwip.

Approved by:	re (kensmith)
2005-03-28 13:05:40 +00:00
Maxim Konovalov 51bf5022b5 MFC rev. 1.161 sys/netinet/in_pcb.c and rev. 1.43 share/man/man4/ip.4:
document net.inet.ip.portrange.random* sysctls.

Approved by:	re (hrs)
2005-03-28 12:29:35 +00:00
Xin LI 0f0b806ed4 MFen: Copyright Year Update
- hardware/common/artheader.sgml:	1.5	   -> 1.5.2.1

Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-03-27 17:21:29 +00:00
Xin LI 12e614d502 Sync translation with my local work. This is essentially MFen of:
- hardware/common/dev.sgml:		1.227.2.14 -> 1.227.2.24
 - installation/common/install.sgml:	1.27	   -> 1.27.2.2
 - relnotes/common/new.sgml:		1.761.2.11 -> 1.761.2.37

Which has made Simplified Chinese translation in sync with RELENG_5
again.

Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (blanket)
2005-03-27 17:11:14 +00:00
Nate Lawson a32d1ae990 MFC 1.5: Remove usbd requirement
Approved by:	re (kensmith)
2005-03-27 03:39:37 +00:00
Ralf S. Engelschall c806db2e52 MFC revision 1.4:
1. Annotate the rc.conf reference with a hint to the "cloned_interfaces"
   variable, because it might be not obvious how to configure carp(4)
   devices in rc.conf.

2. Remove the sentence about the not implemented "carpdev" option (this
   was not imported from OpenBSD according to our source code) to avoid
   confusion.

Approved by: re
2005-03-26 19:15:12 +00:00
Simon L. B. Nielsen 04a90014c0 MFC 1.12:
Add byteorder(9) to SEE ALSO.

Approved by:	re (hrs)
2005-03-26 19:09:43 +00:00
Christian Brueffer ba3c12e55f MFC: rev. 1.50
Document support for the ITE IT8212F.

Approved by:	re (blanket)
2005-03-26 07:18:05 +00:00
Julian Elischer 81beeacf70 MFC: free the pointer pointed to the "spare" thread and not the one
pointed to by "us". This isnot really a problem in practice because
it nearly always points to the same cred but it could have caused a problem
in the future.

Approved by:	re (ken)
2005-03-25 23:57:08 +00:00
John Baldwin dd0bfe9139 MFC: sync with HEAD.
Approved by:	re (kensmith)
2005-03-25 21:40:13 +00:00
John Baldwin b2a9ca415e MFC: Sync up the list of FTP mirrors, NTP servers, and keyboard maps with
HEAD.

Approved by:	re (kensmith)
2005-03-25 21:39:33 +00:00
John Baldwin 487c241497 MFC: Recover gracefully if the user puts the wrong CD in.
Approved by:	re (kensmith)
2005-03-25 21:38:26 +00:00
John Baldwin 36830f3bef MFC: Always read RTC_IN to clear any pending interrupt when writing to
RTC_STATUSB.

Approved by:	re (kensmith)
2005-03-25 21:31:46 +00:00
John Baldwin 1c0d457b7a MFC: Fix some older SMP machines that route their PCI interrupts over ISA
IRQs by using the trigger mode indicated by the ELCR for ISA IRQs if a
valid ELCR is present.

Approved by:	re (kensmith)
2005-03-25 21:10:07 +00:00
John Baldwin 77c8ff0106 MFC: Tweak the ELCR support so that other parts of the kernel than just
the atpic driver can know if it exists and is valid or not.

Approved by:	re (kensmith)
2005-03-25 21:08:49 +00:00
John Baldwin beff346edd MFC: Unbreak stack traces for double faults.
Approved by:	re (kensmith)
2005-03-25 21:07:21 +00:00
David E. O'Brien 47af131c9b MFC: revs 1.9-10: USB keyboard support & fix a bunch of stack leaks.
Approved by:	re(scottl)
2005-03-25 19:21:35 +00:00
Gleb Smirnoff d5db118c91 MFC 1.5:
Plug item leak, which occured when m_pullup() failed.

Approved by:	re (kensmith)
2005-03-25 17:55:15 +00:00
Gleb Smirnoff f11f45d8d1 MFC 1.10:
- Don't lose TCP flags of the first packet in a flow.
   - Don't account length of the first packet in a flow twice.

Approved by:	re (kensmith)
2005-03-25 17:52:25 +00:00
John-Mark Gurney 6c23ac1ca0 MFC:
>fix aio+kq... I've been running ambrisko's test program for much longer
>w/o problems than I was before...  This simply brings back the knote_delete
>as knlist_delete which will also drop the knote's, instead of just clearing
>the list and setting _ONESHOT...
>
>Fix a race where if a note was _INFLUX and _DETACHED, it could end up being
>modified... whoopse..
>
>Revision  Changes    Path
>1.90      +11 -8     src/sys/kern/kern_event.c
>1.183     +1 -1      src/sys/kern/vfs_aio.c
>1.28      +6 -1      src/sys/sys/event.h

Approved by:	re (kensmith)
2005-03-25 16:28:05 +00:00
Bruce A. Mah ac5cdbf699 Grrr. The previous commit added some tabs that replaced
spaces in the middle of lines.  This wasn't intended; apparently
emacs tabify doesn't do what I thought it did.  Go fix these up.

As before, no content changes, this only affects whitespace.

den also submitted a fix-up patch that was nearly identical to
this change.

Pointed out by:	Kelly Yancy < kbyanc#at#posi#dot#net >, den
Approved by:	re (blanket)
2005-03-25 15:53:33 +00:00
Denis Peplin 9876ec301a Merge the following from the English version:
1.21.2.4 -> 1.21.2.6 early-adopter/article.sgml
   1.5 -> 1.5.2.1 hardware/common/artheader.sgml

Approved by:	re (implicitly)
2005-03-25 15:06:14 +00:00
Ken Smith 039248ca6e MFC v1.105:
> Log:
> Update parsing of the ports INDEX file to accomodate some new
> fields that got added to it recently-ish.  While here document
> what each of the fields is based on discussion with portmgr@.
>
> Patch from:     murray (slightly adapted)

Approved by:	re (scottl)
2005-03-25 14:41:25 +00:00
Denis Peplin e47b75bfeb Update copyright years.
Approved by:	re (hrs)
2005-03-25 07:08:36 +00:00
Kirill Ponomarev d4428641b9 MFC BSD.local.dist revision 1.114 and BSD.x11-4.dist revision 1.26:
date: 2005/03/22 18:29:41;  author: krion;  state: Exp;  lines: +4 -0
  Add mt locale directory, since more and more ports create and use it.

Approved by:	re (kensmith)
2005-03-25 06:31:08 +00:00
Bruce A. Mah 3e0f806ed8 Whitespace, no content changes.
(Trimmed whitespace at end of lines and used emacs tabify.)

Approved by:	re (blanket)
2005-03-25 00:07:51 +00:00
Bruce A. Mah 4b6da5c047 Update for the upcoming 5.4-RELEASE.
Fix up an omission related to obsolete BIND executables that should
have been in the 5.3-RELEASE version of this document (obtained from
5.3-RELEASE errata).

Reviewed by: trhodes
Approved by: re (blanket)
2005-03-24 23:39:33 +00:00
Matthew N. Dodd 58914bbeb8 MFC: Whitespace diff reduction.
Approved by:	re
2005-03-24 18:44:27 +00:00
Olivier Houchard fea08ff6d1 MFC rev 1.5:
date: 2005/03/23 17:13:08;  author: cognet;  state: Exp;  lines: +4 -0
Unbreak buildworld on i386 when MODULES_WITH_WORLD is defined.

Approved by:	re
2005-03-24 17:05:45 +00:00
Dag-Erling Smørgrav 0fdcdbd325 MFC: (1.39) add 8169SB to list of supported chipsets.
Approved by:	re (kensmith)
2005-03-24 16:42:52 +00:00
Dag-Erling Smørgrav ddd0b58e52 MFC: (1.50) add revision number for 8169SB.
Approved by:	re (kensmith)
2005-03-24 16:41:48 +00:00
Pawel Jakub Dawidek 4a2f17d661 Truncate nextboot.conf file on creation, so existing garbage will be removed.
Submitted by:	Gary Allan <[email protected]>
Obtained from:	DragonFlyBSD
Approved by:	re (kensmith)
2005-03-24 16:03:54 +00:00
Max Khon 63ba8a983c ata_shutdown: Do nothing (do not flush ata cache) if in panic.
This behaviour is inline with ata-mkIII that will be committed to HEAD
soon and fixes making crashdumps (and automatic reboots) after panic.

Approved by:	re (the patch slightly differs from what was sent for approval)
No objections from:	sos
2005-03-24 15:09:50 +00:00
Denis Peplin f7348a90ec Merge the following from the English version:
1.227.2.24 -> 1.227.2.25 hardware/common/dev.sgml
   1.761.2.36 -> 1.761.2.37 relnotes/common/new.sgml

Update dev-auto override

Obtained from:	The FreeBSD Russian Documentation Project
Approved by:	re (implicitly)
2005-03-24 11:13:48 +00:00
David Xu f62fbc3663 MFC Revision 1.302: simplify sigwait.
MFC Revision 1.303: avoid panic under swapping in sigwait.

Approved by: re (kensmith)
2005-03-23 23:53:50 +00:00
Vinod Kashyap d986df23b6 MFC: Use correct flags for bus_dma_tag_create().
Submitted by:scottl
Approved by:re
MFC after:17 days
2005-03-23 22:57:47 +00:00
David E. O'Brien 2fe4dd78b0 MFFSF: rev 1.9.6.1: Remove fpsize argument, change opcode to suffix.
Use fmov*x macros, create all 3 fpsize variants in one macro. Adjust all users.

Approved by:	re(kensmith)
2005-03-23 22:04:10 +00:00
Pawel Jakub Dawidek 5024ba8d58 Sync with HEAD:
- Add 'status' subcommand.
- Cleanups.

Approved by:	re (kensmith)
2005-03-23 20:54:56 +00:00
Hiroki Sato 2e89c0fc10 MFC: BIND 9.3.1.
Approved by:	re (implicitly)
2005-03-23 20:39:14 +00:00
Doug Barton bff06cd9c3 MFC BIND 9.3.1 and related bmake updates
Approved by:	re (kensmith)
2005-03-23 18:16:33 +00:00
Doug Barton b8292c204c MFC 1.21, improvements to commented out examples
Approved by:	re (kensmith)
2005-03-23 17:35:58 +00:00
John Baldwin d944575e2f MFC: Document SEPARATE_LIVEFS.
Approved by:	re (kensmith)
2005-03-23 16:18:10 +00:00
John Baldwin 9e53d2e338 MFC: Bring all the package split and merged ISO stuff back from HEAD to
RELENG_5 including:
- make package-split target and changes to iso.1 and cdrom.* targets.
- Replace print-cdrom-packages.sh with package-split.py and add
  package-trees.sh.
- Merge livefs onto disc1 unless SEPARATE_LIVEFS is set in which case it
  is put on livefs.iso instead.
- Add /stand symlink to livefs to fix fixit.profile.
- Sync release(7).
- Remove drivers.conf(5).

Approved by:	re (kensmith)
2005-03-23 16:14:24 +00:00
Gleb Smirnoff 529d0d7dc9 Since em(4) is very popular and does not use miibus(4) add special hack
under #ifdef DEV_CARP, which calls carp_carpdev_state() when link goes
up or down.

Approved by:	re (kensmith)
2005-03-23 13:30:21 +00:00
Alan Cox 52d6e7b00a MFC revision 1.46
Avoid repeated acquisition and release of the vm object lock inside of
 two loops in agp_generic_bind_memory().  As an intended side-effect, all
 of the calls to vm_page_wakeup() are now performed with the containing
 vm object lock held.

Approved by: re (kensmith)
2005-03-23 06:02:29 +00:00
Alan Cox a5a1e12c0f MFC revision 1.31
Use VM_ALLOC_NOBUSY to eliminate an unneeded vm_page_wakeup() call and the
 synchronization that one entails.

Approved by: re (kensmith)
2005-03-23 05:59:42 +00:00
Matthew N. Dodd f6621ead9b ata-chipset.c
1.98: Support should now cover all old and current products.
1.97: Update the Promise support for combo (SATA+PATA) controllers.
1.96: Compensate for off by one bugs in disk firmware for 48BIT
      addressing cutover
1.95: Update the ICH6 support so all 4 SATA channels can be used.
      We still use "normal" mode, AHCI mode is in the works still.

ata-pci.h
1.36: Add first shot on support for the new Promise SATAII chips.

Approved by:	 re
2005-03-23 05:14:11 +00:00
Matthew N. Dodd e44804890d MFC
1.42: When resubmitting a timed out request, reset donecount.
1.41: Reset timeout when we are back from interrupt.
1.40: Correct logical error, result was that retries wasn't always made but
      failure reported instead.
1.39: Do not retry on requests that have lost their device during reinit.

Approved by:	 re
2005-03-23 04:50:26 +00:00
Matthew N. Dodd 18d6a6db7b MFC
1.53: Resolve "memory modified after free" panics on Thinkpads
1.52: Avoid long hangs on resume on some systems.
1.51: Try to get out of probing as early as possible on (hopefully) vacant
      channels.
1.50: Compensate for off by one bugs in disk firmware for 48BIT
      addressing cutover.

Approved by:	 re
2005-03-23 04:49:03 +00:00
Matthew N. Dodd 46aa473487 MFC 1.234: Return ATA register values in the request struct
when ATAREQUEST returns.

Approved by:	 re
2005-03-23 04:48:32 +00:00
Matthew N. Dodd 0f57340b9b MFC 1.94: Use dynamic major number allocation.
Approved by:	 re
2005-03-23 04:47:18 +00:00
Matthew N. Dodd 6f0d83e8b4 MFC
ata-chipset.c:1.94
    ata-pci.c:1.91
    ata-pci.h:1.37

Add support for the ITE IT8212F controller.

Approved by:	 re
2005-03-23 04:40:10 +00:00
Hajimu UMEMOTO d5ebfc6027 MFC 1.11: correct space check
Approved by:	re (kensmith)
2005-03-22 19:25:32 +00:00
Olivier Houchard ad381ec5ef MFC dev/asr/asr.c rev 1.66
conf/options.i386 rev 1.218
    i386/conf/NOTES rev 1.1189
date: 2005/03/17 01:20:49;  author: cognet;  state: Exp;  lines: +121 -2
Bring back some of the ioctl junk that was removed in rev 1.59 as a
i386-only kernel option, ASR_COMPAT, and under BURN_BRIDGES.
It is really ugly, but raidutils depends on it.

Discussed with: scottl

Approved by:	re
2005-03-22 17:22:06 +00:00
Sam Leffler 85f2f7a645 MFC 1.76: check copyin return value
Approved by:	re (kensmith)
2005-03-22 17:20:07 +00:00
cvs2svn 9ddddf107d This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-22 14:52:41 +00:00
Tai-hwa Liang 25f177f145 MFC: (1.84) Adding new device ID for BCM5751M support.
Reviewed by:	sam (mentor)
Approved by:	re (kensmith)
2005-03-22 14:12:31 +00:00
Tai-hwa Liang 106ac835ad MFC: (1.33) Adding new device ID for BCM5751M support.
Reviewed by:	sam (mentor)
Approved by:	re (kensmith)
2005-03-22 14:10:46 +00:00
Pawel Jakub Dawidek 7a3b0ce3bf MFC: geom_bsd.c 1.73
Plug memory leak.

Submitted by:	Ted Unangst
Found by:	Coverity Prevent analysis tool
Approved by:	phk
Approved by:	re (kensmith)
2005-03-22 13:41:58 +00:00
Pawel Jakub Dawidek 30699ecdac MFC: kern_proc.c 1.225,1.226
- Function jailed() looks into ucred strcture, so be sure ucred is not NULL.
- Clean up a bit.

Reviewed by:	rwatson
Approved by:	re (kensmith)
2005-03-22 13:40:23 +00:00
Christian Brueffer 00732da531 MFC: rev. 1.90
Xref carp(4) and polling(4).

Approved by:	re (blanket)
2005-03-22 12:36:28 +00:00
Christian Brueffer 5f08200e82 MFC:
Autogenerate device listings for sr(4) and rc(4).

Approved by:	re (blanket)
2005-03-22 12:34:38 +00:00
Christian Brueffer edb2ab586a MFC: rev. 1.27
- add a HARDWARE section
- correct a language nit
- remove outdated FILES section
- bump .Dd

Approved by:	re (blanket)
2005-03-22 12:30:01 +00:00
Christian Brueffer 2c9a15076c MFC: rev. 1.5
- move supported hardware information into a HARDWARE section
- consistently capitalize RISCom
- fix typo
- bump .Dd

Approved by:	re (blanket)
2005-03-22 12:28:15 +00:00
Denis Peplin 37a9ae8f6d Merge the following from the English version:
1.761.2.35 -> 1.761.2.36 relnotes/common/new.sgml

Obtained from:	The FreeBSD Russian Documentation Project
Approved by:	re (implicitly)
2005-03-22 07:23:18 +00:00
Denis Peplin 629ceac551 Merge the following from the English version:
1.761.2.33 -> 1.761.2.35 relnotes/common/new.sgml

Obtained from:	The FreeBSD Russian Documentation Project
Approved by:	re (hrs)
2005-03-22 06:34:14 +00:00
Ian Dowse 754d3a8ecd MFC: handle concurrent attempts to abort the same transfer, by
sleeping if necessary and prioritising normal abort requests over
timeouts. This fixes crashes that occur when a transfer is aborted
after it has timed out but before the timeout processing completes,
as was quite frequently seen when lpd was printing to a USB printer.

Approved by:	re (kensmith)
2005-03-22 00:56:54 +00:00
Ian Dowse b79f62fa5e MFC 1.104, 1.105: defer boot-time exploration of USB busses until
all devices in the system have been attached, but no later. This
ensures that we do not explore ohci or uhci busses before the
companion echi controller has been initialised, so it should fix
the problem of multi-speed USB devices getting attached as USB 1
devices first and then re-attached as USB 2.

Approved by:	re (kensmith)
2005-03-22 00:20:13 +00:00
Ian Dowse c71c5bbf69 MFC: split configure() into 3 separate steps like we do on other
architectures. This makes it possible to insert hooks before and
after the device attachment step.

Approved by:	re (kensmith)
2005-03-22 00:14:16 +00:00
Ian Dowse f4707e4abb MFC 1.27-1.33:
o Fix minor endianness confusion
 o Fix the bug that prevented most EHCI interrupt transfers from
   working correctly, and enable split transactions
 o Arrange the periodic QH tree correctly
 o Ignore non-fatal qTD token status bits
 o Set the split transaction interrupt C-mask correctly

Approved by:	re (kensmith)
2005-03-21 23:17:26 +00:00
Ian Dowse db7341cdf4 Partialially MFC the changes to the callout system that prevent
race conditions when stopping and resetting timers. This only avoids
the race conditions with Giant-locked callouts; it was not possible
to backport callout_init_mtx() since adding the c_mtx field to
struct callout would have changed the callout ABI.

Giant-locked callouts will now have much simpler semantics. As long
as Giant is held when invoking callout_stop() or callout_reset(),
then these functions will guarantee that the callout will be stopped,
even if softclock() had already begun to process the callout.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques now described in timeout(9) to
avoid race conditions.

Approved by:	re (kensmith)
2005-03-21 23:01:30 +00:00
Hajimu UMEMOTO 1242478bf5 MFC 1.42: correct space check.
Approved by:	re (kensmith)
2005-03-21 19:31:39 +00:00
Joe Marcus Clarke 182c65c10a MFC: rev 1.61
Change the PATH for pkg_add to be the same used for pointyhat package builds.
This will give our users and porters a more consistent experience between
installing ports and installing packages.

Approved by:	re (kensmith)
2005-03-21 17:41:00 +00:00
Maksim Yevmenkin b1fb78ed3b MFC to RELENG_5 bluetooth.h v 1.2
Fix typo in comments (spell Linux correctly)

Submitted by:	Markus Brueffer < markus at brueffer dot de >
Approved by:	re (kensmith)
2005-03-21 17:23:03 +00:00
Poul-Henning Kamp 17624d8946 MFC:
record customization script output in _.cs
	preserve /var contents to retain pkg database
	Fix a comment to make more sense.

Approved by:	re@
2005-03-21 17:14:24 +00:00
Hiroki Sato 4c19769202 MFC: CARP (Common Address Redundancy Protocol).
Approved by:	re (implicitly)
2005-03-21 16:33:38 +00:00
Gleb Smirnoff 6524034ab5 MFC Common Address Redundancy Protocol implementation.
Approved by:	re
2005-03-21 16:05:36 +00:00
Bruce A. Mah 5f45f9f26d MFC: KDE 3.4.0, update GNOME and KDE upgrading instructions, point to
project pages.

Approved by:	re (blanket)
2005-03-21 00:44:44 +00:00
Bruce A. Mah 451be550e0 MFC: When building release documentation for
release documentation snapshots, force URLS_ABSOLUTE.

	Makefile.relnotesng	1.10 -> 1.11

Approved by:	re (implicitly)
2005-03-21 00:41:45 +00:00
cvs2svn c7fd670c97 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-20 01:25:22 +00:00
Bruce A. Mah 2507eb9149 MFC: Reword pointer to snapshot info, tcpdrop(8), XOrg 6.8.2.
Approved by:	re (blanket)
2005-03-19 21:14:21 +00:00
Bruce A. Mah c05ba17277 MFC: Rather than pointing users at jp.freebsd.org for CURRENT
snapshots, instead point them at a Web page on the main FreeBSD
site that gives more information on the monthly (RE-created) snapshots
plus pointers to the jp.freebsd.org and se.freebsd.org snapshots.

	release.ent	1.22 -> 1.23

Approved by:	re (blanket)
2005-03-19 21:12:19 +00:00
Christian Brueffer 82776ba862 MFC: rev. 1.22
Chase location of scd.c and bump .Dd.

Approved by:	re (blanket)
2005-03-19 13:13:15 +00:00
Ken Smith c26898db49 This appears to fix a problem with 'make release' when building the
compat libraries on amd64.  It's not seen during a normal 'buildworld'.
This isn't an MFC because the compat libraries have been ripped out
of HEAD complely.

Reviewed by:	obrien
Approved by:	re (scottl despite a mail client disagreement :-)
2005-03-19 05:55:41 +00:00
Ken Smith c8cad49f1e MFC of Rev 1.18: Fix for problem with Sparc machines like the SunBlade-100
that have USB keyboards.  See commit log for 1.18 for full details.

Work done by:	marius
Approved by:	re (scottl)
2005-03-17 13:49:20 +00:00
Poul-Henning Kamp 138e5a3468 MFC:
sanity-check fd_lastfile
	report jail dir.

Approved by:	re
2005-03-17 13:26:06 +00:00
Tom Rhodes b7fff74924 MFC: Remove mention of mac_lomac(4) policy from here too.
Approved by:	re (kensmith)
2005-03-17 00:04:45 +00:00
Tom Rhodes 7249e94db3 MFC: De-orbit lomac.
Approved by:	re (kensmith)
2005-03-17 00:02:25 +00:00
Tom Rhodes a81f54ee1a MFC: Add snd_fm801.4 and attach it to the build.
Approved by:	re (kensmith)
2005-03-16 23:59:55 +00:00
David E. O'Brien fbbdbe7b8c Ensure GCC does not use FP registers in integer code.
Approved by:	re(ken)
2005-03-16 18:54:37 +00:00
David E. O'Brien 879f17830b MFC: ensure -fno-strict-aliasing for -O{2,3,s} users.
Approved by:	re(ken)
2005-03-16 17:51:56 +00:00
Pawel Jakub Dawidek e63dca7c6c MFC: strnstr.c 1.3
Don't read more than the given 'len' bytes from the 'big' string.

PR:		misc/77369
Submitted by:	Ed Maste <[email protected]>
Approved by:	re (kensmith)
2005-03-16 13:55:09 +00:00
Gleb Smirnoff ad16c3a061 MFC 1.6 by ru:
- Reduce the number of netgraph messages when listing
    nodes from (N + 1) to 1, where N is the number of
    nodes in the system.

  - Implement "ls -l" which runs the "show" command for
    each node.

  In collaboration with:  glebius

Approved by:	re (kensmith)
2005-03-16 13:46:21 +00:00
Gleb Smirnoff bf3491f026 MFC 1.21:
Fix getting stats from many links with index > 0.

   Submitted by:   Richard Kojedzinszky

Approved by:	re (kensmith)
2005-03-16 13:43:06 +00:00
Gleb Smirnoff 1d573cce49 MFC 1.28:
Fix a terrible braino in last commit. Put kern.debug back to /var/log/messages
   and do exactly what last commit message described.

Approved by:	re (kensmith)
2005-03-16 13:39:59 +00:00
Pierre Beyssac 8d0c0dd531 MFC rev 1.91:
Fixes a bug that caused UFS2 filesystems bigger than 2TB to
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.

Approved by:	re (kensmith), mckusick
2005-03-16 13:39:47 +00:00
Gleb Smirnoff c0eee044df MFC 1.49:
Plug item leak in macro NG_RESPOND_MSG. Item was leaked when destination
   node couldn't be addressed.

   Submitted by:   Roselyn Lee

Approved by:	re (kensmith)
2005-03-16 13:31:53 +00:00
Gleb Smirnoff 1069d3054c MFC 1.97:
Plug item leak in case when NGI_FN is applied to invalid node.

   Submitted by:   Roselyn Lee

Approved by:	re (kensmith)
2005-03-16 13:24:53 +00:00
Christian Brueffer 7ce6b977b6 MFC: rev. 1.12
Correct macro usage.

Approved by:	re (blanket)
2005-03-16 01:59:33 +00:00
Denis Peplin 5498e1ac63 Merge the following from the English version
(the log is based on tags and is not very clean
about actual updates):

   1.69.2.15 -> 1.69.2.16 errata/article.sgml
   1.257 -> 1.227.2.24 hardware/common/dev.sgml
   1.28 -> 1.27.2.2 installation/common/install.sgml
   1.35 -> 1.31.2.2 readme/article.sgml

Obtained from:	The FreeBSD Russian Documentation Project
Approved by:	re (hrs)
2005-03-15 16:50:38 +00:00
Denis Peplin 2a7e0b6aee Add a Russian override of dev-auto.sgml (device entities only)
Obtained from:	The FreeBSD Russian Documentation Project
Approved by:	re (hrs)
2005-03-15 14:03:25 +00:00
Maxim Konovalov ac7314ffa1 MFC rev. 1.13 refuse and rev. 1.12 refuse.README: add missed language
doc subdirectories, sort.

Approved by:	re (hrs)
2005-03-15 13:46:57 +00:00
Denis Peplin 9834181ed9 Merge the following from the English version:
1.761.2.11 -> 1.761.2.33 new.sgml

Obtained from:  The FreeBSD Russian Documentation Project
Approved by:	re (hrs)
2005-03-15 10:16:08 +00:00
Scott Long cf5ffcd922 MFC rev 1.67 and 1.70
Approved by: re
2005-03-15 04:40:08 +00:00
Scott Long 733f344bce MFC rev 1.71 and 1.74
Approved by: re
2005-03-15 04:38:53 +00:00
Scott Long 42142b1a0e MFC: Fix NULL pointer deref in the ioctl path.
Approved by: re
2005-03-15 03:57:52 +00:00
Bruce A. Mah f667ed2607 MFC: Add trademarks, security.jail.chflags_allowed, pcii, ed(4)
ALTQ-aware, ipfw(4) works with debug.mpsafenet, ipnat(8) redirect
rules and non-TCP/UDP packets, TCP-MD5, ips(4) crash dumps, ftpd(8)
status codes, getaddrinfo(3) query order, gvinum(8) subcommands,
libgpib, periodic(8) and blocked pf(4) counts, pppd(8) bugfixes,
rc.conf(5) interface renaming, GNOME 2.10.

Approved by:	re (blanket)
2005-03-14 22:00:11 +00:00
Marcel Moolenaar fab5063965 MFC kgdb.1 (1.7), main.c (1.6):
Implement and document the -q and -f options with their corresponding
long form (-quiet and -fullname resp.)

PR: bin/78031
Approved by: re (kensmith)
2005-03-14 20:49:04 +00:00
Marcel Moolenaar bd0173f299 MFC rev. 1.198:
Make sure fpswa_interface equals NULL when bootinfo.bi_fpswa equals 0.

PR: ia64/77591
Approved by: re (kensmith)
2005-03-14 20:23:03 +00:00
Christian Brueffer e2fe0a3925 Add missing \
Submitted by:	pjd
Approved by:	re (blanket)
2005-03-14 14:40:37 +00:00
Maxim Konovalov 5335400a12 MFC rev. 1.4: an improved example.
Approved by:	re (hrs)
2005-03-14 14:24:20 +00:00
Christian Brueffer 1ad6c1c790 MFC:
Add a man page for ng_ccatm(4).

Approved by:	re (blanket)
2005-03-14 14:08:36 +00:00
cvs2svn 71f5a6fc92 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-14 14:04:03 +00:00
Maxim Konovalov 4a16154f46 MFC rev. 1.2, 1.3: fix an example.
Approved by:	re (hrs)
2005-03-14 12:54:13 +00:00
Maxim Konovalov 032ea0a7e5 o MFC tcpdrop(8):
sys/netinet/tcp_var.h, rev. 1.115, 1.116
    sys/netinet/tcp_subr.c, rev. 1.219
    usr.sbin/Makefile, rev. 1.321
    usr.sbin/tcpdrop/Makefile, rev. 1.1
    usr.sbin/tcpdrop/tcpdrop.8, rev. 1.1
    usr.sbin/tcpdrop/tcpdrop.c, rev. 1.1, 1.2

Approved by:	re (kensmith)
2005-03-14 08:08:19 +00:00
John-Mark Gurney bb0f63f69f MFC:
>   spell resource correctly...
>
>   Revision  Changes    Path
>   1.20      +1 -1      src/share/man/man9/bus_alloc_resource.9

Approved by:	re (kensmith)
2005-03-14 07:19:03 +00:00
Ian Dowse b6ab4c9dbb MFC 1.33: Save and restore the VGA state across a suspend-resume
cycle. This is particularly useful when VESA is available (either
`options VESA' or load the vesa module), as BIOSes in some notebooks
may correctly save and restore LCD panel settings using VESA in
cases where calling the video BIOS POST is not effective. On some
systems it may also be necessary to set the hw.acpi.reset_video
sysctl to 0.

Approved by: re (kensmith)
2005-03-13 21:39:29 +00:00
Ian Dowse 9741f5d1ab MFC 1.48-1.50: Add a missing bcopy() to make saving the VESA state
actually work. Also save the DAC state, increase the maximum save
state size up to 12k, and refuse to save the VESA state if the BIOS
reports it is larger than the maximum size we can handle.

Approved by: re (kensmith)
2005-03-13 21:36:55 +00:00
Alan Cox 92b071ccf2 MFC revision 1.146
Use the kernel pmap's lock to guarantee that only one thread at a time is
 using either pmap_temp_map_1 or pmap_temp_map_2.

Approved by: re (kensmith)
2005-03-13 20:49:57 +00:00
Robert Watson 8a88888dd9 Merge Makefile:1.16 from HEAD to RELENG_5:
date: 2004/12/25 00:23:36;  author: scottl;  state: Exp;  lines: +1 -1
  Don't define PFIL_HOOKS.  It's no longer required in RELENG_5 or HEAD.

Approved by:	re (kensmith)
2005-03-13 19:07:37 +00:00
Maxime Henrion 03937a04d9 MFC if_fxp.c revision 1.224:
revision 1.224
  date: 2005/02/27 15:12:50;  author: mux;  state: Exp;  lines: +10 -10
  Fix a stupid bogon from myself, sc->revision wasn't initialized when
  testing it to know whether we should enable the 82503 serial mode...
  Move code to the right location and disallow the use of the 82503
  serial mode if the sc->revision field is 0 again.  This makes fxp(4)
  work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a
  82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour)
  and with the even older 10Mbps-only 82557 cards with the 82503 serial
  interface.

  Tested by:      Andre Albsmeier <[email protected]>, krion

Approved by:	re@ (kensmith)
2005-03-13 18:56:08 +00:00
Robert Watson bed0515897 Forced commit to note that the previous revision to fil.c included a
merge from HEAD to RELENG_5 of fil.c:1.43:

  Elminate 1 LOR (actually a recursive mutex grab) involving ipfilter where
  we loop through all the list of NICs (struct ifnet), holding the lock on
  it and then do a name lookup with ifunit() whilst holding it.

Approved by:	re (kensmith)
2005-03-13 18:12:04 +00:00
Robert Watson 0c7d801896 Merge a series of changes from HEAD to RELENG_5 that properly enable
fine-grained locking for ipfilter.  This is an approximate merge of
several overlapping changes introduced due to build problems with the
original changes, first attempted fixes, second attempted fixes, et al.

ip_auth.c:1.37, ip_compat.h:1.24, ip_frag.c:1.26, ip_log.c:1.28, ip_nat.h:1.22,
ip_proxy.c:1.23, ip_state.c:1.34, ip_state.h:1.16, mlfk_ipl.c:1.14

  Enable fine grained locking within IPFilter, using mtx(9) and sx(9) allowing
  the the "needs giant" flag to be removed from the driver.

fil.c:1.41, ip_file.c:1.50, ip_fil.h:1.28

  Sprinkle in some __FreeBSD_version checks so that this compiles again.  Don't
  define PFIL_HOOKS anymore.

  Submitted by: keramida

  || (__FreeBSD_version >= 503000)

ip_fil.h:1.29
  Darnit, through a maze of twisty passages, ipfilter needs to have PFIL_HOOKS
  defined.  Revert part of the previous commit to fix this.

fil.c:1.42, ip_fil.c:1.51
  * The #ifdef's to cause mutex's for freebsd to be declared were meant to pick
    up on USE_MUTEX being defined, but this patch
  * Remove some code that's in a #ifndef FreeBSD that's no longer used.

ip_auth.c:1.38
  * Remove some code that's in a #ifndef FreeBSD that's no longer used.

This collective set of changes should reduce/eliminate reported crashes
associated with ipfilter and SMP configurations.

Timeout:	darrenr
Approved by:	re (kensmith)
Tested by:	nectar
2005-03-13 18:08:56 +00:00
John-Mark Gurney b8e012cf2f MFC:
>   fix spelling of match in comment...                                         >
>   Revision  Changes    Path
>   1.10      +1 -1      src/sys/kern/subr_hints.c

Approved by:	re (kensmith)
2005-03-13 18:05:26 +00:00
Robert Watson a5b8a1bbf0 Merge if_ethersubr.c:1.187 from HEAD to RELENG_5:
When prepending an LCC SNAP header to an atalk outgoing ethernet packet,
  allocate the additional mbuf (if needed) using a non-sleeping memory
  allocation.

Approved by:	re (kensmith)
2005-03-13 13:09:32 +00:00
Robert Watson 8fcf935992 Merge aarp.c:1.36 from HEAD to RELENG_5:
When generating a phase II ARP lookup from aarpwhohas(), use a
  non-sleeping mbuf allocation.

Approved by:	re (kensmith)
2005-03-13 13:08:36 +00:00
Robert Watson 2bfc97ccf0 Merge ddp_output.c:1.26 from HEAD to RELENG_5:
In the ddp_output() path, which can be called in a variety of threading
  and locking contexts, use a non-sleeping allocation for mbufs.

Approved by:	re (kensmith)
2005-03-13 13:07:50 +00:00
Robert Watson 6a070a3c6a Merge uipc_sem.c:1.15 from HEAD to RELENG_5:
Assert sem_lock in id_to_sem() and sem_lookup_byname(), since these
  functions iterate over the global POSIX semaphore lists.

Approved by:	re (kensmith)
2005-03-13 13:02:56 +00:00
Christian Brueffer 90de9fbdb0 MFC: rev. 1.31
s/cdrom/CD-ROM/

Approved by:	re (blanket)
2005-03-13 10:13:22 +00:00
Simon L. B. Nielsen 102e0e60fb MFC:
- Auto generate device listings for snd_vibes(4) and snd_via82c686(4).
- Sort dev.archlist.txt.

Approved by:	re (blanket)
2005-03-12 10:41:14 +00:00
Simon L. B. Nielsen 5174d0f5c7 MFC:
- Add manual page for snd_vibes(4).
- Add manual page for snd_via82c686(4).

Approved by:	re (blanket)
2005-03-12 10:35:13 +00:00
Xin LI 613f0be8d8 MFC 1.47 (scottl). Original log:
>   Reference a pointer correctly when copying to it's location.
>
>   Submitted by: Coverity Prevent analysis tool

Approved by:	re (kensmith)
2005-03-12 10:05:39 +00:00
Xin LI 4f65b34b37 MFC 1.150 (scottl). Original log:
>   Check the correct periph pointer after search for it.
>
>   Submitted by: Coverity Prevent analysis tool

Approved by:	re (kensmith)
2005-03-12 10:04:03 +00:00
Xin LI ebc48d276d MFC 1.59 (scottl). Original log:
>   Protect against trying to free a non-existant peripheral.
>
>   Submitted by: Coverity Prevent analysis tool

Approved by:	re (kensmith)
2005-03-12 10:01:39 +00:00
Xin LI 6f2069bda5 MFC 1.65 (scottl). Original log:
>   Remove a shadow declaration of 'error' that caused certain tests to be
>   pointless.
>
>   Submitted by: Coverity Prevent analysis tool

Approved by:	re (kensmith)
2005-03-12 09:59:33 +00:00
David E. O'Brien 115d877c81 MFC: rev 1.69: fix typo in privious commit.
Approved by:	re(scottl)
2005-03-12 06:00:07 +00:00
cvs2svn 35713374b6 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-11 08:39:59 +00:00
Alan Cox 7daf778896 MFC revision 1.8
Request a CPU private mapping from sf_buf_alloc().

Approved by: re (kensmith)
2005-03-11 06:35:26 +00:00
Alan Cox 8f8b667d17 MFC
The m_ext reference counts are potentially shared and modified
 asynchronously by different threads.  Thus, declare as volatile the
 reference count that is accessed through m_ext's pointer, ref_cnt.

Approved by: re (dwhite,jhb)
2005-03-11 03:50:47 +00:00
David E. O'Brien 557693706c MFC: rev 1.2: Unconditionally support the AMD64 GART HW.
Approved by:	re(kensmith)
2005-03-10 23:38:49 +00:00
Maxime Henrion 3c59f3b62a MFC if_fxp.c revision 1.225:
date: 2005/03/03 00:22:59;  author: mux;  state: Exp;  lines: +13 -8
  Fix the panic recently reported on -current@ occuring when configuring
  a vlan interface attached to a fxp(4) card when it has not been
  initialized yet.  We now set the links from our internel TX descriptor
  structure to the TX command blocks at attach time rather than at init
  time.  While I'm here, slightly improve the style in fxp_attach().

  PR:             kern/78112
  Reported by:    Gavin Atkinson <[email protected]> and others
  Tested by:      flz, Gavin Atkinson <[email protected]>

Approved by:	re@ (kensmith)
2005-03-10 18:23:15 +00:00
Dag-Erling Smørgrav 0bf64b1a61 MFC: (1.38, 1.39) recognize k/m/g/t suffixes in all tunables.
Approved by:	re (kensmith)
2005-03-10 17:09:16 +00:00
Yaroslav Tykhiy 4997a51586 MFC 1.38:
Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en.  This effect is
not always wanted.

Approved by:	re (kensmith)
2005-03-10 15:35:31 +00:00
Xin LI 2e11875929 MFC the background fsck_ffs(8) fixes which will calculate the
superblock summary by getting the sysctl mibs initialized during
setup phrase.  This will make the background fsck summary adjustment
actually functional.

MFC'ed revisions:
>   Revision  Changes    Path
>   1.36      +1 -0      src/sbin/fsck_ffs/fsck.h
>   1.42      +5 -5      src/sbin/fsck_ffs/pass5.c
>   1.49      +18 -0     src/sbin/fsck_ffs/setup.c

Approved by:	re (kensmith)
2005-03-10 14:58:59 +00:00
Yoshihiro Takahashi 88f5ad0ba2 MFC: Backout revision 1.20.
Approved by:	re (kensmith)
2005-03-10 14:54:23 +00:00
Gleb Smirnoff 466601418a MFC 1.9:
Cisco uses milliseconds for uptime. This is stupid. Nobody cares of such
   precision when IP packet may travel through internet for several seconds.
   Also uptime measured in milliseconds overflows every 48+ days.
   But we have to do same to keep compatibility with Cisco and flow-tools.

   Make a macro MILLIUPTIME, which does overflowable multiplication to 1000.

   Requested by:   Sergey Ryabin, Oleg Bulyzhin

Approved by:	re (kensmith)
2005-03-10 14:44:25 +00:00
Robert Watson 428fda1e32 Merge ipx_input.c:1.50 from HEAD to RELENG_5:
Mark the IPX netisr as MPSAFE so that inbound IPX traffic is processed
  without Giant, and can be directly dispatched in the ithread when
  net.isr.enable is turned on.

Approved by:	re (kensmith)
2005-03-10 14:39:02 +00:00
Robert Watson c1d406161e Merge ipx.c:1.30, ipx_input.c:1.49 from HEAD to RELENG_5:
Recent changes have locked down most of the highly dynamic data
  structures in IPX/SPX -- primarily, sequence numbering, PCB lists,
  and PCBs for IPX raw sockets, IPX datagram sockets, and IPX/SPX.
  As such, remove remove NET_NEEDS_GIANT() for IPX, and remove the
  assertion of Giant in the ipxintr() IPX input path.

  Note that IPX/SPX is not fully MPSAFE, and that there are some
  problems with IPX/SPX locking that will require some further work.
  However, it is now safe enough to run in general without the Giant
  lock.

Approved by:	re (kensmith)
2005-03-10 14:38:19 +00:00
Robert Watson 0055d4be14 Merge ipx_input.c:1.48, spx_srreq.c:1.61 from HEAD to RELENG_5:
Use the IPX PCB list mutex and IPX PCB mutexes to lock down the SPX
  portion of IPX/SPX:

  - Protect IPX PCB lists with the IPX PCB list mutex, in particular
    when calling PCB and PCB list manipulation routines in ipx_pcb.c.
  - Protect both IPX PCB state and SPX PCB state using the IPX PCB
    mutex.
  - Generally annotate locking, as well as adding liberal use of lock
    assertions to document locking requirements.
  - Where possible, use unlocked reads when reading integer or smaller
    sized socket options on SPX sockets.
  - De-spl throughout.

  Notes:

  - spx_input() expects both the list mutex and PCB mutex to be held
    on entry, but will release both on return.  Because sonewconn() is
    called from spx_input(), it may actually drop one PCB lock and
    acquire another during generation of a new connection, meaning the
    caller is not in a position to unlock the PCB mutex.

Approved by:	re (kensmith)
2005-03-10 14:36:35 +00:00
Robert Watson 1d7f1ec8c9 Merge ipx_input.c:1.47 and ip_usrreq.c:1.52 from HEAD to RELENG_5:
Protect ipx_pexseq with the IPX PCB list mutex.

  When processing socket options against IPX PCBs, generally protect
  PCB fields using the IPX PCB mutex.  Where possible, use unlocked
  reads on integer values to avoid locking overhead.

Approved by:	re (kensmith)
2005-03-10 14:34:02 +00:00
Robert Watson 94beb722b7 Merge ipx_usrreq.c:1.51 from HEAD to RELENG_5:
Acquire or assert the IPX PCB list lock or IPX PCB lock during various
  protocol methods relating to IPX.  Conditionally acquire the PCB list
  lock in the send operation only if the socket requires binding in order
  to use the requested address.

  Remove spl's generally no longer required during these accesses.

Approved by:	re (kensmith)
2005-03-10 14:32:30 +00:00
Robert Watson d2b96f22b5 Merge ipx_pcb.c:1.43 from HEAD to RELENG_5:
date: 2005/01/09 05:10:43;  author: rwatson;  state: Exp;  lines: +21 -1
  Assert or acquire the IPX PCB list lock or IPX PCB locks throughout
  the IPX-related PCB routines.  In general, the list lock is required
  to iterate the PCB list, either for read or write; the PCB lock is
  required to access or modify a PCB.  To change the binding of a PCB,
  both locks must be held.

Approved by:	re (kensmith)
2005-03-10 14:30:31 +00:00
Robert Watson e3e6ea7d43 Merge ipx_input.c:1.46 from HEAD to RELENG_5:
Hold the IPX PCB mutex around calls to ipx_input() in the IPX input
  path.

Approved by:	re (kensmith)
2005-03-10 14:29:17 +00:00
Robert Watson 442da262eb Merge ipx_input.c:1.45 from HEAD to RELENG_5:
Hold the global IPX PCB list mutex in the IPX input path when walking
  the IPX PCB list.

Approved by:	re (kensmith)
2005-03-10 14:28:21 +00:00
Robert Watson 92eb19f73b Merge ipx_input.c:1.44 ipx_pcb.c:1.42, ipx_pcb.h:1.23 from HEAD to
RELENG_5:

  Introduce a global mutex, ipxpcb_list_mtx, to protect the global
  IPX PCB lists.  Add macros to initialize, destroy, lock, unlock,
  and assert the mutex.  Initialize the mutex when IPX is started.

  Add per-IPX PCB mutexes, ipxp_mtx in struct ipxpcb, to protect
  per-PCB IPX/SPX state.  Add macros to initialize, destroy, lock,
  unlock, and assert the mutex.  Initialize the mutex when a new
  PCB is allocated; destroy it when the PCB is free'd.

Approved by:	re (kensmith)
2005-03-10 14:27:00 +00:00
Robert Watson 74103ea771 Merge README:1.5 from HEAD to RELENG_5:
Marginally reformat my copyright statement to remove the spurious ','.

Approved by:	re (blanket netipx locking merge approval)
2005-03-10 14:23:27 +00:00
Simon L. B. Nielsen 8e2b151dbb MFC 1.237+1.248+1.262+1.274:
- Autogenerate device listings for hptmv(4).
- Add vge(4) to the Hardware Notes.
- Auto generate device listings for the following drivers: snd_ad1816,
  snd_cmi, snd_cs4281, snd_ds1, snd_emu10k1, snd_es137x, and snd_solo.
- Auto generate device listing for snd_neomagic(4).

Approved by:	re (hrs)
2005-03-10 08:50:01 +00:00
Simon L. B. Nielsen f6dd2e6ece MFC 1.45+1.47+1.55:
- Add hptmv(4).
- Add snd_audiocs(4).
- Auto generate device listing for snd_neomagic(4).

Approved by:	re (hrs)
2005-03-10 08:47:06 +00:00
Simon L. B. Nielsen 1e937c8d28 MFC:
Add snd_neomagic(4) manual page.

Approved by:	re (hrs)
2005-03-10 08:44:56 +00:00
Christian Brueffer b0324f76ad MFC: rev. 1.3
Remove superfluous .Pp call.

Approved by:	re (blanket)
2005-03-10 00:50:59 +00:00
Christian Brueffer d4f49a8895 MFC: rev. 1.6 by ru
Use lists where appropriate.

Approved by:	re (blanket)
2005-03-10 00:04:54 +00:00
Christian Brueffer c9b7c98a8e MFC: rev. 1.7 by ru
Markup fixes.

Approved by:	re (blanket)
2005-03-09 23:57:22 +00:00
Christian Brueffer a920723af3 MFC:
rev. 1.2 (partly) by njl

Comment in the HISTORY section.

rev. 1.4 by ru

Markup fixes.

Approved by:	re (blanket)
2005-03-09 23:41:57 +00:00
Alan Cox 209c5b1805 MFC
Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc().
 Change the spelling of the "catch" option to be consistent with the new
 options.

Approved by: re (kensmith)
2005-03-09 18:59:20 +00:00
SUZUKI Shinsuke 62ddec5e63 MFC 1.60: ignores ICMPv6 code field in case of ICMPv6 Packet-Too-Big
Approved by: re(kensmith)
2005-03-08 03:13:36 +00:00
Joseph Koshy 4155b694b2 MFC rev 1.48: Link in "mdoc/example.9" to the RELENG_5 build.
Reminded by:	ru
Approved by:	re (kensmith)
Pointy hat to:	jkoshy
2005-03-08 02:28:42 +00:00
Maxim Konovalov 3f54c70c9c s/IPFIRWALL/IPFIREWALL/.
Spotted by:	Andre Guibert de Brue
Approved by:	re (kensmith)
2005-03-07 21:37:30 +00:00
Poul-Henning Kamp 43372abd68 MFC:
ieee488 userland support.

Approved by:	re@
2005-03-07 21:34:50 +00:00
Poul-Henning Kamp 83f59b180c MFC:
userland support for ieee488

Approved by:	re@
2005-03-07 20:39:34 +00:00
Poul-Henning Kamp aae44425d4 MFC:
userland ieee488 support

Approved by:	re@
2005-03-07 20:38:51 +00:00
Poul-Henning Kamp bc347f549c MFC:
Userland side of IEEE488.

Approved by:	re@
2005-03-07 20:29:16 +00:00
John-Mark Gurney 2e86046866 MFC:
>   fix a bug where bpf would try to wakeup before updating the state.. This
>   was causing kqueue not to see the correct state and not wake up a process
>   that is waiting...
>
>   Submitted by:   nCircle Network Security, Inc.
>
>   Revision  Changes    Path
>   1.146     +6 -2      src/sys/net/bpf.c

Approved by:	re (kensmith)
2005-03-07 17:11:43 +00:00
Dag-Erling Smørgrav 1b01eed848 MFC: add /rescue/init to default init path, before /stand/sysinstall
Approved by:	re (kensmith)
2005-03-07 17:03:18 +00:00
Maxim Konovalov e60f7cb821 MFC rev. 1.495: s/opt_ifpw.h/opt_ipfw.h/.
Approved by:	re (kensmith)
2005-03-07 16:32:24 +00:00
Yoshihiro Takahashi 77fb11428e MFC: Don't use the ptoa() to set the 'realmem' variable.
Approved by:	re (kensmith)
2005-03-07 13:53:39 +00:00
Poul-Henning Kamp 20ec4c43b1 MFC:
IEEE488 driver.
	(userland still to follow)

Approved by:	re@
2005-03-07 13:46:40 +00:00
Poul-Henning Kamp b179a87e67 MFC:
Add isa_dmatc() function to check for Terminal Count condition.
	(pre-cursor for IEEE488 MFC)

Approved by:	re@
2005-03-07 13:10:48 +00:00
Robert Watson 2776ede3ff Merge uipc_socket.c:1.233, uipc_usrreq.c:1.151, atm_cm.c:1.33,
atm_socket.c:1.23, atm_var.h:1.26, ipatm_load.c:1.l21,
ng_btsocket_l2cap.c:1.16, ng_btsocket_rfcomm.c:1.15, tcp_usrreq.c:1.15,
spx_usrreq.c:1.62, socketvar.h:1.139 from HEAD to RELENG_5:

  In the current world order, solisten() implements the state transition of
  a socket from a regular socket to a listening socket able to accept new
  connections.  As part of this state transition, solisten() calls into the
  protocol to update protocol-layer state.  There were several bugs in this
  implementation that could result in a race wherein a TCP SYN received
  in the interval between the protocol state transition and the shortly
  following socket layer transition would result in a panic in the TCP code,
  as the socket would be in the TCPS_LISTEN state, but the socket would not
  have the SO_ACCEPTCONN flag set.

  This change does the following:

  - Pushes the socket state transition from the socket layer solisten() to
    to socket "library" routines called from the protocol.  This permits
    the socket routines to be called while holding the protocol mutexes,
    preventing a race exposing the incomplete socket state transition to TCP
    after the TCP state transition has completed.  The check for a socket
    layer state transition is performed by solisten_proto_check(), and the
    actual transition is performed by solisten_proto().

  - Holds the socket lock for the duration of the socket state test and set,
    and over the protocol layer state transition, which is now possible as
    the socket lock is acquired by the protocol layer, rather than vice
    versa.  This prevents additional state related races in the socket
    layer.

  This permits the dual transition of socket layer and protocol layer state
  to occur while holding locks for both layers, making the two changes
  atomic with respect to one another.  Similar changes are likely require
  elsewhere in the socket/protocol code.

  Reported by:            Peter Holm <[email protected]>
  Review and fixes from:  emax, Antoine Brodin <[email protected]>
  Philosophical head nod: gnn

Note that this changes the behavior of the pru_listen() protocol entry point;
all protocols are updated to match the new behavior.  We do not know of any
third party protocol implementations that this might cause problems for.

Approved by:	re (kensmith)
2005-03-07 13:08:05 +00:00
cvs2svn f632a00f12 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-07 11:05:48 +00:00
Christian Brueffer 1d86221cc0 MFC:
Remove superfluous .Pp calls.

Approved by:	re (blanket)
2005-03-07 09:59:49 +00:00
Maxime Henrion 543fa3b4d8 MFC if_fxp.c revision 1.226:
date: 2005/03/05 13:52:28;  author: mux;  state: Exp;  lines: +1 -0
  Add support for fxp(4) cards found in Sony FS570 laptops.

  Submitted by:   Gavin Atkinson <[email protected]>

Approved by:	re@ (scottl)
2005-03-06 19:50:00 +00:00
Joe Marcus Clarke 666415993d MFC: rev 1.8
Fix a problem in the Skinny ALG where a specially crafted packet could cause
a libalias application (e.g.  natd, ppp, etc.) to crash.  Note: Skinny support
is not enabled in natd or ppp by default.

Approved by:	re (kensmith)
Security:	This fixes a remote DoS exploit
2005-03-06 08:00:03 +00:00
Bruce A. Mah ba1cb63954 MFC: IP_FIREWALL_FORWARD_EXTENDED, background fsck(8) summary
recomputation, named(8) dynamic zones, newfs(8) snapshot warning,
strftime(3) GNU extensions, systat(1) -netstat IPv6-aware, rc.conf(5)
tmpmfs_flags and varmfs_flags, merged install/fixit CD-ROMs.

Approved by:	re (hrs)
2005-03-05 17:36:14 +00:00
Bruce A. Mah dfc6e42e43 MFC: Revise the minimum RAM requirements to 24MB for i386 (and implicitly
pc98).

	install.sgml	1.29 -> 1.30 (partial merge of relevant part only)

Approved by:	re (hrs)
2005-03-05 17:08:15 +00:00
John Baldwin b30551b8d6 MFC: Use a separate livefs image for ia64.
Approved by:	re (scottl)
2005-03-04 21:02:10 +00:00
Nate Lawson 71a020b8ff MFC: Install includes in dev/acpica.
Pointy hat:	njl
Approved by:	re (implicitly: unbreak installworld)
2005-03-04 18:57:43 +00:00
Scott Long c8398c2706 MFC: sync the amr.4 manpage with HEAD to get new supported hardware names.
Approved by: re
2005-03-04 18:10:27 +00:00
Scott Long 6e219f4c32 MFC: Sync the amr driver between HEAD and RELENG_5. This brings in SMPng
locking, many other performance enhancements, new PCI IDs, and support for new
management apps.  Many thanks to LSI for providing engineering, QA, and
hardware donation support for this.

Approved by: re
2005-03-04 18:06:18 +00:00
Christian Brueffer 272e42e7e8 MFC: rev. 1.26
Correct a macro name.

Approved by:	re (blanket)
2005-03-04 00:17:40 +00:00
John Baldwin 37f0cc76a8 Rename the openfiles variable back to nfiles for the RELENG_5 branch to
preserve the ABI for poorly-behaved programs like xsysinfo that grovel
around in kvm to read nfiles rather than using the kern.openfiles sysctl.

Approved by:	re
2005-03-03 22:27:33 +00:00
John Baldwin 8f35532aac MFC rev 1.876 including changes to support merging the install and livefs
cdrom images into one image.

Approved by:	re
2005-03-03 22:04:11 +00:00
John Baldwin d5b7370700 MFC: Fixup cdrom support to support merged install and livefs disc1 and
improve vty switching for fixit mode.

Approved by:	re
2005-03-03 21:59:47 +00:00
David E. O'Brien 1f8dce1514 MFC: 1.25: Use BUS_PROBE_DEFAULT in preference to 0.
Brought to you by the letters:	I-M-P
2005-03-03 05:02:15 +00:00
Tom Rhodes 8307257ff5 MFC: Add rc.bsdextended, it has been tested enough. 2005-03-03 04:51:58 +00:00
David E. O'Brien a4339dddef MFC: rev 1.25: Use BUS_PROBE_DEFAULT in preference to 0.
Brought to you by the letters:	I-M-P
2005-03-03 04:50:58 +00:00
David E. O'Brien db8739d64a MFC: rev 1.13: Use BUS_PROBE_DEFAULT in preference to 0.
Brought to you by the letters:	I-M-P
2005-03-03 04:49:43 +00:00
Ken Smith 7c681abfcf MFC change to flag used to specify publisher when running mkisofs.
Revisions being MFC-ed:

  src/release/alpha/mkisoimages.sh		1.11
  src/release/amd64/mkisoimages.sh		1.11
  src/release/i386/mkisoimages.sh		1.13
  src/release/ia64/mkisoimages.sh		1.11
  src/release/sparc64/mkisoimages.sh		1.9

Warned by: trhodes
2005-03-03 04:48:50 +00:00
David E. O'Brien d879ea0a21 MFC: rev 1.37: Use BUS_PROBE_DEFAULT in preference to 0.
rev 1.36: remove dead code (inside a DEBUG ifdef)

Brought to you by the letters:	I-M-P
2005-03-03 04:47:55 +00:00
Tai-hwa Liang 6dcdbebb3a MFC: (1.127) correct direction for bus_dma sync of rx buffer
Reviewed by:	sam (mentor)
2005-03-03 04:16:17 +00:00
Tai-hwa Liang cf3087970d MFC: (1.20) correct direction for bus_dma sync of rx buffer
Reviewed by:	sam (mentor)
2005-03-03 03:47:55 +00:00
David E. O'Brien 1a2b6e4d76 MFC: rev 1.52: Support \H, \h, \w, \W, \$ string expansion in the prompt. 2005-03-03 03:43:20 +00:00
Ian Dowse 8711ab42fa MFC 1.27: use a signal-safe type for variables used to synchronise
with a signal handler.
2005-03-03 02:32:39 +00:00
Ian Dowse e0db226d91 MFC: add Sitecom's LN-029 USB 2.0 Ethernet adapter. 2005-03-03 02:19:51 +00:00
Joseph Koshy 1c8a5ce7eb Add "example.9" to RELENG_5.
Discussed with: keramida
2005-03-03 02:14:45 +00:00
Ian Dowse 6389e9949a MFC: add support for the TwinMOS IV and Comotron C3310. 2005-03-03 02:12:35 +00:00
Ian Dowse 08a29d36d0 MFC 1.115, 1.119: cancel timeouts and active transfers when the
device detaches.
2005-03-03 02:04:46 +00:00
Ian Dowse 1af015683d MFC 1.118: report a faster base transfer rate for high-speed devices. 2005-03-03 01:58:26 +00:00
Ian Dowse a1c3a16b91 MFC: add new usbd_abort_default_pipe() and usbd_get_speed() functions. 2005-03-03 01:54:58 +00:00
Wes Peters 163a402269 MFC 'hw.physmem' sysctl.
Submitted by:	Nicko Dehaine <[email protected]>
2005-03-03 00:46:32 +00:00
Marius Strobl c0fb83e2dd MFC: 1.19
- Fix braino introduced in rev. 1.17 (MFC'ed in rev. 1.15.2.2), unlike the
  X1032A (HME-ISP1040-combo) and the X1034A (quad HME; QFE) cards the X1033A
  (single HME) don't have a PCI-PCI-bridge so we can't rely on the PCI slot
  number being useable as index for the network address to read from the VPD
  on the latter. Use the end tag to determine whether it is a QFE VPD with
  4 NAs and only use the slot number as index in this case.
- Remove a useless check.
2005-03-03 00:19:30 +00:00
David E. O'Brien 754dac0cd4 Document that the default world build won't run on the 80386 and document how to
target the 80386.
2005-03-02 20:59:08 +00:00
Nate Lawson 071f3cfc7c MFC: Add the acpica subdir and sync style with -current. 2005-03-02 20:58:38 +00:00
Nate Lawson 19ce697d2e MFC 1.235 and 1.236: Install include for acpica and update bktr symlinks. 2005-03-02 20:50:10 +00:00
David E. O'Brien 3a21c92bdf MFC: rev 1.81: Don't force busdma to pre-allocate bounce pages for the parent tag.
Reviewed by:	scottl
2005-03-02 20:29:33 +00:00
John-Mark Gurney a5c4c4ff0d MFC:
return after freeing data element, instead of falling through, and using
  the free'd element, and ultimate NULL deref of the failed allocation.

  MFC after:      1 week

  Revision  Changes    Path
  1.79      +1 -0      src/sys/dev/firewire/firewire.c
2005-03-02 20:29:18 +00:00
John-Mark Gurney 30137ba456 MFC:
don't try to recurse on the bpf lock..  kqueue already locks the bpf lock
  now...

  Submitted by:   Ed Maste of Sandvine Inc.
  MFC after:      1 week

  Revision  Changes    Path
  1.139     +1 -2      src/sys/net/bpf.c
2005-03-02 20:27:46 +00:00
John-Mark Gurney ed11fa4c23 MFC:
clean up some tunables that should of been removed a while ago...

  Revision  Changes    Path
  1.183     +0 -4      src/sys/kern/subr_witness.c
2005-03-02 20:17:39 +00:00
John-Mark Gurney d2ac30b668 MFC:
use NULL instead of 0 when casting/comparing w/ a pointer...

  Revision  Changes    Path
  1.86      +2 -2      src/sys/net/if_var.h
2005-03-02 20:15:23 +00:00
Andre Oppermann 92e2696699 MFC rev 1.24 and 1.25: Fix two double free()'s in sanity checks. 2005-03-02 19:54:22 +00:00
Andre Oppermann d2c9038812 MFC: Bring back full packet destination manipulation for 'ipfw fwd'
with the kernel compile time option:

   options IPFIREWALL_FORWARD_EXTENDED

This option has to be specified in addition to IPFIRWALL_FORWARD.

PR:		kern/71910
PR:		kern/73129
2005-03-02 19:50:12 +00:00
Christian S.J. Peron 4163bf0247 MFC revision 1.224
date: 2005/02/24 00:13:16;  author: csjp;  state: Exp;  lines: +6 -0
Add locking assertions into vn_extattr_set, vn_extattr_get and
vn_extattr_rm. This is meant to catch conditions where IO_NODELOCKED
has been specified without the vnode being locked.
2005-03-02 19:29:17 +00:00
Xin LI f27aa0ea96 MFC 1.398: advise user to rebuild fsck(8) after new kernel build. 2005-03-02 16:35:10 +00:00
Scott Long fd892a1124 Revert 1.101.2.4, it was not meant for RELENG_5. 2005-03-02 16:30:39 +00:00
Christian Brueffer dd870e1fee MFC:
rev. 1.26 - 1.27

- list the PixelView PlayTV PAK as supported
- bump .Dd

rev. 1.28 - 1.29 by ru

Fixed macro abuse.
Sort sections.
2005-03-02 14:30:00 +00:00
Max Khon 5ca7660762 Bump __FreeBSD_version for EOVERFLOW check fix in vswprintf(3). 2005-03-02 12:06:04 +00:00
Max Khon db83df74c9 MFC: rev 1.6: Fix EOVERFLOW detection in vswprintf(3). 2005-03-02 12:04:31 +00:00
Maxim Sobolev 0e439d73fe MFC: Merge in some utility functions from NetBSD, which may be necessary
for the new version of cdce driver.
2005-03-02 10:56:52 +00:00
David E. O'Brien 70e8d10118 MFC:
o nuke gratuitous null ptr check
o nuke duplicate call of dpt_free when dpt_init fails
2005-03-02 10:56:11 +00:00
David E. O'Brien 2b0b9ee85e MFC: rev 1.8: Use the SYSCTL_ADD_OID macro, instead of sysctl_add_oid(). 2005-03-02 10:52:23 +00:00
David E. O'Brien 8d6399ec8a MFC: rev 1.21: Specifically use the 32-bit version of fuword/suword. 2005-03-02 10:51:06 +00:00
Christian Brueffer 23be2da1dc MFC: rev. 1.13
ATA -> PATA/SATA, to make clear that this driver supports both kinds
of controllers.
2005-03-02 10:49:28 +00:00
Christian Brueffer 531b941210 MFC: rev. 1.4
Don't mention PATA support, all listed controllers are SATA.
2005-03-02 10:48:51 +00:00
David E. O'Brien 66a7f4df62 MFC: rev 1.14: move ptr deref's to after null checks 2005-03-02 10:48:10 +00:00
David E. O'Brien 1b609cc20e MFC: + Split dcons core code and OS dependent code. 2005-03-02 10:46:00 +00:00
David E. O'Brien 1966640d46 MFC: + Split dcons core code and OS dependent code.
+ Invalidate dcons buffer on shutdown.
2005-03-02 10:45:30 +00:00
David E. O'Brien 9eb7597750 MFC:
+ Remove lots of tab/space errors introduced by massive cut-n-paste action.
+ Take into account that Pinnacle screwed up their PCI ID in the beginning..
  Older cards have it reversed.
  Also, use some already defined values instead of magic numbers.
+ Add code to do better auto detection of tuner types etc.
+ Add support for the Pixelview PlayTV
+ Remove vnode.h and adjust includes to compensate for pollution.
+ Remove support for FreeBSD < 4.recent from this driver.
2005-03-02 10:27:35 +00:00
David E. O'Brien 6ee89be9f6 MFC: rev 1.4: Fix build if both of BKTR_USE_FREEBSD_SMBUS and
BKTR_NEW_MSP34XX_DRIVER are defined.
2005-03-02 10:12:18 +00:00
David E. O'Brien 975d58ca97 MFC: sync WS with HEAD 2005-03-02 10:08:56 +00:00
David E. O'Brien de35ff57a2 MFC: rev 1.79: initiate a transmit only if packets were added to the tx chain. 2005-03-02 10:07:32 +00:00
David E. O'Brien d0ca8da210 style(9) sync with HEAD 2005-03-02 10:01:54 +00:00
David E. O'Brien 13d119a910 MFC: rev 1.11: Check for BIOS version 3.0 as well as 3.1. 2005-03-02 09:39:24 +00:00
David E. O'Brien 457227ec3b Remove trailing WS. 2005-03-02 09:38:19 +00:00
David E. O'Brien 12c188c61e MFC: sync *rid ordering. 2005-03-02 09:35:22 +00:00
David E. O'Brien b1c71c083b Match 'acpi_host_mem_start' type with HEAD. 2005-03-02 09:28:29 +00:00
David E. O'Brien 223e655806 MFC: fix SCM ID's. 2005-03-02 09:26:43 +00:00
Doug Rabson 22c7441b27 MFC:
Attempt to free any static TLS space used by a shared library when it
is unloaded. This allows applications which load and unload libraries
like libGL.so.1 several times to work properly.
2005-03-02 09:18:49 +00:00
David E. O'Brien 5ddc077cb0 MFC: Protect against multiple includes and use _KERNEL to protect the PCI fns. 2005-03-02 09:18:41 +00:00
Gleb Smirnoff 755ab42825 MFC 1.20:
add carp and pfsync protos
2005-03-02 09:15:10 +00:00
David E. O'Brien 1d15245227 sync with HEAD - trim trailing spaces 2005-03-02 09:14:59 +00:00
David E. O'Brien c5b1a75841 MFC: rev 1.102: Put some of the probe messages under bootverbose. 2005-03-02 09:13:11 +00:00
Gleb Smirnoff c9ff2fbf4c MFC 1.4:
- remove OpenBSDisms, add FreeBSDisms
  - comment out feature, we do not have yet: tcpdumping on pfsync,
    add a BUGS section
  - reference carp.4
  - dereference bpf(4), tcpdump(7), hostname.if(5)
  - sort references
  - tell when pfsync appeared in FreeBSD

  Reviewed by:    mlaier
2005-03-02 09:07:16 +00:00
Tim Kientzle 8bd7c8a7cd MFC 1.8: Correctly skip gzip "Extra Data" field, fixing bsdtar (and
hence pkg_add) for signed packages.
2005-03-02 05:37:10 +00:00
Christian S.J. Peron 3d4b3fe774 MFC revision 1.211
date: 2005/02/24 00:05:50;  author: csjp;  state: Exp;  lines: +1 -2
Drop bzero and shove the responsibility of zeroing the kse upcall
object on to the zone allocator. It should be noted that uma_zalloc(9)
uses bzero to zero out the object so there probably wont be any
real performance benefit. If UMA grows the ability to supply
zeroed zones more efficiently in the future, we will not have to
modify all the existing consumers.
2005-03-02 05:01:43 +00:00
David E. O'Brien 5836be3752 MFC: rev 1.40: Replaced afterinstall: with FILES. 2005-03-02 04:43:30 +00:00
David E. O'Brien f637f9f323 MFC: revs 1.9-10: More math functions. 2005-03-02 04:22:17 +00:00
David E. O'Brien 9baa95bff5 MFC: rev 1.54: Add debug_list.cc to the list of files to compile. 2005-03-02 04:09:38 +00:00
David E. O'Brien 2b773eb361 MFC: rev 1.52: Add atomicity.cc to CLEANFILES. 2005-03-02 04:07:34 +00:00
David E. O'Brien f4965b56ae Sync with HEAD. 2005-03-02 04:06:10 +00:00
David E. O'Brien f42438e5f3 MFC: rev 1.24: tweak adding the .h to the .o dependency lists. 2005-03-02 04:05:10 +00:00
David E. O'Brien 4f01775fdd MFC: rev 1.5: modify SRCS organization. 2005-03-02 04:02:21 +00:00
Alan Cox 62ac1fb707 MFC revision 1.301
Assert that page allocations during an interrupt specify
 VM_ALLOC_INTERRUPT.

 Assert that pages removed from the cache queue are not busy.

MFC revision 1.303
 Transfer responsibility for freeing the page taken from the cache
 queue and (possibly) unlocking the containing object from
 vm_page_alloc() to vm_page_select_cache().
2005-03-02 04:00:04 +00:00
David E. O'Brien 228b4362ca MFC: Implement the EMACS-inspired -a option to bump the annotation_level. 2005-03-02 03:02:59 +00:00
Matthew N. Dodd 9bb8ec5f2e MFC: 1.233
Cosmetic change to suspend, dont call tsleep an extra time at exit.
2005-03-02 02:15:13 +00:00
Brooks Davis d129e6940a MFC 1.22: When ukbd0 arrives, attach to /dev/ukbd0 rather then /dev/kbd1
since kbd1 might be something else.
2005-03-02 01:38:46 +00:00
Garance A Drosehn ef7fe52ec5 Revert revision 1.26.4.1 before 5.4-release. This changes shell-option
parsing (on the `#!' line) back to the way it has worked in FreeBSD since
March 2000.  That processing is not correct, but we aren't going to have
the right fix for it tested in time for 5.4-release.  Revision 1.26.4.1
fixed the behavior for some uses, and broke it for others.  In particular,
it broke tricks like:     #!/bin/sh -- # -*- perl -*-
which is recommended (by perl documentation) for some situations.

PR:		16393 (gives history)
Reviewed by:	freebsd-arch
2005-03-02 00:00:13 +00:00
David Xu 81dd859d2a MFC revision 1.6
Mark _rtld_allocate_tls and _rtld_free_tls as weak symbols
  for Variant I tls.
So rtld can override it.
2005-03-01 23:46:27 +00:00
David E. O'Brien 5361e586a5 MFC: revs 1.3-5 (minus '-a' addition): Don't abuse 'Ar', mdoc fixes, and
document all options and general usage.
2005-03-01 20:40:18 +00:00
David E. O'Brien 74bba9b350 MFC: Properly initialize kgdb to recognize what ABI to use on amd64 platform. Display PID and process name as a part of the 'info threads' output.
Introduce new commands 'tid <tid>' and 'proc <pid>' to accompany
gdb's default 'thread <thread num>' to make the task of switching
between different contexts easier.
2005-03-01 20:35:14 +00:00
David E. O'Brien c1e2d11290 MFC: use the system gnuregex library vs. building GNU regex bits into libiberty. 2005-03-01 20:27:45 +00:00
Garance A Drosehn 08049b4e65 MFC 1.56: Fix -0 vs -L/-I processing, mainly so that 'xargs -0 -I []' will
do something sensible (namely: treat then '\0' as the EOL character, when
deciding what "a line" is for -N).  Note that  -I implies -N.
2005-03-01 20:16:15 +00:00
David E. O'Brien 703a621fd3 Revert rev 1.438.2.14, it is unneeded. 2005-03-01 20:16:02 +00:00
Ruslan Ermilov f4e641108c MFC: 1.27: Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input(). 2005-03-01 19:44:28 +00:00
Garance A Drosehn eeda93a73a MFC *: Compensate for off by one bugs in disk firmware for 48BIT addressing
cutover.  This fix is from Dec 9th, and solves a problem some users see with
some models of large disks.  Many users have reported that this fix works on
current, and I wanted to be sure it made it into 5.4-release.

[* = 1.87 ata-all.h, 1.96 ata-chipset.c, 1.181 ata-disk.c, 1.50 ata-lowlevel.c]
2005-03-01 19:37:41 +00:00
Bruce A. Mah c74a9dc9f7 MFC: gshsec(8), new math functions, kuzip(8), newfs(8) -n, rtld(1)
LD_LIBMAP, Heimdal 0.6.3, OpenSSL 0.9.7e.
2005-03-01 18:35:34 +00:00
Bruce A. Mah ba353371cf MFC: Grammar, punctuation, and style fixups from rev. 1.809. 2005-03-01 17:59:26 +00:00
Paul Saab f872cd7438 regen for msync 2005-03-01 17:51:47 +00:00
Paul Saab cd3c553bf7 MFC: rev 1.47. Use msync() to implement msync() for freebsd32 emulation. 2005-03-01 17:51:25 +00:00
Jacques Vidrine 1f19bc6011 MFC update OpenSSL 0.9.7d -> 0.9.7e. 2005-03-01 16:47:41 +00:00
Jacques Vidrine 1f34687213 MFC update Heimdal 0.6.1 -> 0.6.3. 2005-03-01 16:42:14 +00:00
Christian Brueffer baa66898b1 MFC:
Markup nits.

Original revisions by:	ru
2005-03-01 16:18:39 +00:00
Christian S.J. Peron 897f675bbf MFC revision 1.16
date: 2005/02/24 00:04:45;  author: csjp;  state: Exp;  lines: +3 -1
-document the fact that extattr_get_* can fail if the requested
 attribute does not exist on the file.
-bump document date
2005-03-01 16:16:20 +00:00
Pawel Jakub Dawidek e514704e19 MFC: gbde.c 1.26
Remove bogus O_CREAT flag. We really don't want to create a file here.

PR:		bin/67793
Submitted by:	Amir Shalem <[email protected]>
Approved by:	phk
2005-03-01 14:49:19 +00:00
Pawel Jakub Dawidek 2fe394d22a MFC:
- Add md_provsize field to metadata, which will help with
  shared-last-sector problem.
  After this change, even if there is more than one provider with the same
  last sector, the proper one will be chosen based on its size.
  It still doesn't fix the 'c' partition problem (when da0s1 can be confused
  with da0s1c) and situation when 'a' partition starts at offset 0
  (then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
  option there, when creating device or avoid sharing last sector.
  Actually, when providers share the same last sector and their size is equal,
  they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
  isn't important at all.
- Provide backward compatibility.
- Update copyright's year.
2005-03-01 14:22:31 +00:00
Marius Strobl da12a729a9 MFC:
files: 1.1000
puc_sbus.c: 1.8

Declare the sbus(4) front-end of puc(4) also for fhc(4), allowing
uart(4) to support the Zilog 8530 SCCs which hang off of a FireHose
bus on Sun E4000/E5000 class machines.
2005-03-01 14:20:15 +00:00
Marius Strobl af0b38bee2 MFC: 1.38
Add a stopgap allowing puc(4) to allocate IRQs on fhc(4).
2005-03-01 14:20:08 +00:00
Pawel Jakub Dawidek 6f1beaff8f MFC: g_label_ufs.c 1.2
Take care not to issue unaligned I/O requests while tasting a provider.

Original author:	des
2005-03-01 13:58:47 +00:00
Pawel Jakub Dawidek b25550e43a MFC: geom.8 1.14
geom.c	1.10

- Add GEOM_LIBRARY_PATH environment variable which allows to specify an
  alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.
2005-03-01 13:39:37 +00:00
Pawel Jakub Dawidek 62446140ca MFC: Connect SHSEC GEOM class to the build. 2005-03-01 13:32:17 +00:00
Pawel Jakub Dawidek 1cad49bfef MFC: Introduce a new GEOM class - SHSEC. It provides sharing secret between
the given providers. Without even one of the configured components there
     should be no way to get the secret.

Supported by:	WHEEL Sp. z o.o.
		http://www.wheel.pl
2005-03-01 13:17:31 +00:00
Christian Brueffer 93b13a2ca0 MFC:
rev. 1.111 by dds

Clarify the structure element size ordering.

rev. 1.112 - 1.113 by imp

A large majority of the source files in the tree start their license
and copyright statements in a comment that begins with /*-.  Document
this tradition.  A strict adherence to this rule will help resellers
that wish to publish all copyright notices, generated automatically
from the tree.  There are too many variant licenses to do it purely
by more complicated pattern matching.

Clarify /*- convention.

rev. 1.114 by keramida

Fix typos and add .Pp after the end of a display to separate the
displayed text from the paragraph right after it.

rev. 1.115 - 1.117 by ru

Nits.
Add a few colons.
Fixed the misplaced $FreeBSD$.
2005-03-01 12:44:49 +00:00
Maxim Sobolev 9ab433d4fd Add missed kern/ndis_windrv.c. This unbreaks compilation with options NDISAPI. 2005-03-01 12:42:41 +00:00
Pawel Jakub Dawidek dda7dc947f MFC: g_gate.c 1.14(part), 1.17
- Improve mediasize verification.
- Remove TDP_GEOM flag from thread after ggate device creation.
  This flag means "wait for all pending requests before returning to userland".
  There are pending events for sure, because we just created new provider and
  other classes want to taste it, but we cannot answer on I/O requests until
  we're here.

Reminded by:	phk
2005-03-01 12:24:56 +00:00
Poul-Henning Kamp ac29531748 Revert MFC: Do not change number of arguments to vrecycle(). 2005-03-01 11:32:32 +00:00
David E. O'Brien a1816ded20 MFC: match the LINUX32 style with existing style. 2005-03-01 10:08:11 +00:00
David E. O'Brien 023c22def6 MFC: rev 1.162: fix Linux compat 'uname -m' on AMD64. 2005-03-01 10:00:45 +00:00
David E. O'Brien 72a69311fb Back out the rework of how we store process times in the kernel.
This changed the size of struct proc and thus broke the 5-STABLE kernel ABI.
2005-03-01 09:30:19 +00:00
Joseph Koshy 427ef152e8 MFC rev 1.23:
Cross-reference ffsinfo(8).
2005-03-01 09:23:35 +00:00
Joseph Koshy c5ef632f0b MFC rev 1.30:
Mark mknod(8) as deprecated.  Add text in the 'COMPATIBILITY' section
  describing the changes in device management since FreeBSD 4.0.
2005-03-01 09:21:24 +00:00
David E. O'Brien eede0302b7 Quiet warning of lack of cast. 2005-03-01 09:06:30 +00:00
Joseph Koshy ff76e688a8 MFC revs 1.3, 1.4:
Bring the prototype for alq_open() in line with the code.  Add a section
  on locking.
  Note that functions alq_flush() and alq_post() should not be called in
  contexts where sleeping is disallowed.
2005-03-01 09:01:09 +00:00
Joseph Koshy 770e77aaa7 MFC rev 1.14:
Make an argument name in the synopsis match that in the text.  Correct
  an mdoc error.
2005-03-01 08:54:45 +00:00
Joseph Koshy 3f40ea8d47 MFC rev 1.21:
Document "machdep.hlt_cpus".

Update the manual page's date.
2005-03-01 08:52:10 +00:00
Joseph Koshy 2b0a61f19e MFC rev 1.111:
Remove mention of block devices.  Mention that entries under /dev
  are managed by devfs(5).  Add cross-references.
2005-03-01 08:46:27 +00:00
Pyun YongHyeon 5f1cf0adca MFC: fdc.c, rev. 1.306
Add missing va_end() in fdc_cmd.
  0 -> NULL in arguments of fdc_sense_int().

  Reminded by:    joerg
2005-03-01 08:22:55 +00:00
Warner Losh 35c6c4d251 MFC:
Use BUS_PROBE_DEFAULT in friends
	Minor whitespace diff reduction patches.
2005-03-01 08:11:52 +00:00
Hajimu UMEMOTO 8a1cabb740 MFC 1.58, 1.59:
- fix typo.
- icmp6_notify_error uses IP6_EXTHDR_CHECK, which in turn calls
  m_pullup.  icmp6_notify_error continued to use the old pointer,
  which after the m_pullup is not suitable as a packet header any
  longer (see m_move_pkthdr).
  and this is what causes the kernel panic in sbappendaddr later on.
2005-03-01 07:21:55 +00:00
Hajimu UMEMOTO e2df8819a1 MFC 1.87: initialized the last arg to ip6_process_hopopts(),
because the recent code requires it to be 0 when a jumbo payload
option is contained.
2005-03-01 07:19:20 +00:00
Warner Losh 5f61f0de05 MFC: Merge probe values from current 2005-03-01 07:18:17 +00:00
cvs2svn d4e5de0de2 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-03-01 05:58:17 +00:00
Wes Peters daa75d3158 MFC improved handling of .snap directories in filesystems.
In newfs:
Add an option to suppress the creation of the .snap directory in
the new filesystem.  This is intended for memory and vnode filesystems
that will never be fsck'ed or dumped.

In dump:
Improved error checking for existence of a .snap directory to
generate snapshots in when -L is requested.  If the .snap directory
does not exist, or is not a directory, issue a warning and revert
to the non- live behavior.

Obtained from:  St. Bernard Software RAPID
2005-03-01 05:30:30 +00:00
David Schultz f99dabc2b8 MFC linux_sysvec.c,v 1.136
When running Linux binaries, set up the initial FPU state as Linux
  would.
2005-03-01 04:50:54 +00:00
Wes Peters 169c5fad64 MFC Spike's WITHOUT_MODULES hack, with associated doco.
Submitted by:   David Yeske <[email protected]>
2005-03-01 04:49:37 +00:00
David Schultz e514a90512 Combined MFC of roughly 1300 lines of man page updates. 2005-03-01 04:03:58 +00:00
David Schultz 0ccc485183 MFC Makefile,v 1.53
Add and document ilogbl(), a long double version of ilogb().

MFC Makefile,v 1.55

  Hook up and document floorl().

MFC Makefile,v 1.56

  Implement and document ceill().

MFC Makefile,v 1.59

  Add fma() and fmaf(), which implement a fused multiply-add operation.

MFC Makefile,v 1.60

  - Move the functions presently described in in ieee(3) to their own
    manpages.  They are not very related, so separating them makes it
    easier to add meaningful cross-references and extend some of the
    descriptions.
  - Move the part of math(3) that discusses IEEE 754 to the ieee(3)
    manpage.

MFC Makefile,v 1.62

  Move machine-dependent crud to its own makefile.

MFC Makefile,v 1.64

  Un-document the non-extant exp10() and exp10f() functions.
  exp10() was a casualty of the transition away from the VAX.
2005-03-01 03:57:18 +00:00
David Schultz 19815a1363 MFC Makefile.inc,v 1.1 e_sqrt.S,v 1.1 e_sqrtf.S,v 1.1
Use hardware instructions for sqrt() and sqrtf().

In RELENG_5, these are called __ieee754_sqrt() and __ieee754_sqrtf().
2005-03-01 03:57:12 +00:00
David Schultz 4df1b5b135 MFC s_fma.S,v 1.1 s_fmaf.S,v 1.1
Add fma() and fmaf(), which implement a fused multiply-add operation.
2005-03-01 03:57:08 +00:00
David Schultz b7fc6d9a1b MFC e_sqrt.S,v 1.1 s_llrint.S,v 1.1 s_lrint.S,v 1.1
amd64 assembly versions of sqrt(), lrint(), and llrint() using SSE2.
2005-03-01 03:57:05 +00:00
David Schultz e81a1a6be1 MFC s_cosf.S,v 1.2 s_sinf.S,v 1.2 s_tanf.S,v 1.2
Remove the float versions of the i387 trig functions obtained from
  NetBSD.  They're buggy, particularly for inputs larger in
  magnitude than 2**63.
2005-03-01 03:57:02 +00:00
David Schultz abe633e91e MFC e_atan2.S,v 1.8 s_atan.S,v 1.7 e_atan2f.S,v 1.3
Remove the i387 versions of atan(), atan2(), and atan2f().
  They are slower than the MI routines on modern hardware,
  except for degenerate cases such as the Pentium 4.
2005-03-01 03:56:59 +00:00
David Schultz 33c9b788bd MFC e_acos.S,v 1.9 e_asin.S,v 1.9
Remove i387 versions of asin() and acos().  Although the hardware
  instruction was faster on the 486, it's slower than our MD version on
  modern processors.
2005-03-01 03:56:56 +00:00
David Schultz 9cc54ee25c MFC msun/Makefile,v 1.57 as msun/i387/Makefile.inc
Import the subset of J.T. Conklin's single-precision x86-optimized
  math routines that appear to be (a) correct and (b) faster than their
  MI counterparts on my Pentium 4.

MFC Makefile.inc,v 1.1

  Move machine-dependent crud to its own makefile.

MFC Makefile.inc,v 1.2

  Remove the float versions of the i387 trig functions obtained from
  NetBSD.  They're buggy, giving particularly for inputs larger in
  magnitude than 2**63.

MFC Makefile.inc,v 1.3

  Remove i387 versions of asin() and acos().  Although the hardware
  instruction was faster on the 486, it's slower than our MD version on
  modern processors.

MFC Makefile.inc,v 1.4

  Remove the i387 versions of atan(), atan2(), and atan2f().
  They are slower than the MI routines on modern hardware,
  except for degenerate cases such as the Pentium 4.
2005-03-01 03:56:52 +00:00
David Schultz 329d993bd8 MFC msun/Makefile.inc, v1.58 as msun/amd64/Makefile.inc
amd64 assembly versions of sqrt(), lrint(), and llrint() using SSE2.

MFC Makefile.inc,v 1.1

  Move machine-dependent crud to its own makefile.
2005-03-01 03:56:49 +00:00
David Schultz 703559e9aa MFC Makefile.inc,v 1.1
Move machine-dependent crud to its own makefile.
2005-03-01 03:56:46 +00:00
David Schultz e6f701457a MFC s_nextafter.c,v 1.8 s_nextafterf.c,v 1.8
If x == y, return y, not x.  C99 (though not IEEE 754) requires that
  nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.

MFC s_nextafter.c,v 1.9 s_nextafterf.c,v 1.9

  Update comment to reflect the code change in the previous revision.
2005-03-01 03:56:42 +00:00
David Schultz 573ea08c8d MFC s_ilogbl.c,v 1.1
Add and document ilogbl(), a long double version of ilogb().
2005-03-01 03:56:39 +00:00
David Schultz 9cd3e21b2e MFC s_ilogb.c,v 1.9 s_ilogbf.c,v 1.7
Use the FP_ILOG macros from <math.h> rather than hardcoded return values.
  Also be prepared for FP_ILOGBNAN != INT_MAX.
2005-03-01 03:56:35 +00:00
David Schultz ae073ef0f5 MFC s_fma.c,v 1.1 s_fmaf.c,v 1.1
Add fma() and fmaf(), which implement a fused multiply-add
  operation.
2005-03-01 03:56:32 +00:00
David Schultz adda2d8b21 MFC s_floorl.c,v 1.1
Implement floorl().
2005-03-01 03:56:29 +00:00
David Schultz 86ab60bcee MFC s_ceill.c,v 1.1
Implement and document ceill().
2005-03-01 03:56:27 +00:00
David Schultz 6e1e9c21b9 MFC math.h,v 1.45
Add and document ilogbl(), a long double version of ilogb().

MFC math.h,v 1.47

  Whitespace nit.

MFC math.h,v 1.48

  Implement floorl().

MFC math.h,v 1.49

  Implement and document ceill().

MFC math.h,v 1.51

  Set math_errhandling to MATH_ERREXCEPT.  Now that we have fenv.h, we
  basically support this, subject to gcc's lack of FENV_ACCESS support.
  In any case, the previous setting of math_errhandling to 0 is not
  allowed by POSIX.

MFC math.h,v 1.53

  Only annotate pure routines with __pure2.

MFC math.h,v 1.54

  Add fma() and fmaf(), which implement a fused multiply-add operation.
2005-03-01 03:56:24 +00:00
David Schultz 41c71cb242 MFC e_scalb.c,v 1.12
Reduce diffs against vendor source (Sun fdlibm 5.3).
2005-03-01 03:56:20 +00:00
Christian Brueffer e9404643c3 MFC: rev. 1.2 by ru
Improved markup.
2005-02-28 22:39:31 +00:00
Christian Brueffer ad8675fbc7 MFC (partly): rev. 1.17 by ru
Fixed too many of "the"
2005-02-28 22:35:20 +00:00
Brooks Davis 5202e76ed7 MFC the change of ifi_epoch to be uptime instead of wall clock time.
The origional commit message follows:

	Change the definition of struct if_data's member ifi_epoch from
	wall clock time to uptime because wall clock time may go
	backwards.

	This is a change in the API which will impact SNMP agents who
	are using ifi_epoch to set RFC2233's ifCounterDiscontinuityTime.
	None are known to exist today.  This will not impact applications
	that are using the <index, epoch> tuple to verify interface
	uniqueness except that it eliminates a race which could lead to
	a false assumption of uniqueness.

Discussed with: re (jhb, scottl)
Pointed out by: pkh (way back at EuroBSDCon)
Pointy hat:     brooks
2005-02-28 22:03:14 +00:00
David E. O'Brien 04c4a43916 Build 32-bit versions of the system libraries on AMD64. NO_LIB32 to disable. 2005-02-28 20:55:16 +00:00
Lukas Ertl 93786c66cd MFC 1.8:
Correctly calculate what to do and how to retry a request to a plex
   when the previous one failed and there are more than one plex in the
   volume.

   This could have led to a flood of error messages on the console and
   probably a deadlock in certain situations.
2005-02-28 20:09:39 +00:00
Christian Brueffer 85d848e414 MFC: rev. 1.3 by ru
Nits.
2005-02-28 20:07:43 +00:00
Lukas Ertl bd7889ace1 MFC 1.16:
In case of drive errors, don't close the associated consumer and
   detach it, but instead let the geom wither away.

   Bump copyright year.
2005-02-28 20:06:38 +00:00
Christian Brueffer 96253a4809 MFC: rev. 1.2 by ru
Markup nits.
2005-02-28 20:00:05 +00:00
Christian Brueffer 936aad5846 MFC: rev. 1.3 by ru
Removed stray quotes.
2005-02-28 19:55:31 +00:00
Christian Brueffer 5332f325d3 MFC: rev. 1.5 by ru
Revert last delta.  The ASCII code 0 character is "NUL",
not "NULL", see ascii(7).
2005-02-28 19:43:35 +00:00
Poul-Henning Kamp d2d5d42f1d MFC:
Stall threads before they exit or return to userland until
	any geom events they have created have finished rattling.
2005-02-28 19:32:24 +00:00
Poul-Henning Kamp c62c4c69c1 MFC:
Pick the error code out before we free the structure.
2005-02-28 19:06:37 +00:00
Poul-Henning Kamp f76063871a MFC:
If a disk manages to come and leave again before geom's event
	thread catches up, we may not have a pointer to free.
2005-02-28 18:42:01 +00:00
Hartmut Brandt db39f5dcde MFC: Rev. 1.1.1.5
For ethernet interfaces populate the ifSpecific field with
{transmission 7} as per RFC3635. This is done differently in
current, but that change would require changing the ABI.
2005-02-28 17:43:36 +00:00
Hartmut Brandt c1c3b50e73 MFC: Rev. 1.1.1.5
Document the fact that one must set both the Path and the type of
a unix domain socket to open it.
2005-02-28 17:38:54 +00:00
Hartmut Brandt 6c162520c5 MFC: Rev. 1.1.1.5
Fix a critical bug in handling unix domain sockets. The daemon was
just exiting when a socket was connected.

PR:		bin/76502
Submitted by:	Hiroshi Oota <[email protected]>
2005-02-28 17:35:49 +00:00
Christian Brueffer 991c4f38b0 MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-28 16:53:01 +00:00
Christian Brueffer f5f9adffac MFC:
rev. 1.19 by imp

Document that libkvm requires device mem to work.

rev. 1.20 by ru

Scheduled mdoc(7) sweep.
2005-02-28 16:45:12 +00:00
Christian Brueffer a051004010 MFC:
rev. 1.33 by andre

Remove entire section talking about RTF_PRCLONING that got nuked in 5.2 already.
o Better description of IP fastforwarding.  It can do the full thing now
  including firewalling.
o Reword the description of ICMP redirects.
o Add references to route(4) and pfil(9).

rev. 1.34 by ru

Scheduled mdoc(7) sweep.

rev. 1.35 by ru

Fixed xref.
2005-02-28 16:35:51 +00:00
Robert Watson 90ff9bdba0 Merge kvm_proc.c:1.81 from HEAD to RELENG_5:
date: 2004/10/06 17:10:56;  author: jhb;  state: Exp;  lines: +7 -1
  - Fix the compile to chase the p_rux changes.
  - Add a comment noting that the ru_[us]times values being read aren't
    actually valid and need to be computed from the raw values.

  Submitted by:   many (1)

This is the likely missed counterpart of the recently merged kernel changes
that eliminate p_runtime in favor of rux_runtime.
2005-02-28 16:28:07 +00:00
Xin LI 2ae182fcc4 MFC revision 1.88/1.89 [newfs safebelt for snapshot]
date: 2005/02/20 11:32:49;  author: delphij;  state: Exp;  lines: +0 -0
  When creating a new FFS file system, the block size will indirectly
  affect the largest file size that is allowed by the file system.
  On the other hand, when creating a snapshot, the snapshot file will
  appear as it is as big as the file system itself.  Hence we will not
  be able to create a snapshot on large file systems with small block
  sizes.

  Add a warning about this, and gives some hints to correct the issue.

  Reviewed by:    mckusick
2005-02-28 16:19:17 +00:00
Xin LI 278c36e5b6 MFC: Transferr the responsibility of recomputation of the superblock
summary to background fsck.  This will improve startup speed when
mounting a large volume.

Original commit log:

  The recomputation of file system summary at mount time can be a
  very slow process, especially for large file systems that is just
  recovered from a crash.

  Since the summary is already re-sync'ed every 30 second, we will
  not lag behind too much after a crash.  With this consideration
  in mind, it is more reasonable to transfer the responsibility to
  background fsck, to reduce the delay after a crash.

  Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to
  control this behavior.  When set to nonzero, we will get the
  "old" behavior, that the summary is computed immediately at mount
  time.

  Add five new sysctl variables to adjust ndir, nbfree, nifree,
  nffree and numclusters respectively.  Teach fsck_ffs about these
  API, however, intentionally not to check the existence, since
  kernels without these sysctls must have recomputed the summary
  and hence no adjustments are necessary.

  This change has eliminated the usual tens of minutes of delay of
  mounting large dirty volumes.

  Reviewed by:    mckusick

  Revision  Changes    Path
  1.35      +5 -0      src/sbin/fsck_ffs/fsck.h
  1.41      +55 -0     src/sbin/fsck_ffs/pass5.c
  1.132     +68 -1     src/sys/ufs/ffs/ffs_alloc.c
  1.176     +12 -3     src/sys/ufs/ffs/ffs_softdep.c
  1.48      +6 -1      src/sys/ufs/ffs/fs.h
2005-02-28 16:04:53 +00:00
Christian Brueffer 6b166563b0 MFC: rev. 1.50 by ru
Sort xrefs.
2005-02-28 14:39:21 +00:00
Poul-Henning Kamp a6f98d18db MFC:
Add the missing fflag argument to geom-class ioctl methods.
2005-02-28 13:59:03 +00:00
Yaroslav Tykhiy 241c936271 Reduce the gratuitous diff to CURRENT by merging assorted style fixes.
Reviewed by:	md5(1)
2005-02-28 12:42:55 +00:00
Marius Strobl 677cde5a3a MFC:
ver.h: 1.5
identcpu.c 1.13

Identify USIIIi processors.
2005-02-28 12:40:37 +00:00
Yaroslav Tykhiy a2bc5c5965 MFC 1.204: Fix most cases where the address of an int is passed
to a function expecting a socklen_t * argument.

Approved by:	stefanf
2005-02-28 12:30:49 +00:00
Yoshihiro Takahashi 9a1583f11e MFi386: rev 1.1168.2.3 (connect "options MP_WATCHDOG" to the LINT builds) 2005-02-28 11:44:32 +00:00
Poul-Henning Kamp d463e3c326 MFC:
remove unused middle argument from vrecycle()
2005-02-28 11:20:44 +00:00
Poul-Henning Kamp 87ad03945c MFC:
Correctly clip dump device length to disk size if configured to
	dump on the entire unpartitioned disk.
2005-02-28 11:14:00 +00:00
Xin LI 38341fd14d MFC a part of static'ify of the FFS/UFS code, originally by phk:
Make a some SYSCTL_NODEs and some of FFS's VFS_ methods static.

  Revision  Changes    Path
  1.131     +5 -5      src/sys/ufs/ffs/ffs_alloc.c
  1.68      +0 -5      src/sys/ufs/ffs/ffs_extern.h
  1.278     +12 -7     src/sys/ufs/ffs/ffs_vfsops.c
  1.21      +1 -1      src/sys/ufs/ufs/ufs_dirhash.c

Discussed with:	phk
2005-02-28 10:33:21 +00:00
Gleb Smirnoff 1c5381adcc MFC 1.172:
In in_pcbconnect_setup() jailed sockets are treated specially: if local
  address is not supplied, then jail IP is choosed and in_pcbbind() is called.
  Since udp_output() does not save local addr after call to in_pcbconnect_setup(),
  in_pcbbind() is called for each packet, and this is incorrect.

  So, we shall treat jailed sockets specially in udp_output(), we will save
  their local address.

  This fixes a long standing bug with broken sendto() system call in jails.

  PR:             kern/26506
  Reviewed by:    rwatson
2005-02-28 10:16:23 +00:00
Gleb Smirnoff 9c3bd19274 MFC 1.159, 1.160:
We can make code simplier after last change.

  Noticed by:     Andrew Thompson

  In in_pcbconnect_setup() remove a check that route points at
  loopback interface. Nobody have explained me sense of this check.
  It breaks connect() system call to a destination address which is
  loopback routed (e.g. blackholed).

  Reviewed by:    silence on net@
2005-02-28 10:08:06 +00:00
Gleb Smirnoff 89d7dabe9c MFC 1.27:
Do not print kernel debugging on console. In case of serial console
  this can cause a really heavy load on system. Several kernel debugging
  messages can be triggered even remotely (e.g. bad ARP replies).

  Use kern.warning instead, so that really significant messages still
  will be printed on console.

  Reviewed by:    current@
  Security:     this change fixes a DoS condition, when default system
                console is serial, and box is flooded with bogus ARP
                packets
2005-02-28 10:02:41 +00:00
Poul-Henning Kamp 3565801bf1 MFC:
Bring nanobsd in like with the stuff in -current.
2005-02-28 10:01:45 +00:00
Gleb Smirnoff 9f47153c38 MFC 1.5:
Fix prototype for bpf_mtap2().
2005-02-28 10:01:13 +00:00
Gleb Smirnoff 5d61e4240f MFC 1.51, 1.52:
Reimplement recursion protection, checking whether current thread holds
  sockbuf mutex.

  Reviewed by:    rwatson

  Remove a recursion protection, which we inherited from splnet() netgraph times.
  Now several threads may write data to ng_ksocket. Locking of socket is done in
  sosend().

  Reviewed by:    archie, julian, rwatson
2005-02-28 09:59:02 +00:00
Gleb Smirnoff 4b063d979e Partial MFC of 1.19:
Make WITNESS happier:
 - refactor ngd_constructor, so that make_dev() is called without
   any locks held, since it mallocs memory with M_WAITOK flag.
2005-02-28 09:54:28 +00:00
David E. O'Brien 5e6e653eb9 MFC: rev 1.46: install bsd.endian.mk. 2005-02-28 09:30:12 +00:00
David E. O'Brien 235484fd16 MFC: rev 1.4: fix typo 2005-02-28 09:27:30 +00:00
David E. O'Brien 92945dae1b MFC: Rework how we store process times in the kernel such that we always
store the raw values including for child process statistics and only compute
the system and user timevals on demand.
(See the 2004-10-05 18:51:12 UTC jhb commit for full details.)
2005-02-28 09:26:12 +00:00
David E. O'Brien 943e1cfa77 Sync formatting with 6-CURRENT.
Add lge(4), and nge(4), and commented out ispfw.
2005-02-28 07:59:21 +00:00
David E. O'Brien 9104567a0f MFC
rev 1.244: handle PSL_T properly across fork.  Typo fix.
rev 1.243: remove redundant code to drop per-thread debug register state from
           cpu_exit().
rev 1.242: restore cpu_reset proxy code to enable reset from ddb on an AP.
rev 1.241: reduce diffs to i386.
rev 1.240: remove unused cnt variable for the SMP case & trim some blank lines.
rev 1.239: take advantage of the shutdown processing being wired to the BSP
           and eliminate the evil cpu_reset_proxy code now that it will never
		   be activated.
2005-02-28 07:54:17 +00:00
David E. O'Brien 7d0b24ea9c MFC: rev 1.10: common multi-inclusion protection. 2005-02-28 07:42:59 +00:00
David E. O'Brien 35ad8fbc36 MFC: rev 1.7: PC98 will never be defined for amd64. 2005-02-28 07:40:54 +00:00
David E. O'Brien 1cb866d631 MFC: rev 1.14: there are no PC98 amd64 machines, so GC a few stray ifdef's. 2005-02-28 07:40:00 +00:00
David E. O'Brien 7e70cfbcf0 MFC: rev 1.215: read from RTC_INTR after writing to RTC_STATUSB. 2005-02-28 07:38:48 +00:00
David E. O'Brien d6470f90ec MFC: rev 1.474: allow to cross-build amd64 on non-i386. 2005-02-28 06:53:06 +00:00
David E. O'Brien f75c54ce11 Enable support for 32-bit Linux binaries in 5.4-RELEASE by default. 2005-02-28 06:49:30 +00:00
Pyun YongHyeon 3bb0addbdf MFC: Makefile, rev. 1.2
Add missing ofw_bus_if.h to SRCS.

  Submitted by:   joerg
2005-02-28 05:18:32 +00:00
Christian Brueffer e51c893335 MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-28 03:32:35 +00:00
Christian Brueffer 2ec090975c MFC:
rev. 1.10 by obrien

Document when this function came into FreeBSD.

rev. 1.11 by ru

Scheduled mdoc(7) sweep.
2005-02-28 03:19:59 +00:00
Christian Brueffer 1e5b51805c MFC:
rev. 1.22 by alfred:

Document EMSGSIZE return from recvmsg due to insufficient free files
when transfering rights (file descriptors.)

rev. 1.23 + 1.24 by keramida

Correct NULL/nil/null pointer usage.
2005-02-28 03:08:59 +00:00
Christian Brueffer e28cf7549c MFC: rev. 1.14 by julian
Make less wrong for desciptions of signal handling
2005-02-28 02:40:26 +00:00
Christian Brueffer 8298ad1224 MFC: rev. 1.15 by alfred
note that it is the caller's responsibility to free any buffer passed
to setvbuf(3) and friends.
2005-02-28 02:26:08 +00:00
David E. O'Brien 3745676289 MFC: rev 1.515: Implement proper handling of PG_G mappings in pmap_protect(). 2005-02-28 01:40:46 +00:00
David E. O'Brien b21d430697 MFC: rev 1.233: improve panic message for a busted mptable. 2005-02-28 01:38:00 +00:00
David E. O'Brien 33b986740a MFC: 1.247: invalidate TLB after PTE update. 2005-02-28 01:34:58 +00:00
David E. O'Brien 359f2566df MFC: Dedicated watchdog to cause a drop to the debugger and/or generate an
NMI to the boot processor if the kernel ceases to respond on MP systems.
2005-02-28 01:32:16 +00:00
Alan Cox 8bdd76be3c MFC revision 1.267
Revise the part of vm_pageout_scan() that moves pages from the cache
 queue to the free queue.  With this change, if a page from the cache
 queue belongs to a locked object, it is simply skipped over rather
 than moved to the inactive queue.
2005-02-28 01:29:46 +00:00
David E. O'Brien 67a85c4139 MFC: rev 1.1186: connect "options MP_WATCHDOG" to the LINT builds. 2005-02-28 01:03:18 +00:00
Matthew N. Dodd bdf4acbd68 Use mss_{format,speed}() rather than chn_set{format,speed}() and hold
mss lock across call.

This allows my Thinkpad 600E to resume with the sound driver loaded and
vchans enabled.
2005-02-27 23:32:21 +00:00
Nate Lawson 9720b68d1b MFC 1.3: Don't register a shutdown handler via SYSINIT. Instead, do it
when we attach a device.
2005-02-27 23:27:20 +00:00
cvs2svn 9b16ebb781 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-02-27 23:07:48 +00:00
Alan Cox c7ef0d4436 MFC revision 1.44
Allow two pmap locks to be held simultaneously.
2005-02-27 22:49:32 +00:00
David E. O'Brien 58a032397d MFC: sync with sys/i386/include/endian.h: use the single instruction 'bswap'. 2005-02-27 22:07:49 +00:00
David E. O'Brien 701e879893 MFC: rev 1.37: move -Wunused-parameter from WARNS level 3 level 4.
rev 1.36: use >= so we can use the actual WARNS levels.
2005-02-27 22:04:43 +00:00
David E. O'Brien a078ee3c70 style.Makefile(5), remove trailing spaces. 2005-02-27 22:02:02 +00:00
David E. O'Brien af22930c66 MFC: create. 2005-02-27 22:00:47 +00:00
David E. O'Brien 0f3d9cbfaa MFC: rev 1.248: Allow hints to disable CPU's. 2005-02-27 21:59:12 +00:00
David E. O'Brien 0d17e16969 MFC: rev 1.13: Treat pin 0 as IRQ 0 rather than ExtINT if mixed mode is not
enabled by the enumerator.
2005-02-27 21:45:56 +00:00
Paul Saab 70611c342f MFC:
>ps          2005-02-17 23:04:56 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/netinet          tcp_input.c tcp_sack.c tcp_var.h
>  Log:
>  Remove 2 (SACK) fields from the tcpcb. These are only used by a
>  function that is called from tcp_input(), so they oughta be passed on
>  the stack instead of stuck in the tcpcb.
>
>  Submitted by:   Mohan Srinivasan
>
>  Revision  Changes    Path
>  1.268     +2 -5      src/sys/netinet/tcp_input.c
>  1.8       +8 -7      src/sys/netinet/tcp_sack.c
>  1.117     +1 -3      src/sys/netinet/tcp_var.h
2005-02-27 21:43:54 +00:00
David E. O'Brien f4d036b36f MFC: rev. 1.22: There are no PC98 amd64 machines. 2005-02-27 21:43:15 +00:00
David E. O'Brien c3fe5cfd98 MFC: rev. 1.19: fix comment on COMPAT_IA32.
Also sync tabbing for "device" lines.
2005-02-27 21:41:43 +00:00
David E. O'Brien 474046a7a3 MFC: rev 1.17: If mixed mode is not enabled by the APIC enumerator, don't
assume that pin 0 on the first I/O APIC is an ExtINT pin.  Instead, assume
it is ISA IRQ 0.
2005-02-27 21:36:33 +00:00
David E. O'Brien 48b73ece5c MFC: rev 1.5: Compaq R3000Z has the weird MADT IRQ 0 quirk. 2005-02-27 21:30:31 +00:00
David E. O'Brien 0952ac9921 MFC: Add a quirk to indicate that pin 0 of the first I/O APIC is really
IRQ 0 and not an ExtINT pin.
2005-02-27 21:28:18 +00:00
Matthew N. Dodd b3c728b6f5 MFC
- Reformat arguments bus_dma_tag_create().
- Modify ida_v3_done() to treat FIFO status of -1 as FIFO empty (0).
  This is what ida_v4_done() does and seems to be necessary with some
  firmware versions on v3 devices.
- Add a callout to dump card status on command queue timeouts.
2005-02-27 20:55:46 +00:00
Matthew N. Dodd 33cd837557 MFC:
1.14	libmap.c
	1.4	libmap.h
	1.39	rtld.1
	1.102	rtld.c

Description from Dan:

	Another handy libmap patch.  Lets you do stuff like this:

	LD_LIBMAP="libpthread.so.1=libthr.so.1" mythreadedapp

	If you already have a program-specific override in libmap.conf, note
	that you must use a program-specific override in LD_LIBMAP:

	LD_LIBMAP="[mythreadedapp],libpthread.so.1=libthr.so.1" mythreadedapp

PR:		bin/74471
Submitted by:	Dan Nelson <dnelson AT allantgroup.com>
2005-02-27 20:47:20 +00:00
Matthew N. Dodd 62fb2df60f MFC: 1.235
Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.

This allows my Thinkpad to resume successfully with APM.
2005-02-27 20:35:23 +00:00
Alexey Zelkin 8a5b009695 MFC: rev 1.9; Respect LC_MESSAGES locale category while handling of
NLS catalogs
2005-02-27 18:22:20 +00:00
Xin LI b2f107ba53 MFC revision 1.98
date: 2005/02/19 07:31:33;  author: delphij;  state: Exp;  lines: +1 -1
When clearing a fragment, it's possible that the length is zero.

Reviewed by:	mckusick
MFC After:	1 week
2005-02-27 18:01:40 +00:00
Maxim Konovalov 658aa0a556 MFC rev. 1.6: move ifcr_count sanity check up and reject negative
values before we panic at kmem_alloc() via malloc(9).
2005-02-27 15:57:16 +00:00
Christian Brueffer be98a45c1c MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-27 15:40:17 +00:00
Peter Pentchev 2562b0ab88 MFC rev. 1.47 and 1.48: the default for hw.ata.atapi_dma is now DMA,
not PIO.

PR:		75021
Submitted by:	Craig Rodrigues <[email protected]>,
		Joel Dahl <[email protected]>
2005-02-27 14:23:04 +00:00
Marius Strobl 29baf0c798 Bump __FreeBSD_version for the MFC of the Intel C/C++ compiler
GCC-compatibility fixes in src/include/stdbool.h rev. 1.6.8.1
and src/sys/i386/include/_types.h rev. 1.9.2.1, required by
ports/lang/icc.
2005-02-27 11:21:05 +00:00
Marius Strobl 950d124984 MFC: 1.7
The Intel C/C++ compiler doesn't require a typedef for _Bool when compiling
C source so don't declare one when using the GCC-compatibility (defaulting
to GCC 2.95.0) of ICC.
2005-02-27 11:17:19 +00:00
Marius Strobl fb3bd584b1 MFC: 1.10
Revert the part of rev. 1.8 which #ifdef'ed out __gnuc_va_list for the
Intel C/C++ compiler, required when using the GCC-compatibility of ICC.
2005-02-27 11:16:45 +00:00
Yoshihiro Takahashi 2b963cedf7 MFC: Fix to support Buffalo HYPERMEMORY. 2005-02-27 06:48:06 +00:00
Nate Lawson ebd39438c6 MFC: Disable C2/C3 for the release to be safe. 2005-02-27 04:06:57 +00:00
David Xu a5df65d53d MFC revision 1.301:
Don't restart a timeout wait in kern_sigtimedwait, also allow it
  to wait longer than a single integer can represent.
2005-02-27 03:42:34 +00:00
Jeff Roberson 24641c3f59 MFC revisions 1.206 - 1.207, 1.209 - 1.211
- filedesc locking cleanup.
2005-02-27 02:51:39 +00:00
Jeff Roberson d0092df281 MFC revision 1.143
- filedesc locking cleanup.
2005-02-27 02:51:13 +00:00
Jeff Roberson 0d02d31bfa MFC revisions 1.85, 1.86 2005-02-27 02:50:37 +00:00
Jeff Roberson e1dc910eb2 MFC revisions 1.64 - 1.66
- filedesc locking cleanup.
2005-02-27 02:43:51 +00:00
Jeff Roberson 66951fdd6b MFC revisions 1.153, 1.172
- filedesc locking cleanup.
2005-02-27 02:43:27 +00:00
Jeff Roberson f624d97693 MFC revisions 1.134 - 1.139
- filedesc locking cleanup.
2005-02-27 02:42:55 +00:00
Jeff Roberson c55bdcdcdd MFC revisions 1.214 - 1.217
- filedesc locking cleanup.
2005-02-27 02:41:36 +00:00
Jeff Roberson 830e28e9ac MFC revisions 1.357 - 1.359
- filedesc locking cleanup.
2005-02-27 02:41:00 +00:00
Jeff Roberson 0407ad3fca MFC revisions 1.257 - 1.258, 1.260
- filedesc locking cleanup.
2005-02-27 02:40:09 +00:00
Jeff Roberson 4fcf4a6e6a MFC revision 1.178
- filedesc locking cleanup.
2005-02-27 02:39:33 +00:00
Jeff Roberson 3249c5f38b MFC revision 1.94
- filedesc locking cleanup.
2005-02-27 02:37:40 +00:00
Jeff Roberson 4bcdfda197 MFC revision 1.48
- filedesc locking cleanup.
2005-02-27 02:37:18 +00:00
Jeff Roberson 183d8f633c MFC revisions 1.242 - 1.244, 1.248
- filedesc locking cleanup.
2005-02-27 02:36:39 +00:00
Jeff Roberson 9ceb18fa69 MFC revision 1.250
- filedesc locking cleanup.
2005-02-27 02:36:02 +00:00
Jeff Roberson b955978203 MFC revisions 1.247 - 1.266, 1.268 - 1.270, 1.275
- filedesc locking cleanup.
2005-02-27 02:35:10 +00:00
Jeff Roberson 553fa4c52e MFC revision 1.70
- filedesc locking cleanup.
2005-02-27 02:33:03 +00:00
Jeff Roberson 57e8c41efe MFC revision 1.80 2005-02-27 02:32:37 +00:00
Jeff Roberson d4a9397458 MFC revision 1.75
- filedesc locking cleanup.
2005-02-27 02:31:52 +00:00
Jeff Roberson 077c974cc4 MFC revisions 1.32 and 1.33
- filedesc locking cleanup.
2005-02-27 02:31:22 +00:00
Jeff Roberson 994e0dbc44 MFC revisions 1.66 - 1.67 and 1.70
- filedesc locking cleanup.
2005-02-27 02:30:28 +00:00
Jeff Roberson 8d9a3ea0ba MFC revisions 1.62 - 1.72
- filedesc locking cleanup.
2005-02-27 02:29:28 +00:00
Jeff Roberson 7c1946d24e MFC revision 1.56 2005-02-27 02:28:05 +00:00
Bruce A. Mah 6d60356aa4 MFC: Correct the minimum RAM requirements for i386 (24 MB to install,
12 MB to run).

	install.sgml		1.28 -> 1.29

PR:		77304
2005-02-26 23:42:39 +00:00
Bernd Walter 424f3589cb MFC 1.21: Implement interrupt routing for DEC_KN20AA. 2005-02-26 23:03:34 +00:00
Bernd Walter 576beeada5 MFC 1.278: Enable interrupt routing as first choice on alpha. 2005-02-26 23:02:48 +00:00
Bruce A. Mah 8365007bb2 MFC: ng_netflow(4), syslog(3) thread-safe, ports/INDEX not in CVS,
GNOME 2.8.3, KDE 3.3.2, Xorg 6.8.1.
2005-02-26 22:09:40 +00:00
Alan Cox 66ffcf10e8 MFC revision 1.299
Assert that the vm object is locked on entry to vm_page_sleep_if_busy();
 remove some unneeded code.
2005-02-26 20:39:24 +00:00
Alan Cox 49eb2db21c MFC revision 1.201
Continue the transition from synchronizing access to the page's PG_BUSY
 flag and busy field with the global page queues lock to synchronizing
 their access with the containing object's lock.  Specifically, acquire the
 containing object's lock before reading the page's PG_BUSY flag and busy
 field in vm_fault().
2005-02-26 20:23:20 +00:00
Nate Lawson 5338eb3799 MFC: quiet warning messages if sysctls not present, allow NONE flag. 2005-02-26 20:18:29 +00:00
Bruce A. Mah 8ef130829a MFC: Random ephemeral port allocation rate limiting, moused(8) -V,
syslogd logpriv socket, tail(1) -f.

Also added a note about backported libpthread bugfixes.  I wasn't sure
if this "made the bar" for HEAD release notes, so I just noted this
here in RELENG_5.  Might revisit this decision later.
2005-02-26 16:36:07 +00:00
Christian Brueffer 58930e1438 MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-26 13:44:05 +00:00
Christian Brueffer 64b3eec4c9 MFC: rev. 1.30 by ru
Formatting fixes.
2005-02-26 13:24:26 +00:00
Hajimu UMEMOTO a050c7b27c MFC 1.22, 1.23: teach IPv6 to `systat -netstat'. 2005-02-26 07:33:33 +00:00
Tom Rhodes c16bbbe2e1 MFC: 1.257, 1.258, and 1.259.
Add 'nocona' to the list of Intel ia64 CPUs and k8 to the AMD CPUs.

Replace -fmemoize-lookups -fsave-memoized with a working example,
-fconserve-space.  To quote part of the GCC docs on this option:

"Put uninitialized or runtime-initialized global variables into the
common segment, as C does."

MFC after:	2 days
Submitted by:	Daniel Gerzo <[email protected]> (original version)
2005-02-26 07:25:03 +00:00
Alan Cox 86a132f49d MFC revision 1.140
Eliminate an unnecessary call to vm_page_busy().

MFC revision 1.141
 Pass VM_ALLOC_NOBUSY to vm_page_grab() so that we don't have to call
 vm_page_flag_clear(PG_BUSY).  The object lock is held the entire time.
 Thus, whether or not the PG_BUSY flag is set is invisible to others.

MFC revision 1.145
 Acquire the source pmap's lock in pmap_copy().
2005-02-26 07:23:46 +00:00
Tom Rhodes 2169964d03 MFC 1.18:
Xref chflags(2).
Note that unlink.2 can return EPERM if the immutable or append-only flags are set.

PR:		77043
2005-02-26 06:08:07 +00:00
Tom Rhodes 83552c4924 Sync with CURRENT:
To be more complete, discuss 'make kernel' since we do cover buildkernel.
Xref config.8.
Bump doc date.

PR:		76064
Submitted by:	Gavin Atkinson <[email protected]> (original version)
Reviewed by:	keramida (follow-up in the PR)
2005-02-26 05:32:41 +00:00
Bruce A. Mah d10c5163a5 MFC: cpufreq(4) (partial merge), hptmv(4), matcd(4) gone, rm(1) -I. 2005-02-26 05:26:07 +00:00
Tom Rhodes c34a0648e9 MFC 1.12:
Fix a couple of grammar nits.

PR:		77437
Submitted by:	Paul A. Hoadley <[email protected]> (original version)
2005-02-26 05:16:55 +00:00
Tom Rhodes 12539f2126 MFC 1.32 1.33:
Note how cp(1) handles directories ending in "/"

PR:		75774
Submitted by:	Mike Meyer <[email protected]> (original version)
2005-02-26 04:58:47 +00:00
Tom Rhodes f288752ffb MFC 1.22 and 1.23
Add information on utilities which may or may not be aware of file flags.

PR:		55653
Submitted by:	Tony Maher <[email protected]> (original version)
2005-02-26 04:50:20 +00:00
Tom Rhodes 69b23a40df MFC 1.43 and 1.44:
Do not mislead users into checking for a mount_ufs or mount_ufs2 manual
page.  They do not exist.

PR:		53303
Submitted by:	Marc Silver <[email protected]> (original version)
2005-02-26 04:44:54 +00:00
Nate Lawson 8d72aa683d Hook up cpufreq man page. Noticed by: brueffer 2005-02-26 03:44:01 +00:00
David E. O'Brien f159645d87 MFC: rev 1.454 (show stray files) & rev 1.441/443 (CVSFLAGS). 2005-02-26 01:45:00 +00:00
Christian Brueffer 953bcfc70a MFC:
Autogenerate device listings for snd_sbc(4).
2005-02-26 01:38:42 +00:00
David E. O'Brien b42bcf2bbe MFC: rev 1.460: minor tweaks in "make update" comments. 2005-02-26 01:33:27 +00:00
David E. O'Brien fd611d7f6d MFC: revs. 1.451-453: Convert tools/lib32/build.sh into world connectable hooks. 2005-02-26 01:27:14 +00:00
Christian Brueffer 8d2fe55290 MFC: rev. 1.13
- move information about supported hardware into a HARDWARE section
- bump .Dd
2005-02-26 01:23:39 +00:00
Christian Brueffer 34a3c8c95a MFC: rev. 1.6
Sort the list of devices in the HARDWARE section.  Also move the section
below the DESCRIPTION section for consistency with the other manpages.
2005-02-26 01:22:48 +00:00
Christian Brueffer 7e5e7fd498 MFC: rev. 1.5 + 1.6
- make the hardware list look like that of other manpages
- fix typo
- Reword the HARDWARE section, so it can be used in the autogenerated
  hardware notes.
2005-02-26 01:21:58 +00:00
David E. O'Brien ebb0b82974 MFC: Allow a forced dump even if the dump header information is inconsistent.
Output more verbosity with additional -v's.
     style(9).
2005-02-26 01:21:50 +00:00
Alan Cox d12c49bebc MFC revision 1.155
Synchronize access to the vm page's PG_BUSY flag using the containing vm
 object's lock.  In the same place, eliminate unnecessary checks for a NULL
 vm object pointer.

MFC revision 1.161
 Eliminate (now) unnecessary acquisition and release of the global page
 queues lock.
2005-02-26 00:00:14 +00:00
Alan Cox 42721de2c3 MFC revision 1.135
Note that access to the page's busy count is synchronized by the
 containing object's lock.
2005-02-25 23:43:00 +00:00
Alan Cox 1fab092fc0 MFC revision 1.292
Assert that the containing object is locked in vm_page_io_start() and
 vm_page_io_finish().

MFC revision 1.295
 Assert that the containing vm object is locked in vm_page_busy() and
 vm_page_wakeup().

MFC revision 1.296
 Assert that the containing vm object is locked in vm_page_flash().

MFC revision 1.297
 Assert that the containing vm object is locked in vm_page_cache() and
 vm_page_try_to_cache().

MFC revision 1.300
 Access to the page's busy field is (now) synchronized by the containing
 object's lock.  Therefore, the assertion that the page queues lock is held
 can be removed from vm_page_io_start().
2005-02-25 23:38:22 +00:00
Scott Long 4ad4ef316b MFC bus_dmamap_load_mbuf_sg() for sparc64 2005-02-25 22:59:31 +00:00
Nate Lawson 9f37e72282 MFC: Note addition of cpufreq framework although only the acpi_throttle
driver has been added.
2005-02-25 21:47:13 +00:00
Nate Lawson 5f31d41ed8 MFC: power_profile changes for cpufreq 2005-02-25 21:46:27 +00:00
Nate Lawson 8335e3b790 MFC: Hook cpufreq up to the build as well as the acpi_throttle driver. 2005-02-25 21:45:55 +00:00
Nate Lawson a676cc4139 MFC: Bring in the cpufreq framework and update the acpi manpage. 2005-02-25 21:45:14 +00:00
Nate Lawson 9467a8dee0 MFC: Update legacy cpu attachments for cpufreq 2005-02-25 21:44:14 +00:00
Nate Lawson b94765b92b MFC: Bring acpi up to -current except for the PCI link changes and add
the acpi_throttle cpufreq driver.
2005-02-25 21:43:38 +00:00
Nate Lawson d0e52779b1 MFC: cpu.h header and cpu_est_clockrate() functions for each arch. 2005-02-25 21:17:22 +00:00
Nate Lawson 0651b9026f MFC: Allow device_find_child() to find any child with the given class. 2005-02-25 20:25:36 +00:00
Alan Cox 0cf65e6926 MFC revision 1.202
Modify the vm object locking in do_sendfile() so that the containing object
 is locked when vm_page_io_finish() is called on a page.

MFC revision 1.203
 Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().

MFC revision 1.205
 Eliminate unnecessary calls to vm_page_busy().
2005-02-25 18:03:49 +00:00
Robert Watson 1393b3a639 Merge kern_event.c:1.88 from HEAD to RELENG_5:
When invoking callout_init(), spell '1' as "CALLOUT_MPSAFE".
2005-02-25 18:01:00 +00:00
Robert Watson 54db8e0e87 Merge udf.h:1.10 and udp_vfsops.c:1.27 from HEAD to RELENG_5:
Remove basically unused root_vp pointer in udfmount.

  Discussed with: scottl
2005-02-25 17:59:45 +00:00
Robert Watson f07457526f Merge ddp_usrreq.c:1.45 from HEAD to RELENG_5:
Run the netatalk netisrs without Giant.
2005-02-25 17:58:22 +00:00
Robert Watson a0511395a0 Merge uipc_socket.c:1.232 from HEAD to RELENG_5:
In soreceive(), when considering delivery to a socket in SS_ISCONFIRMING,
  only call the protocol's pru_rcvd() if the protocol has the flag
  PR_WANTRCVD set.  This brings that instance of pru_rcvd() into line with
  the rest, which do check the flag.
2005-02-25 17:57:30 +00:00
Robert Watson d9dfff9e95 Merge uipc_accf.c:1.15 from HEAD to RELENG_5:
Re-style do_setopt_accept_filter() to match uipc_accf.c style, and fix
  one other style nit in the file.
2005-02-25 17:55:44 +00:00
Robert Watson 92cfe2e8f4 Merge uipc_aaccf.c:1.14, uipc_socket.c:1.229, and socketvar.h:1.138 from
HEAD to RELENG_5:

  Move do_setopt_accept_filter() from uipc_socket.c to uipc_accf.c, where
  the rest of the accept filter code currently lives.
2005-02-25 17:55:05 +00:00
Nate Lawson 6a946448e9 MFC: notes for ACPI clock 2005-02-25 17:52:46 +00:00
Robert Watson 78c19cb556 Merge uipc_socket.c:1.227 from HEAD to RELENG_5:
date: 2005/02/18 00:52:17;  author: rwatson;  state: Exp;  lines: +4 -6
  In solisten(), unconditionally set the SO_ACCEPTCONN option in
  so->so_options when solisten() will succeed, rather than setting it
  conditionally based on there not being queued sockets in the completed
  socket queue.  Otherwise, if the protocol exposes new sockets via the
  completed queue before solisten() completes, the listen() system call
  will succeed, but the socket and protocol state will be out of sync.
  For TCP, this didn't happen in practice, as the TCP code will panic if
  a new connection comes in after the tcpcb has been transitioned to a
  listening state but the socket doesn't have SO_ACCEPTCONN set.

  This is historical behavior resulting from bitrot since 4.3BSD, in which
  that line of code was associated with the conditional NULL'ing of the
  connection queue pointers (one-time initialization to be performed
  during the transition to a listening socket), which are now initialized
  separately.

  Discussed with: fenner, gnn
2005-02-25 17:52:12 +00:00
Robert Watson a849f8b7cb Merge atm_proto.c:1.13 and natm_proto.c:1.15 from HEAD to RELENG_5:
Mark netatm and netnatm explicitly as requiring Giant, as they still do.
2005-02-25 17:50:31 +00:00
Robert Watson 5ca0b8cd83 Merge Makefile:1.3 from HEAD to RELENG_5:
date: 2005/02/12 20:04:23;  author: rwatson;  state: Exp;  lines: +1 -1
  Also build the netblast sub-directory, not just netreceive and netsend.
2005-02-25 17:47:31 +00:00
Robert Watson b62e4d2275 Merge netblast, a high speed UDP packet blaster, from HEAD to RELENG_5;
this was not merged with the other earlier parts of netrate previously.
Bring both netblast.c and Makefile to revisions 1.2, ommitting only the
change to NO_MAN present in HEAD:

  date: 2004/10/08 19:23:11;  author: rwatson;  state: Exp;
  Add a version of netsend that uses the interval timer rather than
  explicit clock reads to set an overall duration to the send, and
  blasts rather than trying to clock output.  The goal of netblast,
  unlike netsend, is to send as many UDP packets as possible; the
  cost is that there's no ability to control the rate, and there's
  less accuracy in the timing as the interval timer granularity is
  relatively low.

  revision 1.2
  date: 2005/02/12 20:03:30;  author: rwatson;  state: Exp;  lines: +1 -1
  Mark the signum argument to signal_handler() as __unused.
2005-02-25 17:46:49 +00:00
Alan Cox 3dc413aa7d MFC revision 1.48
Improve readability with a bunch of typedefs for the pager ops.
2005-02-25 17:26:33 +00:00
Gleb Smirnoff 8b8af1c134 MFC 1.29:
Cancelling the callout on shutdown, and move part responsible for freeing
  a node resources from ng_bridge_timer() to ng_bridge_shutdown().

  (see detailed log in original commit)

  Noticed by:     ru
  Submitted by:   glebius, ru
2005-02-25 17:17:27 +00:00
Marius Strobl 342d8cbb03 Back out work-arounds added in rev. 1.59 for building SBus-only kernels
regarding ofw_machdep.c which are no longer necessary since rev. 1.13
and rev. 1.12.2.1 of ofw_machdep.c respectively.
2005-02-25 16:37:32 +00:00
Marius Strobl 57bbe71b9e MFC: 1.13 (partial)
Re-write OF_decode_addr() with a bus-neutral approach, adding support
for nodes hanging off of Central, FireHose and PCI busses.
Meanwhile, i.e. after rev. 1.13 was committed to HEAD, this was also
confirmed to actually work for devices on FireHose which implies that
it also works for devices on Central.

Tested by:	hrs, kris (FireHose)
2005-02-25 16:27:03 +00:00
Marius Strobl bd9e1a5492 MFC: 1.15
UltraSparc II[e,i] based systems come up with the tick interrupt
enabled and a handler that resets the tick counter, causing DELAY()
to not work properly when used early in boot.
Disable the tick interrupt in tick_init(), which is called early in
sparc64_init(), until the interrupt is enabled again in tick_start(),
called by cpu_initclocks(), with our own handler. This fixes the hang
during probing Sun keyboards on AXi boards and Ultra 10, with other
machines like Ultra 5 probably being affected but not tested.
2005-02-25 16:15:54 +00:00
Marius Strobl 81b8765d48 MFC: 1.17, 1.18
Some changes related to reading the MAC-address from the VPD on systems
without Open Firmware:
- Remove the checks for matching class code and PCI data structure length
  and revsion, some HME PROMs vary here and we don't need that info anyway.
- On Sun QFE (Quad FastEthernet) cards read the Nth MAC-address for the
  Nth HME controller instead of always the first one for all four HMEs.
- Improve the comment describing the used VPD format to better reflect
  reality.
- Minor clean-up.
2005-02-25 16:06:14 +00:00
Bruce A. Mah e0e6089912 MFC: libarchive/bsdtar ISO/ZIP support. 2005-02-25 15:46:48 +00:00
Robert Watson 9aacef9c3d Merge spx_usrreq.c:1.60 from HEAD to RELENG_5:
Clean up return handling for a number of SPX-related routines that
  were derived from more complex TCP versions of the same:

  - spx_close(), spx_disconnect(), spx_drop(), and spx_usrclosed() all
    always free's the spxpcb invalidating the argument, so a return
    value is not required to indicate if it has.
  - Annotate that the cb arguments to each of these functions is
    invalidated via a comment.
  - When tearing down a pcb due to sonewconn() having failed, mark the
    cb as NULL; later, when deciding whether to store trace information
    due to SO_DEBUG, check that cb is not NULL before dereferencing or
    a NULL pointer dereference may occur.
2005-02-25 13:37:38 +00:00
Robert Watson cd9f070897 Merge spx_usrreq.c:1.58 from HEAD to RELENG_5:
Acquire the socket buffer receive lock in spx_rcvoob() to permit
  multiple reads of receive buffer state to be performed atomically.
2005-02-25 13:33:32 +00:00
Robert Watson 90ad40fa36 Merge spx_usrreq.c:1.57 from HEAD to RELENG_5:
Increase the coverage scope of the receive socket buffer lock in
  spx_reass() to increase atomicity across multiple operations on the
  socket buffer when iterating over the SPX fragment reassembly list
  for the ipxpcb, as well a to reduce the number of locking operations.
2005-02-25 13:32:56 +00:00
Robert Watson 34ca6390a3 Merge spx_usrreq.c:1.56 from HEAD to RELENG_5:
Explicitly lock the send socket buffer in spx_reass() to cover the drop
  record loop for ACK'd data, rather than relying on lokcing in
  sbdroprecord() and sowwakeup(), reducing the number of lock operations
  as well as eliminating a possible race against the head of the send
  buffer mbuf chain.  Use the _locked variants of sbdroprecord() and
  sowwakeup().
2005-02-25 13:32:24 +00:00
Robert Watson 82823fcf43 Merge ipx_usrreq.c:1.48 from HEAD to RELENG_5:
Restructure ipx_input() return code to match similar code in netinet,
  avoiding a goto.
2005-02-25 13:30:28 +00:00
Robert Watson 103f5e8e99 Merge ipx_pcb.c:1.39, ipx_usrreq.c:1.47 from HEAD to RELENG_5:
Eliminate XXX comments regarding allocation failures when retrieving
  the peer address by using M_WAITOK in ipx_setpeeraddr() to prevent
  allocation failure.  The socket reference used to reach these calls
  will prevent the ipxpcb from being released prematurely.
2005-02-25 13:29:50 +00:00
Robert Watson 3516d89e54 Merge ipx_usrreq.c:1.46, spx_usrreq.c:1.55 from HEAD to RELENG_5:
Use KASSERT() in preference to if() panic().
2005-02-25 13:28:52 +00:00
Robert Watson c3b34e6190 Merge ipx_pcb.h:1.21 from HEAD to RELENG_5:
Extern declaration of old 'ipxpcb' list head no longer required.
2005-02-25 13:27:53 +00:00
Robert Watson f640bc44ff Merge ipx.c:1.28, ipx_cksum.c:1.12, ipx_input.c:1.41, ipx_ip.c:1.38,
ipx_pcb.c:1.38, ipx_proto.c:1.18, ipx_usrreq.c:1.45, spx_usrreq.c:1.54
from HEAD to RELENG_5:

  Trim trailing whitespace.
2005-02-25 13:26:39 +00:00
Robert Watson 8054e37f42 Merge spx_usrreq.c:1.53 from HEAD to RELENG_5:
Improve handling of SPX session timeout, specifically, make sure to
  properly handle the case where a connection is disconnected.  The
  queue(9)-enabled version of this code broke from the inner but not
  outer loop, and so potentially frobbed an ipxpcb flag after the ipxpcb
  was free'd, which might be picked up later by the malloc debugging
  code.  Properly break from the loop context and avoid touching the
  cb/ipxpcb after free.
2005-02-25 13:23:00 +00:00
Robert Watson 7a20f4efd5 Merge spx_usrreq.c:1.52 from HEAD to RELENG_5:
Compare and assign pointers with NULL in preference to 0.
2005-02-25 13:22:24 +00:00
Robert Watson 5f10bc278c Merge spx_usrreq.c:1.51 from HEAD to RELENG_5:
Don't cast NULL on return or when passing to another function.

  Extend the annotation as to why spx_close() isn't called in spx_reass(),
  and mark this code more clearly as broken.
2005-02-25 13:21:48 +00:00
Robert Watson 0e8ce17c88 Merge ipx_input.c:1.40, ipx_ip.c:1.37, ipx_outputfl.c:1.20, ipx_pcb.c:1.35
from HEAD to RELENG_5:

  Prefer rtalloc_ign() API to rtalloc() API.
2005-02-25 13:20:42 +00:00
Robert Watson acde7e5fa6 Merge ipx_input.c:1.39, ipx_pcb.c:1.34 from HEAD to RELENG_5:
Move the definition of ipxpcb_lport_cache from ipx_input.c to ipx_pcb.c,
  the only source file where it is actually used.
2005-02-25 13:17:04 +00:00
Robert Watson d0bc44e7cb Merge ipx_input.c:1.37, ipx_pcb.c:1.32, and ipx_var.h:1.20 from HEAD to
RELENG_5:

  Use a global variable, ipxpcb_lport_cache, to cache the most recently
  used IPX port number, rather than using the global ipxpcb list head.

  Add 'struct ipxpcb' forward declaration to ipx_var.h.  I had this in
  the netperf branch but for some reason didn't trigger a build failure
  locally when I merged to CVS and omitted it.  Presumably driver error.

  Pointed out by: cperciva, tinderbox
2005-02-25 13:14:47 +00:00
Robert Watson 3db07840b9 Merge ipx.c:1.21-1.23 from HEAD to RELENG_5:
date: 2004/12/31 00:32:50;  author: rwatson;  state: Exp;  lines: +23 -3
  Update netstat(1) for recent conversion of netipx to queue(9) from
  home-brew linked lists.  Read in the ipxpcb_list structure first in
  order to find the first pcb pointer.  Then follow the chain as
  before, only the termination condition is a NULL next pointer
  rather than a next pointer equal to the original offset.

  date: 2004/12/31 12:04:21;  author: rwatson;  state: Exp;  lines: +14 -34
  Apply a simplifying patch submitted by rik to the IPX support in
  netstat(1):

  - Make previously unnecessarily global variables local.
  - Use LIST_FOREACH() in preference to manual iteration.
  - Restore a sanity check through slightly incestuous use of queue macro
    knowledge.

  Submitted by:   rik

  date: 2005/01/02 19:26:06;  author: rwatson;  state: Exp;  lines: +5 -11
  Revise use of queue(9) macros for netipx when used from userspace:
  LIST_FOREACH() is difficult to use correctly, so don't try to.
2005-02-25 13:13:11 +00:00
Robert Watson 31b5d2d884 Merge ipx_input.c:1.36, ipx_pcb.c:1.31, ipx_pcb.h:1.20, ipx_usrreq.c:1.43,
ipx_var.h:1.19, spx_usrreq.c:1.49 from HEAD to RELENG_5:

  Convert netipx to use queue(9) doubly-linked lists instead of home-brew
  linked lists for ipxpcb's.
2005-02-25 13:12:27 +00:00
cvs2svn c417085098 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-02-25 10:38:44 +00:00
Scott Long c1f4a77f7b MFC: Convert the em driver to the faster bus_dmamap_load_mbuf_sg() interface. 2005-02-25 08:32:37 +00:00
Scott Long 3d541bfb28 MFC bus_dmamap_load_mbuf_sg() for sparc64 2005-02-25 08:29:58 +00:00
Scott Long df2a8596af MFC bus_dmamap_load_mbuf_sg() for amd64 2005-02-25 08:25:52 +00:00
Scott Long aa117e0b8f MFC bus_dmamap_load_mbuf_sg() for alpha. 2005-02-25 08:22:17 +00:00
Scott Long 8b9bf73dce MFC bus_dmamap_load_mbuf_sg() for ia64 2005-02-25 08:16:55 +00:00
Scott Long 660143981e MFC: bus_dmamap_load_mbuf_sg() for i386 2005-02-25 08:14:02 +00:00
Pyun YongHyeon 92d4b34979 MFC: pf_if.c, rev. 1.8
Fix inteface clear time. pf printed "Thu Jan  1 09:00:01 1970"
  in "pfctl -vvsI" output when pf was statically linked to kernel.

  Discussed with: mlaier
2005-02-25 06:48:58 +00:00
Tim Kientzle 5260cc93ad MFC: Sync bsdtar with -CURRENT.
This brings a number of portability enhancements and documentation
improvements to 5-STABLE.
2005-02-25 05:14:43 +00:00
Tim Kientzle fae62f4482 MFC: Sync libarchive with -CURRENT.
This brings a number of new features (iso9660 and ZIP support),
some important bug fixes and a number of documentation enhancements.

All in time for 5.4. ;-)
2005-02-25 05:10:23 +00:00
Bruce A. Mah f271622191 Bump release documentation version number to 5.4-PRERELEASE.
Inspired by:	src/sys/conf/newvers.sh rev. 1.62.2.18
2005-02-24 17:20:27 +00:00
Max Laier 0be799749b MFC: dp83932.c, rev. 1.17
Only send packet to bpf if we are committed to send it.  Previously it was
  possible that the same packet would show up multiple times.  This poses some
  constraints on the TBD locking for snc(4) (see comment).

  Obtained from:	DragonFlyBSD
  Submitted by:		Joerg Sonnenberger
  Reviewed by:		rwatson
2005-02-24 15:58:37 +00:00
Max Laier 87e275c5f9 MFC: pf_if.c, rev. 1.9
Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall"
  with renamed interfaces.

  PR:             kern/77645
  Reported by:    Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
  Reviewed by:    yongari
2005-02-24 15:29:16 +00:00
Robert Watson 967eceeb0e Merge uipc_usrreq.c:1.150 from HEAD to RELENG_5:
date: 2005/02/21 14:21:50;  author: rwatson;  state: Exp;  lines: +3 -1
  When aborting a UNIX domain socket bind() because VOP_CREATE() failed,
  make sure to call vn_finished_write(mp) before returning.
2005-02-24 09:56:46 +00:00
Alan Cox 70054fa4bd MFC revision 1.205
Correct a sanity check in vnode_pager_generic_putpages().  The cast used
 to implement the sanity check should have been changed when we converted
 the implementation of vm_pindex_t from 32 to 64 bits.  (Thus, RELENG_4 is
 not affected.)  The consequence of this error would be a legimate write to
 an extremely large file being treated as an errant attempt to write meta-
 data.

MFC revision 1.207
 fix comment
2005-02-24 07:39:42 +00:00
Tom Rhodes 414b4eda39 MFC 1.49:
Add a HISTORY section.

PR:	75282
2005-02-24 06:06:58 +00:00
Tom Rhodes c2bfd6fa78 MFC: 1.18
Add an EXAMPLES section[1], quote Nd, and bump doc date.

PR:		53621 [1]
Submitted by:	Faried Nawaz <[email protected]> [1]
2005-02-24 05:10:57 +00:00
Tom Rhodes e6febcde98 MFC: Add IOGEAR GUF320
PR:	73825
2005-02-24 04:34:58 +00:00
Ken Smith 4ddc65256d We're 1 week away from the code freeze for 5.4. Bump us to 5.4-PRERELEASE
so people know it's coming and RELENG_5 might be a bit less stable than
normal due to increased activity.
2005-02-24 01:58:51 +00:00
Alan Cox 22a0b3dd13 MFH revision 1.100
style polishing.

MFH revision 1.104
 Make npages static and const.
2005-02-23 23:36:55 +00:00
Alan Cox 18898c386c MFC
Move a call to wakeup() from vm_object_terminate() to
 vnode_pager_dealloc() because this call is only needed to wake threads
 that slept when they discovered a dead object connected to a vnode.  To
 eliminate unnecessary calls to wakeup() by vnode_pager_dealloc(),
 introduce a new flag, OBJ_DISCONNECTWNT.
2005-02-23 23:06:30 +00:00
Tom Rhodes 0f1ef23516 MFC 1.50:
Note that debug.acpi.disabled can also disable the video.

PR:			77693
Tested/submitted by:	John Prather <[email protected]>
MFC:			1 day
2005-02-23 22:48:17 +00:00
Hiroki Sato b88c5a3cee MFC:
debug.mpsafevm enabled on alpha, amd64, and i386,
	32MB memory allocation for legacy PCI bridges, and
	IPv6 MTU feedback disabled.
2005-02-23 18:33:57 +00:00
Alan Cox d13966c2cf MFC revision 1.79
Enable debug.mpsafevm by default on alpha.
2005-02-23 17:33:22 +00:00
Alan Cox 213e496053 MFC revisions 1.333 and 1.334
Eliminate unnecessary calls to vm_page_busy().

MFC revision 1.340
 Move the acquisition and release of the page queues lock outside of a loop
 in vm_object_split() to avoid repeated acquisition and release.

MFC revision 1.343
 Consider three objects, O, BO, and BBO, where BO is O's backing object
 and BBO is BO's backing object.  Now, suppose that O and BO are being
 collapsed.  Furthermore, suppose that BO has been marked dead
 (OBJ_DEAD) by vm_object_backing_scan() and that either
 vm_object_backing_scan() has been forced to sleep due to encountering
 a busy page or vm_object_collapse() has been forced to sleep due to
 memory allocation in the swap pager.  If vm_object_deallocate() is
 then called on BBO and BO is BBO's only shadow object,
 vm_object_deallocate() will collapse BO and BBO.  In doing so, it adds
 a necessary temporary reference to BO.  If this collapse also sleeps
 and the prior collapse resumes first, the temporary reference will
 cause vm_object_collapse to panic with the message "backing_object %p
 was somehow re-referenced during collapse!"

 Resolve this race by changing vm_object_deallocate() such that it
 doesn't collapse BO and BBO if BO is marked dead.  Once O and BO are
 collapsed, vm_object_collapse() will attempt to collapse O and BBO.
 So, vm_object_deallocate() on BBO need do nothing.

MFC revision 1.345
 Update the text of an assertion to reflect changes made in revision 1.148.

 Eliminate an unnecessary, temporary increment of the backing object's
 reference count in vm_object_qcollapse().
2005-02-23 16:45:12 +00:00
Bill Paul 53b91fdb99 Sync with -current. 2005-02-23 16:31:47 +00:00
Suleiman Souhlal 4d12998f57 MFC of r1.34 (Fri Feb 4 06:18:31 2005 UTC)
+ small required hack for RELENG_5, setting kg_user_pri = PRI_MAX_IDLE:

  Set the scheduling class of the zeroidle thread to PRI_IDLE.

Reviewed by:	jhb
Approved by:	grehan (mentor)
2005-02-23 15:03:56 +00:00
Suleiman Souhlal 4b0a09b340 MFC of r1.42 (Fri Feb 4 06:16:05 2005 UTC) + small required hack for RELENG_5, setting kg_user_pri = PRI_MAX_IDLE:
Set the scheduling class of the idle threads to PRI_IDLE.
  While there, set their priority with sched_prio() instead of changing it
  'by hand'.

  Reviewed by:    jhb
  Approved by:    grehan (mentor)

Reviewed by:	jhb
Approved by:	grehan (mentor)
2005-02-23 14:52:49 +00:00
Dag-Erling Smørgrav 43f717d7ed MFC: (1.50) stop leaking connection buffers. 2005-02-23 09:47:35 +00:00
Tom Rhodes eae6a4ccb8 Update list of utilitys which are implemented externally, Xref info.1,
clean up some text, bump doc date.

PR:		47690
Submitted by:	Gary W. Swearingen <[email protected]> (original version)
2005-02-23 07:11:42 +00:00
Alan Cox eeed9b1453 MFC revision 1.365
Add checks to vm_map_findspace() to test for address wrap.  The conditions
 where this could occur are very rare, but possible.
2005-02-23 06:52:56 +00:00
Alan Cox 859bf9eb38 MFC revision 1.239
Correctly move the packet header in ip_insertoptions().
2005-02-23 06:47:28 +00:00
Alan Cox cd22d021eb MFC revision 1.210
Guard against address wrap in kernacc().  Otherwise, a program accessing a
 bad address range through /dev/kmem can panic the machine.
2005-02-23 06:41:44 +00:00
Tom Rhodes 1d4860ee9f Add better mdoc(7) mark up, clean up wording, better describe the effects
of some arguments.

PR:				47705
Based on a patch submitted by:	Gary W. Swearingen <[email protected]>
Glanced at by:			simon
MFC:				1 day
2005-02-23 06:17:56 +00:00
Alan Cox aa92c7bb2c MFC revision 1.121
Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().
2005-02-23 05:54:52 +00:00
Tom Rhodes 205d748966 MFC 1.27:
They key combinations for Left window and Right window seem reversed, fix.

PR:	48767
2005-02-23 04:31:09 +00:00
Tom Rhodes 22bba4f21c MFC 1.11:
Use .Xr in place of .I for Xref's.

PR:		71730
Submitted by:	Gavin Atkinson <[email protected]> (original patch)
Commit ok:	mbr (through GNATS PR)
2005-02-23 01:45:24 +00:00
Tom Rhodes cadaabf8e9 MFC 1.28:
Reword a sentence to conform with our mdoc(7) style.
Modify wording in a sentence to avoid a run on within ().
Remove a contraction.

Submitted by:	Joel Dahl <[email protected]> (original version)
2005-02-23 01:33:12 +00:00
Robert Watson 2ca0862807 Merge uipc_usrreq.c:1.149 from HEAD to RELENG_5:
date: 2005/02/20 23:22:13;  author: rwatson;  state: Exp;  lines: +30 -59
  style(9)-ize function headers, remove use of 'register'.
2005-02-23 00:42:13 +00:00
Robert Watson d281fa7f23 Merge uipc_usrreq.c:1.148 from HEAD to RELENG_5:
date: 2005/02/20 20:05:11;  author: rwatson;  state: Exp;  lines: +2 -3
  In unp_attach(), allow uma_zalloc to zero the new unpcb rather than
  explicitly using bzero().

  Update copyright.
2005-02-23 00:40:31 +00:00
Robert Watson 0feb4b0a2b Merge uipc_socket2.c:1.143 from HEAD to RELENG_5:
date: 2005/02/20 15:56:13;  author: rwatson;  state: Exp;  lines: +3 -3
  Prefer NULL to returning 0 cast to a pointer type.
2005-02-23 00:39:17 +00:00
Robert Watson 4ad72418d8 Merge uipc_usrreq.c:1.147 from HEAD to RELENG_5:
date: 2005/02/20 04:18:22;  author: rwatson;  state: Exp;  lines: +1 -1
  Move assignment of UNIX domain socket pcb during unp_attach() outside
  of the global UNIX domain socket mutex: no protection is needed that
  early in the setup of the UNIX domain socket and socket structures.
2005-02-23 00:37:50 +00:00
Paul Saab 9e57862631 MFC:
Fix an overflow when calculating the number of kilobytes from the
number of pages.
2005-02-22 16:35:48 +00:00
Colin Percival de361e741d MFC revision 1.46 of sys/kern/kern_jail.c, revision 1.24 of
sys/sys/jail.h, 1.264 of sys/ufs/ufs/ufs_vnops.c, and revision 1.61 of
usr.sbin/jail/jail.8:

  Add a new sysctl, "security.jail.chflags_allowed", which controls the
  behaviour of chflags within a jail. [...]

The default behaviour (security.jail.chflags_allowed = 0) is unchanged.
2005-02-22 15:49:23 +00:00
Yoshihiro Takahashi 5ab495c4ca Merged from sys/dev/sio/sio.c revision 1.450.2.1. 2005-02-22 14:55:51 +00:00
Giorgos Keramidas 0d9b3cb96f MFC 1.21, 1.22, 1.23:
- Sort sections, sort options, better xrefs, informative BUGS section
- Various mdoc fixes.
2005-02-22 13:55:14 +00:00
Giorgos Keramidas b4e4a5abea MFC rc.conf 1.236, periodic.conf 1.33:
Add a note about their respective manpages to rc.conf and periodic.conf
2005-02-22 13:17:18 +00:00
Giorgos Keramidas a0a9879d39 MFC 1.23-1.26:
- Clarify a bit the BUGS section
- Quote example file names consistently
- Various fixes (contractions, grammar, etc)
2005-02-22 13:09:13 +00:00
Robert Watson 742d0da81a Add symlink to timeout.9 from callout.9 in RELENG_5. This change is
present in HEAD, but as part of a larger change to the callout API
that isn't merged here.
2005-02-22 11:37:04 +00:00
Xin LI 8ab4c96bba Sync ps(1) in RELENG_5 with HEAD:
MFC ps.1 revision 1.84
date: 2005/02/14 16:56:15;  author: delphij;  state: Exp;  lines: +22 -10
Several improvements to ps.1:
	- Document the fact that empty heading text suppresses the
	  heading line (e.g. 'ps -o pid='), as this is very useful
	  in scripts.
	- Describe logname keyword more completely.
	- Describe the printing of arguments more completely.
	- Put lockname in the correct alphabetical order in the list
	  of all keywords.
	- Correct sentence in standards section.

Submitted by:	Jilles Tjoelker <jilles at stack nl>
PR:		docs/73618
MFC After:	1 week

MFC ps.1 revision 1.83, ps.c revision 1.110
date: 2005/02/09 17:37:38;  author: ru;  state: Exp;  lines: +2 -3
Sync program's usage() with manpage's SYNOPSIS.

MFC Makefile revision 1.27
date: 2005/01/27 13:42:40;  author: delphij;  state: Exp;  lines: +1 -1
ps(1) is WARNS=6 on all Tier-1 platforms as far as I can test,
so use default WARNS level from bin/Makefile.inc

MFC ps.1 revision 1.82
date: 2005/01/10 08:39:24;  author: imp;  state: Exp;  lines: +1 -0
/*- or .\"- or #- to begin license clauses.

MFC Makefile revision 1.26
date: 2004/11/13 17:12:22;  author: ru;  state: Exp;  lines: +0 -2
Removed bitrot.

Discussed with:	ru
2005-02-22 06:50:54 +00:00
Xin LI 0924641b29 MFC revision 1.29
date: 2005/02/15 10:23:01;  author: delphij;  state: Exp;  lines: +1 -1
Be more careful when doing el_parse() - only do it when el is
properly initialized, that happens when lpc is called from a tty.
Without this change, it's possible to get SIGSEGV simply doing:
	echo "..:" | lpc

Reported by:	Wojciech A. Koszek <dunstan at freebsd czest pl>
PR:		77462 (patch rewritten by myself)
MFC After:	1 week
2005-02-22 02:54:36 +00:00
Xin LI 31bc4ff55b MFC revision 1.16
date: 2005/02/14 14:09:21;  author: delphij;  state: Exp;  lines: +4 -2
Fix parsing of '0' and non-alphanumerics in steps.  Previously, an
entry having stepping value of zero can cause crontab to hang there,
and if the main crontab is being changed in this way, then cron(8)
will keep spining.

Obtained from:	OpenBSD [src/usr.sbin/cron/entry.c,v 1.17]
PR:		68683 (my own, but forgot to commit it...)
MFC After:	1 week
2005-02-22 02:48:20 +00:00
Bruce A. Mah 9f78cb845d MFC from rev. 1.793: auxio(4), rtc, uart(4) default tty driver for
sparc64, snd_audiocs(4), cp(4)/ctau(4)/cx(4) MPSAFE, em(4) hardware
VLAN support disabled by default, fxp(4) flow control disabled
by default, sppp(4) FR support.
2005-02-22 00:31:14 +00:00
Garrett Wollman e48325f0b3 MFC r1.3: Support correct programming environment name for amd64. 2005-02-21 23:50:43 +00:00
Bruce A. Mah f89d19047d MFC from rev. 1.792: SA-04:16.fetch, SA-04:17.procfs, EN-05:01.nfs,
EN-05:02.sk, EN-05:03.ipi.
2005-02-21 20:57:32 +00:00
Bruce A. Mah 42ee7da2ee MFC: hme(4) MPSAFE, cd9660 mounts less chatty. 2005-02-21 20:20:23 +00:00
Robert Watson 9d8aea8250 Merge uipc_socket.c:1.231 from HEAD to RELENG_5:
date: 2005/02/18 19:15:22;  author: rwatson;  state: Exp;  lines: +1 -1
  Correct a typo in the comment describing soreceive_rcvoob().
2005-02-21 12:34:32 +00:00
Robert Watson a89a17fddb Merge uipc_accf.c:1.13 from HEAD to RELENG_5:
date: 2005/02/18 18:49:44;  author: rwatson;  state: Exp;  lines: +9 -9
  Minor style tweaks: line wrap comments and lines more consistently.
2005-02-21 12:31:38 +00:00
Robert Watson 71aa166988 Merge uipc_socket.c:1.228 from HEAD to RELENG_5:
date: 2005/02/18 18:43:33;  author: rwatson;  state: Exp;  lines: +3 -3
  Re-order checks in socheckuid() so that we check all deny cases before
  returning accept.
2005-02-21 10:59:29 +00:00
Robert Watson 1be1aab8d6 Merge cd9660_vfsops.c:1.134 from HEAD to RELENG_5:
date: 2005/02/18 10:49:55;  author: rwatson;  state: Exp;  lines: +7 -3
  Conditionalize cd9660 chattiness regarding the nature of the file system
  mounted (is it Joliet, RockRidge, High Sierra) based on bootverbose.
  Most file systems don't generate log messages based on details of the
  file system superblock, and these log messages disrupt sysinstall output
  during a new install from CD.  We may want to explore exposing this
  status information using nmount() at some point.
2005-02-21 10:58:07 +00:00
Robert Watson 69bb20bcc0 Merge icmp6.c:1.56-1.57 from HEAD to RELENG_5:
date: 2005/02/08 22:16:26;  author: rwatson;  state: Exp;  lines: +13 -5
  Lock raw IP socket pcb list and PCBs when processing input via
  icmp6_rip6_input().

  Reviewed by:    gnn

  date: 2005/02/09 01:12:43;  author: rwatson;  state: Exp;  lines: +1 -0
  Add missed merge of ripcbinfo extern.  Given how widely used
  ripcbinfo is, we should probably add it to an include file.

  Spotted by:     mux
2005-02-21 10:55:56 +00:00
Pyun YongHyeon 2fc2174f58 MFC rev. 1.35
Fix "Duplicate mbuf free panic".
  Though this fix is not enough to eliminate DMA engine freeze it's
  better than panic.

  Reported by:    jhb via sparc64 ML
2005-02-21 07:41:12 +00:00
Pyun YongHyeon 328b3de03f MFC MPSAFE hme(4)
- Let hme_start()/hme_init() acquire lock and then call
     hme_start_locked()/hme_init_locked() respectivly.
   - Teardown interrupt handler before hme_detach().
   - Remove IFF_NEEDSGIANT flag and mark interrupt handler INTR_MPSAFE.
   - Set callout handler to CALLOUT_MPSAFE.
   - Add locks in hme MII interface.

  Reviewed by:    jake
  Tested by:      Julian C. Dunn  <jdunn at opentrend dot net>
2005-02-21 07:28:19 +00:00
Bruce A. Mah 4e063c9965 MFC of some changes from rev. 1.789: ACPI-CA 20041119.
Grrr.  Relocate netcat and tzdata notes to the correct section.  Maybe
having two different "contrib" sections wasn't such a great idea, or
maybe I'm still trying to re-learn my way around this document.
2005-02-20 22:24:52 +00:00
Paul Saab 92dd26a3ca MFC: complete the nanosleep 32bit syscall merge. 2005-02-20 14:58:42 +00:00
Paul Saab 39d4abac79 MFC: Add 32bit compat syscall for nanosleep and MFC the 32bit compat
syscall for modstat.
2005-02-20 14:43:45 +00:00
Bruce A. Mah 08428ab0d5 How come I always find these things right after committing? Get rid of
a couple of instances of &merged; that I'd forgotten to remove.
2005-02-20 07:30:35 +00:00
Bruce A. Mah 43a38ee1ff MFC selected parts of rev. 1.788: ULE bugfixes, NDISulator supports
x86-64 binaries, sk(4) supports ALTQ and jumbo frames on Yukons, add
cross-reference to nc(1) in netcat item, ppp(8) echo, whois(1) -k.
2005-02-20 07:29:07 +00:00
Robert Watson 903faf0bbe Merge uipc_syscalls.c:1.214 from HEAD to RELENG_5:
date: 2005/02/17 13:00:23;  author: rwatson;  state: Exp;  lines: +2 -2
  In accept1(), extend coverage of the socket lock from just covering
  soref() to also covering the update of so_state.  While no other user
  threads can update the socket state here as it's not yet hooked up to
  the file descriptor array yet, the protocol could also frob the
  socket state here, leading to a lost update to the so_state field.
  No reported instances of this bug (as yet).
2005-02-20 00:56:04 +00:00
Robert Watson 6ac57da6a7 Merge uipc_socket2.c:1.142 from HEAD to RELENG_5:
date: 2005/02/17 12:53:45;  author: rwatson;  state: Exp;  lines: +1 -1
  In sonewconn(), set the new socket's state to show the protocol-provided
  connection status before inserting the new socket into the listen
  socket's accept queue, or there might be a race in which another thread
  wakes up when the accept lock is released, and sees the socket before its
  state is set correctly.  The wakeup still occurs after the accept lock is
  released.  There have been no diagnoses of this bug in real-world systems
  (as yet).
2005-02-20 00:54:54 +00:00
Christian Brueffer 43886cc593 MFC: rev. 1.32
Remove dublicated device entry from the synopsis.
2005-02-20 00:44:38 +00:00
Gleb Smirnoff ad8fc70d80 Apply a workaround for problem fixed in sys/socketvar.h rev. 1.137. We
can't MFC socketvar.h since it will break ABI between kernel and several
modules. This workaround saves sb_state in local variable and restores
it after bzero().

Original commit log of socketvar.h and problem description:
  Move sb_state to the beginning of structure, above sb_startzero member.
  sb_state shouldn't be erased, when socket buffer is flushed by sorflush().

  When sb_state was bzero'ed, a recently set SBS_CANTRCVMORE flag was cleared.
  If a socket was shutdown(SHUT_RD), a subsequent read() would block on it.

  Reported by:    Ed Maste, Gerrit Nagelhout
  Reviewed by:    rwatson
2005-02-19 20:56:07 +00:00
Bruce A. Mah 1f4849390b MFC part of rev. 1.787: amr(4) now PAE-safe.
Bump copyright date while here.
2005-02-19 20:12:05 +00:00
Christian S.J. Peron 68aa221140 MFC revision 1.60 sys/kern/sysv_msg.c
date: 2005/02/12 01:22:39;  author: csjp;  state: Exp;  lines: +12 -6

MFC revision 1.75 sys/kern/sysv_sem.c
date: 2005/02/12 01:22:39;  author: csjp;  state: Exp;  lines: +20 -10

MFC revision 1.101 /sys/kern/sysv_shm.c
date: 2005/02/12 01:22:39;  author: csjp;  state: Exp;  lines: +15 -8

Add much needed descriptions for a number of the IPC related sysctl OIDs.
This information will be very useful for people who are tuning applications
which have a dependence on IPC mechanisms.
2005-02-19 19:54:31 +00:00
Gregory Neil Shapiro 23f0ff60f4 MFC: Remove file no longer in 8.13.3 2005-02-19 17:21:57 +00:00
Gregory Neil Shapiro aac2f2ef12 MFC: Release note entry for sendmail 8.13.3 2005-02-19 17:17:59 +00:00
Gregory Neil Shapiro edcaef5556 MFC: sendmail 8.13.3 new files 2005-02-19 17:16:31 +00:00
Gregory Neil Shapiro f48a120373 MFC: sendmail 8.13.3 2005-02-19 17:15:28 +00:00
Hajimu UMEMOTO fda8705108 MFC 1.218: teach scope of IPv6 address to net.inet6.tcp6.getcred. 2005-02-19 15:32:30 +00:00
Gleb Smirnoff 9066cb6dd6 MFC rev. 1.12 of ng_ksocket.h; 1.49-1.50 of ng_ksocket.c
When netgraph(4) was converted to use mbuf_tags(9) instead of meta-data
  a definite setup was broken: two ng_ksockets are connected to each other,
  connect()ed to different remote hosts, and bind()ed to different local
  interfaces. In this case one ng_ksocket is fooled with tag from the other
  one.

  Put node id into tag. In rcvdata method utilize tag only if it has our
  own id inside or id equals zero. The latter case is added to support
  packets send by some third, not ng_ksocket node.
2005-02-19 14:35:01 +00:00
Gleb Smirnoff 37288d6756 MFC 1.226, with one change: use SHRT_MAX instead of USHRT_MAX, since
sys/socketvar.h rev. 1.136 is not merged due to API freeze.

  - Add SYSCTL_PROC() around somaxconn, not accepting values < 1 or > SHRT_MAX.

  Before this change setting somaxconn to smth above 32767 and calling
  listen(fd, -1) lead to a socket, which doesn't accept connections at all.

  Reviewed by:    rwatson
  Reported by:    Igor Sysoev
2005-02-19 14:17:12 +00:00
Yaroslav Tykhiy 7b7ed889fd Forced commit to note that in fact the previous commit
merged revisions 1.202, 1.205, and 1.206 of this file.
Sorry for the typo.
2005-02-19 12:19:18 +00:00
Yaroslav Tykhiy 54bacb78dc MFC 1.202, 1.204, 1.205: Fxies related to signal handling. 2005-02-19 12:15:44 +00:00
Yaroslav Tykhiy 0aed43d9cd MFC: When looking for a virtual host to handle the connection,
stop the search on the first match for efficiency.
2005-02-19 12:12:14 +00:00
Yaroslav Tykhiy 3148b9662e MFC 1.196: Calling pam_chauthtok() isn't really needed since
an FTP user has no chance to change password anyway.
2005-02-19 12:11:04 +00:00
Yaroslav Tykhiy db0f916a6a MFC 1.194: Always log remote IP. 2005-02-19 12:07:29 +00:00
Yaroslav Tykhiy 999ce8e7c3 MFC 1.193: Treat host name buffers consistently. 2005-02-19 12:06:21 +00:00
Yaroslav Tykhiy a2b15e0e72 MFC quite a number of style changes which started
to get in the way of merging actual code.
2005-02-19 12:00:49 +00:00
Marius Strobl 5d4c408d67 MFC: 1.5
Ignore nodes missing the "name" or "reg" property instead of panicing in
the latter case.
2005-02-19 10:30:11 +00:00
David E. O'Brien 8eb4995e57 MFC: rev. 1.449: catch another gcc-3.3 c++ include path and update it to 3.4. 2005-02-19 03:44:09 +00:00
Paul Saab 8d389e7e67 MFC:
Add a 32bit syscall wrapper for modstat
2005-02-18 22:15:45 +00:00
Vinod Kashyap 3f339332d3 MFC: Undoing recent changes to make 3ware's i386 tools work on amd64, since
there are now amd64 versions of CLI and 3DM2 available.

MFC after:1 day
2005-02-18 18:42:16 +00:00
Bill Paul fe1001df5f MFC all of the recent updates to -current (new framework, amd64
support), except for the patch to if_ndis.c to do AP scanning with
ifconfig (the support for which isn't present in -stable).
2005-02-18 16:30:10 +00:00
Xin LI 8e6d32f9bc MFC: sync fsync(1) with today's -HEAD. Principally this includes:
- Continue, in case of error.
	- Add WARNS?= 6

	Submitted by:	Liam J. Foy <[email protected]>
	Original commit done by:	ssouhlal
	And some of my own pointy hats

Reminded by:	Tony Maher <[email protected]> via
		bin/77670, and bin/77670 via maxim
2005-02-18 16:15:35 +00:00
Max Laier a1591df863 MFC, rev. 1.147:
Adjust TX threshold on every TX underrun.  Some supported cards
  (8139-based) can retransmit on TX underrun and set TOK in addition to
  TUND.  Also add a check to prevent overflow of the addressable threshold.

  This fixed some reports of rl(4) slowness, believed to be related to ALTQ
  before.

  PR:		kern/61448
  Submitted by:	Tim Draegen-Gilman <timNOeudaemonSPAMnet> (with changes)
2005-02-18 15:58:30 +00:00
cvs2svn 5f6c8a8de1 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-02-18 03:22:38 +00:00
Paul Saab 9440f20b2e MFC:
>ps          2005-02-16 01:46:17 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/netinet          tcp_input.c
>  Log:
>  Fix for a SACK (receiver) bug where incorrect SACK blocks are
>  reported to the sender - in the case where the sender sends data
>  outside the window (as WinXP does :().
>
>  Reported by:    Sam Jensen <sam at wand dot net dot nz>
>  Submitted by:   Mohan Srinivasan
2005-02-17 21:52:22 +00:00
Paul Saab 99a0a6b66a MFC:
>ps          2005-02-14 21:01:08 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/netinet          tcp_input.c tcp_sack.c
>  Log:
>  - Retransmit just one segment on initiation of SACK recovery.
>    Remove the SACK "initburst" sysctl.
>  - Fix bugs in SACK dupack and partialack handling that can cause
>    large bursts while in SACK recovery.
>
>  Submitted by:   Mohan Srinivasan
>
>  Revision  Changes    Path
>  1.266     +1 -11     src/sys/netinet/tcp_input.c
>  1.7       +16 -20    src/sys/netinet/tcp_sack.c
2005-02-17 21:49:16 +00:00
Wilko Bulte 6c3d625899 MFC:
add support for NetMos NM9805 1284 Printer port

  Submitted by: Willy Offermans <[email protected]>
2005-02-17 19:55:15 +00:00
Christian Brueffer f99fd93472 MFC: rev. 1.40
Adapt for new KDB world order.
2005-02-17 15:50:09 +00:00
Marius Strobl 925bbfc662 MFC:
Add a front-end for the `rtc' device which is a MC146818 compatible
clock found on the ISA bus (some USIIe, USIIi and USIIIi models) and
EBus (USIII models) instead of a MK48Txx clock.
This isn't an 1:1 MFC though, as the driver in -current relies on
probing the ISA version via PnP. That functionality of the sparc64
ISA code isn't MFC'ed on probably never will be. An identify function
is used in RELENG_5 instead.
2005-02-17 01:06:04 +00:00
Marius Strobl 15435a77f8 MFC:
Add a driver back end for MC146818 and compatible clocks for use with
the genclock code.
2005-02-17 01:05:09 +00:00
Justin T. Gibbs dab9a8dd70 MFC: Target mode fixes, use ms for timeouts to avoid overflow,
return to using the enhanced busfree feature on the 7901B.
2005-02-16 23:38:34 +00:00
Bosko Milekic 43f05f6192 MFC src/sys/kern/kern_mbuf.c 1.6, src/sys/kern/uipc_mbuf.c 1.141,
src/sys/sys/mbuf.h 1.165.  Original commit message:

"Optimize the way reference counting is performed with Mbufs.  We
do not need to perform an extra memory fetch in the Packet (Mbuf+Cluster)
constructor to initialize the reference counter anymore.  The reference
counts are located in a separate memory region (in the slab header,
because this zone is UMA_ZONE_REFCNT), so the memory fetch resulted very
often in a cache miss.  Additionally, and perhaps more significantly,
optimize the free mbuf+cluster (packet) case, which is very common, to
no longer require an atomic operation on free (to verify the reference
counter) if the reference on the cluster has never been increased (also
very common).  Reduces an atomic on mbuf free on average.

Original patch submitted by: Gerrit Nagelhout <[email protected]>"
2005-02-16 22:21:36 +00:00
Bosko Milekic 696fea5da0 MFC: Sync up the Copyright statements for the following files to their
latest versions in HEAD:
sys/kern/kern_mbuf.c
sys/vm/uma.h
sys/vm/uma_core.c
sys/vm/uma_dbg.c
sys/vm/uma_dbg.h
sys/vm/uma_int.h
(Basically re-add "All rights reserved" in time for 5.4-RELEASE, at least
until we clear out the surrounding legal issues once and for all).
2005-02-16 21:53:08 +00:00
Bosko Milekic c0ebd7fbe8 MFC: bring in critical fix introduced in 1.114. Original commit message:
"While we want the recursion protection for the bucket zones so that
recursion from the VM is handled (and the calling code that allocates
buckets knows how to deal with it), we do not want to prevent allocation
from the slab header zones (slabzone and slabrefzone) if uk_recurse is
not zero for them.  The reason is that it could lead to NULL being
returned for the slab header allocations even in the M_WAITOK
case, and the caller can't handle that (this is also explained in a
comment with this commit).

The problem analysis is documented in our mailing lists:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=153445+0+archive/2004/freebsd-current/20041231.freebsd-current

(see entire thread for proper context)."
2005-02-16 20:45:57 +00:00
Bosko Milekic 4c79d00b96 MFC: Copyright updates, as in 1.5 2005-02-16 20:37:24 +00:00
Bosko Milekic 03c37ff16b MFC: Copyright updates as in 1.111 2005-02-16 20:35:04 +00:00
Bosko Milekic f815c745f8 MFC 1.108: INVARIANTS-only fix. Original commit log:
"Fix a INVARIANTS-only bug introduced in Revision 1.104:

IF INVARIANTS is defined, and in the rare case that we have
allocated some objects from the slab and at least one initializer
on at least one of those objects failed, and we need to fail the
allocation and push the uninitialized items back into the slab
caches -- in that scenario, we would fail to [re]set the
bucket cache's ub_bucket item references to NULL, which would
eventually trigger a KASSERT."
2005-02-16 20:29:00 +00:00
Justin T. Gibbs 0031103f3a Report a maximum lun of 63 rather than 255 to CAM. While the later
better reflects the controllers capabilities, it is only valid when
talking to targets using packetized protol.  CAM will need to understand
this limitation of SPI-4 before we can tell it the truth.
2005-02-16 17:43:26 +00:00
Justin T. Gibbs e3696b3454 Initialize the timedout_scbs list. Since the softc is bzeroed, the lack
of explicit initialization had no side effects.

Add a return after a panic to quiet GCC when compiling with certain
optimizations enabled.
2005-02-16 17:39:46 +00:00
Justin T. Gibbs 7df62db361 Use SCB_TAG to access the scb's tag field consistently. This was missing
from a few printfs.  This could cause the tag field to appear byteswapped
in the printf output.  Print the tags in decimal instead of hex.

Initialize the timedout_scbs list.  Since the softc is zeroed, the
missing initialization had no side effects.
2005-02-16 17:36:36 +00:00
Joerg Wunsch 3346dd9c51 MFC rev 1.12: U1E and U2 are fully supported systems. 2005-02-16 12:12:28 +00:00
Marcel Moolenaar e0dcf4e420 Add a note that people on sparc64 and using the GENERIC kernel need
to run mergemaster or edit /etc/ttys manually now that uart(4) is
the default serial console. This is easily forgotten or overlooked.
2005-02-15 21:15:31 +00:00
Marcel Moolenaar cef65a4b4d MFC rev. 1.9: Start gettys on ttyu0 and ttyu1. 2005-02-15 21:08:19 +00:00
Marcel Moolenaar 47cd8f2411 MFC rev 1.88: make uart(4) the default driver for serial ports. 2005-02-15 21:05:01 +00:00
Bruce A. Mah 9471c1164f MFC subset of items from rev. 1.785: netcat, tzdata2004g. 2005-02-15 06:16:44 +00:00
Eric Anholt 6fc8cc6186 MFC r1.20: Remove the fake "generic" support and add many new PCI IDs. 2005-02-15 01:29:38 +00:00
Eric Anholt c77318185e MFC r1.4: Correct the SiS 755 PCI ID. 2005-02-15 01:25:55 +00:00
Christian Brueffer 9dce39d259 MFC: rev. 1.2
No one cares about when the manpage first appeared.  Mention when the driver
appeared instead.
2005-02-15 00:53:07 +00:00
Ruslan Ermilov 794184f5fb MFC: 1.52: Time out routes created by redirect. 2005-02-14 13:20:30 +00:00
David E. O'Brien 71e46c6711 MFC: add TUNABLE_LONG and TUNABLE_ULONG, and use the latter for the
hw.pci.host_mem_start tunable.
2005-02-14 11:23:43 +00:00
David E. O'Brien ab4471e4b2 MFC: rev 1.116: whitespace cleanup. 2005-02-14 11:14:08 +00:00
David E. O'Brien ccadbe5f3f MFC: add the mp_watchdog hooks. 2005-02-14 11:00:19 +00:00
David E. O'Brien b398e8558c MFC: rev 1.245: add the mp_watchdog hooks. 2005-02-14 10:53:41 +00:00
David E. O'Brien c45b3ec8c2 MFC: s/smp_rv_mtx/smp_ipi_mtx/g 2005-02-14 10:42:23 +00:00
David E. O'Brien d8416df7ce MFC: rev 1.621: use the definition of struct bios_smap from machine/pc/bios.h. 2005-02-14 10:33:15 +00:00
David E. O'Brien 28a101d514 MFC: rev 1.622: preserve dcons buffer passed by loader. 2005-02-14 10:32:12 +00:00
David E. O'Brien 3de1f6ddd3 MFC: rev. 1.625: join the %cr0 setup line. 2005-02-14 10:30:44 +00:00
David E. O'Brien a1ab8e2948 MFC: rev 1.11: don't use atomic ops to increment interrupt stats. 2005-02-14 10:16:17 +00:00
David E. O'Brien ccdbbf2bd0 MFC: copyright tweaks. 2005-02-14 10:12:09 +00:00
David E. O'Brien e94bb56b0c MFC: The non-bus_dmamap_load_mbuf_sg() parts of rev 1.70.
This is mostly a style sync with HEAD.
2005-02-14 10:11:02 +00:00
David E. O'Brien 2286b488e9 MFC: The non-bus_dmamap_load_mbuf_sg() parts of rev 1.66.
This is mostly a style sync with HEAD.
2005-02-14 10:05:51 +00:00
David E. O'Brien 77ef84879b MFC: + Make syscons properly inherit the bios capslock/shiftlock/etc state like
i386 does.  Note that we cannot inherit the bios key repeat rate because
     that requires a bios call (which is impossible for us).
     + Give syscons the ability to beep on amd64.
     + bios_sigsearch() etc is useful for finding tables in roms.
2005-02-14 09:34:40 +00:00
David E. O'Brien 9d1d5f85c4 MFC: Use bitmapped IPI handler. Update elcr and default mptable
config handler.  Tidy up various local apic initialization.
2005-02-14 09:22:21 +00:00
David E. O'Brien 6c0274fda7 White space sync with HEAD. 2005-02-14 08:20:27 +00:00
David E. O'Brien 9beb60b71b MFC: change gdb_cpu_setreg() to not take the value to which to set the
specified register, but a pointer to the in-memory representation of
     that value.
2005-02-14 08:18:17 +00:00
David E. O'Brien 26146d32f5 Restore vendor SCM ID. 2005-02-14 08:16:37 +00:00
Eric Anholt 56179ce408 MFC: Remove fake "generic" support, and the AMD64 "return NULL;" it made
necessary.

PR:		kern/76411
Submitted by:	Jonathan Fosburgh, jonathan at fosburgh dot org
2005-02-14 07:23:15 +00:00
Pawel Jakub Dawidek 9cd091adc3 MFC: g_data.9 1.7
Improve EIO error description and mention that it can also occur while
writting.
2005-02-14 06:26:19 +00:00
Xin LI 15e4e53e7e MFC 1.218+1.219:
Validate ifc->ifc_len before submitting its incarnation to sbuf_new,
which will finally lead to kernel panic.

Security:	This prevents a local DoS that can be exploited by
Security:	both privileged and unprivileged users.
Submitted by:   Wojciech A. Koszek [dunstan at freebsd czest pl]
PR:             77421

Early MFC discussed with and reviewed by:
		security (simon, trhodes)
2005-02-14 05:42:06 +00:00
Bruce A. Mah cbb47f0299 MFC relevant items from rev. 1.783: sf(4) supports device polling and
altq(4), ongoing locking work in the network stack, TCP RST bugfix,
SACK bugfixes, gpt(8) create -f, NO_NIS, ncal(1) -m.
2005-02-14 05:41:32 +00:00
David E. O'Brien 9a1b773c69 MFC: rev 1.66: use %rip - 1 for the symbol search address (for noreturn funcs). 2005-02-14 03:21:01 +00:00
David E. O'Brien 3a53595b98 MFC: spelling & white space sync. 2005-02-14 03:18:00 +00:00
David E. O'Brien e8af7cea7e MFC: white space sync 2005-02-14 03:01:58 +00:00
David E. O'Brien 37158ad9f5 MFC: rev 1.41: use utils from /rescue vs. /stand, and pax vs. cpio & gzip. 2005-02-14 01:15:45 +00:00
David E. O'Brien 3dbcc34ce3 MFC: rev 1.68: if USER of HOSTNAME is set to an empty value,
use the fallback value.
     rev 1.65: /* -> /*- for copyright notices.
2005-02-14 01:08:14 +00:00
David E. O'Brien 39aee9b0d2 MFC: infrastructure for the very dreaded NOFOO -> NO_FOO. 2005-02-14 00:07:25 +00:00
Robert Watson d9aa1ba5e4 Merge tcp_subr.c:1.216-1.217 from HEAD to RELENG_5:
date: 2005/01/30 23:30:28;  author: rwatson;  state: Exp;  lines: +1 -1
  Have tcp_isn_tick() fire 100 times a second, rather than HZ times a
  second; since the default hz has changed to 1000 times a second,
  this resulted in unecessary work being performed.

  Discussed with:         phk, cperciva
  General head nod:       silby

  date: 2005/01/31 01:35:01;  author: rwatson;  state: Exp;  lines: +1 -1
  Update an additional reference to the rate of ISN tick callouts that was
  missed in tcp_subr.c:1.216: projected_offset must also reflect how often
  the tcp_isn_tick() callout will fire.

  Submitted by:   silby

Note that although the default has not changed for HZ on i386 in RELENG_5,
many sites run with elevated HZ for the purposes of DUMMYNET, etc.  This
will reduce the CPU overhead of this.
2005-02-13 21:35:54 +00:00
Robert Watson 0e1afeb50f Merge strvalid.c:1.5 from HEAD to RELENG_5:
date: 2005/01/29 13:34:22;  author: rwatson;  state: Exp;  lines: +1 -1
  Because the argument to strvalid() is a size_t, use a size_t to iterate
  over the array.

  Submitted by:   stefanf
2005-02-13 21:30:02 +00:00
Robert Watson 9d4da60e54 Merge mac.conf.5:1.6-1.7
date: 2005/01/11 20:50:50;  author: ru;  state: Exp;  lines: +2 -1
  Scheduled mdoc(7) sweep.

  date: 2005/01/20 09:17:03;  author: ru;  state: Exp;  lines: +5 -5
  Sort sections.
2005-02-13 21:25:54 +00:00
Robert Watson f40f7c663b Merge mac.3:1.14 from HEAD to RELENG_5:
revision 1.14
  date: 2005/01/20 09:17:03;  author: ru;  state: Exp;  lines: +5 -5
  Sort sections.
2005-02-13 21:23:07 +00:00
Robert Watson c809d14a3f Merge acl_valid.3:1.16 from HEAD to RELENG_5:
date: 2005/01/15 12:21:03;  author: ru;  state: Exp;  lines: +22 -10
  Fixed markup bug.
2005-02-13 21:20:23 +00:00
Robert Watson b5dcc25f77 Merge su.c:1.76 from HEAD to RELENG_5:
date: 2005/01/17 19:57:59;  author: rwatson;  state: Exp;  lines: +33 -3
  If su(1) is run without an effective uid of 0, generate an error to
  the user indicating that su is not running setuid, which may help
  suggest to the user that it should be setuid, or should not be
  running from a file system mounted nosuid.

  Suggested by:    Ivan Voras <ivoras at fer dot hr>
2005-02-13 21:15:15 +00:00
Robert Watson 580e68ac38 Merge udpconnectjail regression test from HEAD to RELENG_5, Makefile:1.2,
udpconnectjail.c:1.2:

  Add udpconnectjail, a simple regression test to exercise an (as yet)
  unfixed bug in the jail() implementation relating to using the connect()
  system call on UDP sockets.

  PR:     26506

The only change in the merge was NO_MAN -> NOMAN.
2005-02-13 21:13:53 +00:00
Robert Watson 212f355f2e Merge kern_exit.c:1.255 from HEAD to RELENG_5:
date: 2005/01/08 04:17:48;  author: rwatson;  state: Exp;  lines: +1 -1
  In kern_wait(), let the compiler copy the rusage structure rather than
  an explicit bcopy() -- it probably does a better job.
2005-02-13 21:09:48 +00:00
Robert Watson ebf64af622 Merge mlock regression test from HEAD to RELENG_5:
Add a simple regression test for mlock()/munlock() to make sure they
  work on a single page as root, and fails on a single page as nobody.
  Intended to help diagnose reports regarding insecure memory use with
  gnupg.

Merged with one tweak: NO_MAN -> NOMAN.
2005-02-13 21:07:07 +00:00
Christian S.J. Peron 80d9b38322 MFC ps.c revision 1.108
date: 2004/11/14 19:30:02;  author: csjp;  state: Exp;  lines: +25 -0
Currently if the user specifies -e and procfs is not mounted on /proc,
printing of the process environment will fail silently.

-define a function which will check to see if procfs is mounted on /proc
-Implement this test if the user specified -e
-If procfs is not mounted on /proc and -e was specified, print a warning.
 informing the user that procfs(5) is required.

MFC ps.c revision 1.108
date: 2004/11/19 16:11:54;  author: csjp;  state: Exp;  lines: +6 -9
Use statfs instead of getmntinfo(). This will make the procfs checks
play nicer in prisons. It also simplifies things.
2005-02-13 19:13:46 +00:00
Robert Watson 8d6f4374d5 Merge ipx_pcb.c:1.30, ipx_pcb.h:1.19, spx_usrreq.c:1.48 from HEAD to
RELENG_5:

  date: 2004/12/30 17:21:07;  author: rwatson;  state: Exp;  lines: +0 -55
  date: 2004/12/30 17:21:07;  author: rwatson;  state: Exp;  lines: +0 -3
  date: 2004/12/30 17:21:07;  author: rwatson;  state: Exp;  lines: +0 -50
  Garbage collect unused (and incompletely implemented) functions:

  - ipx_pcbnotify(), which is never called.
  - ipx_rtchange(), which is never called, is incomplete inplemented, and
    also #ifdef notdef.
  - spx_fixmtu(), which is never called, is incompletely implemented, and
    also #ifdef notdef.
2005-02-13 18:55:34 +00:00
Robert Watson 335b2b60d2 Merge ipx_input.c:1.35 and ipx_var.h:1.18 from HEAD to RELENG_5:
date: 2004/12/30 16:56:07;  author: rwatson;  state: Exp;  lines: +7 -8
  date: 2004/12/30 16:56:07;  author: rwatson;  state: Exp;  lines: +4 -4
  Constify ipx_zeronet, ipx_zerohost, ipx_broadnet, ipx_broadhost.
  Remove 'allones' since the values of the broadcast network and
  host variables are set statically.
2005-02-13 18:53:11 +00:00
Robert Watson c506b06975 Merge a portion of subr_witness.c:1.186 from HEAD to RELENG_5:
date: 2004/12/28 21:21:27;  author: jhb;  state: Exp;  lines: +1 -2
  - Remove the unused witness malloc bucket.

  Submitted by:   Michal Mertl mime at traveller dot cz (1)

Remainder of the change (bump WITNESS pool size) ommitted for now.
2005-02-13 18:50:17 +00:00
Robert Watson 044f655a98 Merge aiotest regression test from HEAD to RELENG_5: merge through
Makefile:1.1 and aiotest.c:1.2:

  Add a basic aio functionality regression test, which simply writes and
  then reads from a fairly broad range of object types: regular file,
  fifo, UNIX socketpair, pty, UNIX pipe, and an md device.  Not a deep
  test of functionality, just a basic test that aio_write followed by
  aio_read returns the correct data in a relatively timely manner.

  Requested by:   phk
2005-02-13 18:38:51 +00:00
Vinod Kashyap 00eb4d3fa7 MFC of recent changes to fix device discovery, and fix amd64 compatibility for 3ware management tools. 2005-02-13 18:34:27 +00:00
Robert Watson 9c26ab6129 Merge tcp_hostcache.c:1.9 from HEAD to RELENG_5:
date: 2004/12/05 22:20:59;  author: rwatson;  state: Exp;  lines: +2 -1
  Minor grammer fix in comment.
2005-02-13 18:18:33 +00:00
Diomidis Spinellis 0c5125d7a4 Back-off an unneeded cast added by mistake in the 1.7.4.1 MFC 2005-02-13 15:27:33 +00:00
Diomidis Spinellis ac58f734ca MFC 1.8 (hide arguments)
Remove some warnings.

PR:		bin/76374
Security: Correct hiding of arguments, such as the key, from ps(1)
2005-02-13 15:19:47 +00:00
Robert Watson 05f326f461 Merge mbuf_tags.9:1.2-1.6 from HEAD to RELENG_5 (1.2 and 1.3 cancel each
other out due to a back-out):

  date: 2004/11/18 23:01:07;  author: rwatson;  state: Exp;  lines: +29 -2
  Add a couple of summary paragraphs at the head of mbuf_tags(9) to
  indicate how m_tags might be used, and what their high level properties
  are.  This may help developers using tags get a more clear picture
  before delving into the technical details of ABI cookies and API calls.

  Suggested by:   Rene de Vries <rene at canyon dot xs4all dot nl>

  date: 2004/11/21 00:24:21;  author: rwatson;  state: Exp;  lines: +6 -3
  Word choice fix; use .Fn for non-.Xr functions.

  Submitted by:   ru

  date: 2005/01/12 21:48:25;  author: ru;  state: Exp;  lines: +5 -3
  Scheduled mdoc(7) sweep.
2005-02-13 15:07:52 +00:00
Robert Watson 48f861e8b6 Merge listenclose regression test from HEAD to RELENG_5 -- specifically,
bring RELENG_5 to listenclose.c, and to Makefile:1.3.  Makefile:1.2,
the NO_MAN change, is not merged.

  Add a small regression test that opens a TCP socket, listens on it,
  performs a non-blocking connect from another socket, and then closes
  the listen socket rather than accepting.  This is intended to
  exercise the close path in which connections are aborted due to a
  close on the listen socket while the connection is in the listen
  queue.
2005-02-13 14:17:55 +00:00
Robert Watson 2c0be9d269 Merge kern_sysctl.c:1.162, options:1.486 and NOTES:1.1285 from HEAD
to RELENG_5:

  date: 2004/10/27 19:26:01;  author: rwatson;  state: Exp;  lines: +2 -0
  date: 2004/10/27 19:26:01;  author: rwatson;  state: Exp;  lines: +1 -0
  date: 2004/10/27 19:26:01;  author: rwatson;  state: Exp;  lines: +8 -0
  Move the 'debug' sysctl tree under options SYSCTL_DEBUG.  It generates
  an inordinate amount of synchronous console output that is fairly
  undesirable on slower serial console.  It's easily hit by accident
  when frobbing other sysctls late at night.
2005-02-13 14:13:53 +00:00
Robert Watson 61fcf18345 Merge accf_data_attach.c:1.3-1.4 from HEAD to RELENG_5, excluding the
introduction of the '.t' file as the regression test framework has
not yet been MFC'd:

  date: 2004/10/23 22:18:37;  author: rwatson;  state: Exp;  lines: +38 -65
  Use errx() instead of fprintf()/exit() for conciseness.

  date: 2004/11/11 19:47:53;  author: nik;  state: Exp;  lines: +26 -16
  Switch over to a different, more flexible test output protocol that's
  understood by Perl's Test::Harness module and prove(1) commands.

  Update README to describe the new protocol.  The work's broken down into
  two main sets of changes.

  First, update the existing test programs (shell scripts and C programs)
  to produce output in the ok/not ok format, and to, where possible, also
  produce a header describing the number of tests that are expected to be
  run.
2005-02-13 14:04:36 +00:00
Robert Watson 118a58e20d Remove a trailing white space nit from mac_policy.h. 2005-02-13 14:00:41 +00:00
Robert Watson e05af37d7f Merge mac_test.c:1.49-1.50 from HEAD to RELENG_5:
date: 2004/10/22 11:24:50;  author: rwatson;  state: Exp;  lines: +34 -28
  Replace direct reference to kdb_enter() with a  DEBUGGER() macro that
  will call printf() if KDB isn't compiled into the kernel.

  Obtained from:  TrustedBSD Project
  Sponsored by:   SPAWAR

  date: 2004/10/23 15:12:34;  author: rwatson;  state: Exp;  lines: +1 -1
  /%x/%s/ -- mismerged DEBUGGER() printf() format stirng from the
  TrustedBSD branch.

  Submitted by:   bde
2005-02-13 13:57:46 +00:00
Xin LI 86863e3503 New order after _netcat has been changed to _nc: sort the list.
Submitted by:	ru
Pointy hat to:	me
2005-02-13 13:42:20 +00:00
Maxim Konovalov 4f17f66a72 MFC rev. 1.19 telnet/main.c: remove -t flag from getopt(3).
MFC rev. 1.19 telnetd/telnetd.8 and rev. 1.26 telnetd/telnetd.c:
add -4 and -6 flags to a man page and usage().

MFC rev. 1.20 telnetd/telnetd.8, rev. 1.27 telnetd/telnetd.c,
rev. 1.20 telnet/main.c: make telnet[d] -S (IP TOS) flag really work.
2005-02-13 13:17:23 +00:00
Maxim Konovalov c95276f557 MFC rev. 1.34: print a correct status for unix domain sockets, restore
input mode when return from the command one.
2005-02-13 12:49:28 +00:00
Maxim Konovalov 3e5203a53d MFC revs. 1.55 and 1.56: try to guess a buffer size for a fast growing
routing table.
2005-02-13 12:23:52 +00:00
Robert Watson 8171e15885 Minor white space synchronization between RELENG_5 and HEAD for mac_biba.c. 2005-02-13 12:10:38 +00:00
Robert Watson 6d4cc324d7 Merge ugidfw.c:1.4 from HEAD to RELENG_5:
date: 2005/01/16 10:49:48;  author: charnier;  state: Exp;  lines: +28 -25
  Add prototypes and remove unused variables for WARNS=6 compliance. Add
  'usage: ' in front of usage string. Use warnx(3) instead of fprintf in error
  messages to get progname prepended.
2005-02-13 12:05:48 +00:00
Xin LI 0f2afd7138 MFC:
Spell the variable as underscore plus their possible value, to follow
the style nearby.

Submitted by:	ru
2005-02-13 10:12:38 +00:00
Xin LI c202f52f57 MFC: Connect nc(1) to build, bump __FreeBSD_version, document NO_NETCAT 2005-02-13 07:45:30 +00:00
Xin LI e9abfe94dc MFC: Import of OpenBSD's nc(1) 2005-02-13 07:35:07 +00:00
David E. O'Brien 3152376aea MFC: For variables that are only checked with defined(), don't provide
any fake value.
2005-02-13 07:23:46 +00:00
Robert Watson cfe9ec803f Merge fsck.h:1.34 from HEAD to RELENG_5:
date: 2004/10/20 08:01:32;  author: rwatson;  state: Exp;  lines: +21 -0
  Explicitly break out NETA license from Berkeley license to clearly
  indicate license grant, as well as to indicate that NETA is asserting
  only two clauses, not four clauses.

  Requested by:   imp
2005-02-12 20:57:31 +00:00
Robert Watson bcd050f3aa Merge ipsockopt regression test from HEAD to RELENG_5 -- bring
ipsockopt.c to revision 1.4, and Makefile to revision 1.2:

  Add a simple exercise suite for IP-level socket options.  The suite
  atempts to read and write various IP-level socket options as root and
  nobody, making sure the initial values are as expected, that they can
  be changed to valid values and take effect, etc.  No attempt is made
  to check for the correct implementation of side effects (such as
  changes in packet headers) as yet.

  The IP options section is currently broken but will be fixed shortly.

  Not all multicast options are currently tested.
2005-02-12 20:52:37 +00:00
Robert Watson bb967a9b6f Merge tcpconnect regression test from HEAD to RELENG_5: bring tcpconnect.c
up to 1.3, and Makefile to 1.2:

  Add a simple C-based TCP connection generator, which generates and
  closes the specified number of TCP connections sequentially and
  synchronously.  Useful for trying to trigger races in the accept
  code.
2005-02-12 20:46:48 +00:00
Robert Watson 97127b9919 Also merge the tcpstream README from HEAD to RELENG_5: this brings
README in RELENG_5 to revision 1.1.
2005-02-12 20:09:16 +00:00
Robert Watson a51c1cbb3e Merge tcpstream regression test from HEAD to RELENG_5. This brings
tcpstream.c in RELENG_5 up to 1.2, and Makefile up to 1.2.

  Add tcpstream, a simple TCP stream generator that uses a pseudo-random
  sequence to detect data corruption visible to an application.
2005-02-12 20:07:24 +00:00
Robert Watson 99897d7869 Merge key.c:1.66 from HEAD to RELENG_5:
date: 2004/08/27 18:24:59;  author: rwatson;  state: Exp;  lines: +4 -4
  Diff reduce against KAME: minor white space synchronization to KAME
  tree.
2005-02-12 19:42:55 +00:00
Robert Watson ccdab28426 Merge keysock.c:1.28 from HEAD to RELENG_5:
date: 2004/08/27 18:41:41;  author: rwatson;  state: Exp;  lines: +12 -10
  Semi-gratuitous white space synchronization with KAME tree: to reduce
  diffs against #ifdef'd version of IPSEC, use "struct thread *p"
  rather than "struct proc *p", fix some white space, and make some
  already inconsistent white space inconsiste differently.
2005-02-12 19:41:02 +00:00
Robert Watson c0ec9cdbc1 Merge accept_fd_leak.c:1.2-1.5 from HEAD to RELENG_5; changes to introduce
a .t file are not included:

  date: 2004/08/24 04:59:26;  author: rwatson;  state: Exp;  lines: +1 -0
  Make sure to properly initialize 'size' to sizeof(sin) before passing
  it into accept().  Depending on the initial value in memory, it is
  otherwise possible to get EINVAL.

  date: 2004/09/18 13:06:00;  author: rwatson;  state: Exp;  lines: +3 -2
  Modify accept_fd_leak regression test to generate "PASS" output, not
  just "FAIL" output, in order to make it consistent with other tests in
  the regression test tree.

  date: 2004/10/23 22:11:35;  author: rwatson;  state: Exp;  lines: +24 -44
  Use errx() instead of perror()/exit() for conciseness.

  Suggested by:   ru (some time ago)

  date: 2004/11/11 19:47:53;  author: nik;  state: Exp;  lines: +4 -2
  Switch over to a different, more flexible test output protocol that's
  understood by Perl's Test::Harness module and prove(1) commands.

  Update README to describe the new protocol.  The work's broken down into
  two main sets of changes.

  First, update the existing test programs (shell scripts and C programs)
  to produce output in the ok/not ok format, and to, where possible, also
  produce a header describing the number of tests that are expected to be
  run.
2005-02-12 19:35:19 +00:00
Robert Watson 9b29927f2c Merge kqueue.c regression test from HEAD to RELENG_5. This brings
the RELENG_5 kqueue.c up to revision 1.3, and Makefile 1.4:

  Add a basic kqueue + UNIX domain socket pair regression test to do some
  elementary exercising of kqueues on datagram and stream sockets.  Note
  that the datagram write kqueue case is left untested due to potentially
  confusing behavior for the developer (me) that might require attention.
2005-02-12 19:30:50 +00:00
Ian Dowse 2daf133445 MFC 1.3: check that we have at least a 586 class CPU before probing
for Nehemiah random number generation hardware.

PR:	i386/75686
2005-02-12 17:48:01 +00:00
Robert Watson bef4e235e1 Merge nfsd.c:1.32 from HEAD to RELENG_5:
date: 2005/01/23 21:34:00;  author: rwatson;  state: Exp;  lines: +1 -1
  Bump the default maximum on nfsd processes from 20 to 256.  Real-world
  measurements suggest that higher degrees of parallelism for large
  numbers of clients help performance substantially.

  Submitted by:   Eric Anderson <anderson at centtech dot com>
2005-02-12 16:11:30 +00:00
Robert Watson 612d26d543 Merge ufsread.c:1.14 from HEAD to RELENG_5:
date: 2005/01/30 14:58:00;  author: rwatson;  state: Exp;  lines: +26 -5
  Insert an explicit McAfee license, as we use a stock two-clause BSD
  license rather than the slightly custom licence in ufsread.c.
2005-02-12 16:10:10 +00:00
Robert Watson 2df6b6acfb Merge ufs_extattr.c:1.77 from HEAD to RELENG_5:
date: 2005/02/08 17:05:38;  author: rwatson;  state: Exp;  lines: +2 -10
  Don't use VOP_LEASE() with operations on extended attribute backing
  files.

  Pointed out by: phk
2005-02-12 16:05:44 +00:00
Robert Watson 0156276228 Merge tcp_syncache.c:1.69 from HEAD to RELENG_5:
date: 2005/01/30 19:28:27;  author: rwatson;  state: Exp;  lines: +3 -6
  Remove clause three from tcp_syncache.c license per permission of
  McAfee.  Update copyright to McAfee from NETA.
2005-02-12 16:02:59 +00:00
Marius Strobl 05412f70b7 MFC: 1.15
- Don't blindly use the return value of uart_cpu_channel() to calculate
  the address of a channel on a SCC, it returns 0 on failure.
- Hardcode channel 1 for the keyboard on Z8530, the information present
  in the Open Firmware device tree doesn't allow to determine this via
  uart_cpu_channel(). This makes the keyboard on Ultra 2 basically work.
- Add and improve comments about uart_cpu_channel() and uart_cpu_getdev_*().
2005-02-12 15:43:17 +00:00
Robert Watson b8d656989c Merge sio.c:1.457 and sio.c:1.458 from HEAD to RELENG_5:
date: 2005/02/03 10:35:05;  author: rwatson;  state: Exp;  lines: +9 -5
  When entering siocnputc() with (kdb_active), don't acquire (or
  release) the sio spin mutex, as use of synchronization primitives in
  the debugger can result in substantial problems.  With this patch in
  place entering the debugger via a serial console is made
  substantially more reliable.

  date: 2005/02/08 17:56:04;  author: rwatson;  state: Exp;  lines: +5 -9
  Simplify the "and if we're in the debugger, don't use locks" logic,
  correcting some misthinking.

  Discussed with (really this time):      bde
2005-02-12 15:38:09 +00:00
Robert Watson df4d28d2e6 Merge raw_ip6.c:1.49 from HEAD to RELENG_5:
date: 2005/02/06 21:43:55;  author: rwatson;  state: Exp;  lines: +0 -6
  Remove a comment from the raw IPv6 output function regarding
  M_TRYWAIT allocations: M_PREPEND() now uses M_DONTWAIT.
2005-02-12 15:23:57 +00:00
Christian Brueffer 69ead2dc0c MFC: rev. 1.40 by bms
Update document dates.
2005-02-12 15:23:54 +00:00
Christian Brueffer 1a15c3b832 MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-12 15:18:11 +00:00
Christian Brueffer 46b1fcc613 MFC: rev. 1.39 by bms
Document the fact that blackhole routes normally need to be bound
to lo(4) interfaces to have an effect, and that this is not needed
when using IP fast forwarding.
2005-02-12 15:12:45 +00:00
Christian Brueffer 3b9865642d MFC: rev. 1.55 by hmp
Code for automatic name completion in a tcsh(1) environment.
2005-02-12 15:08:24 +00:00
Gleb Smirnoff b5ec02a4ad Merge node from HEAD, rev. 1.33 and 1.34. This have been tested for a month
on dialup server with 4 lines. The known issue is that when running upon
sio(4), closing line in presence of traffic triggers several silo overflows.
2005-02-12 09:17:31 +00:00
Gleb Smirnoff 591d1426cf MFC 1.16:
- Correctly spell MOD_QUIESCE
  - use .Dv for it
2005-02-12 09:08:47 +00:00
Scott Long b3c4957b5f MFC:
- Fix crashdump support
 - Add 32-bit ioctl shims
2005-02-12 06:27:08 +00:00
Christian S.J. Peron 1ce78b3f60 MFC v1.71
Log:
  Since it is not un-common for a process's resident set size (rss)
  to exceed 10 megabytes in size (especially in X), bump the max
  column width from 4 bytes to 5. This will make the ps auxw output
  uniform again when a process's rss exceeds 10 megs.

  It should be noted that when 5 digits becomes to small, other
  solutions should be explored such as displaying them in megabytes
  or having ps automatically re-size column widths.
2005-02-12 01:46:39 +00:00
Robert Watson 63d6c627c8 Merge MUTEX_PROFILING.9:1.10 from HEAD to RELENG_5:
date: 2005/02/11 15:17:57;  author: rwatson;  state: Exp;  lines: +23 -0
  Add a bit more caveat text about MUTEX_PROFILING -- try to avoid using it
  with other profiling and debugging options, such as INVARIANTS, WITNESS,
  kernel profiling, etc.  They all interfere with each other nastily and
  will generate fairly useless results.
2005-02-11 20:13:06 +00:00
Brian Somers 7e78163552 MFC: Use the correct length when copying trailing data
PR:		77104
2005-02-11 15:50:25 +00:00
Jun Kuriyama 26965c09bd MFC 1.17 and 1.18.
1.16: Include <unistd.h>
  1.17: Use svc_getrpccaller() and output getnameinfo() error.
2005-02-11 13:51:33 +00:00
Christian Brueffer c63b451cde MFC: rev. 1.272
Add a Token Ring section which lists devices supported by oltr(4) for now.
2005-02-11 11:45:18 +00:00
Christian Brueffer 43cce6d76e MFC: rev. 1.53
Add oltr(4)
2005-02-11 11:44:40 +00:00
Christian Brueffer 5f8715b1a2 MFC:
Manpage for Olicom Token Ring adapters, based on input by mdodd.
2005-02-11 11:40:07 +00:00
Christian Brueffer 58d04fad2f MFC: rev. 1.13
Nuke information about GDB_REMOTE_CHAT, it was removed some time ago.
2005-02-11 11:36:52 +00:00
Max Laier 0b2ce1c391 MFC, improve ALTQ manpage documentation:
- Be more verbose about altq SYNOPSIS and add more linkage in the relating
   pf documents.
 - Spell RED as "Random Early Detection" consistently.
2005-02-11 00:57:55 +00:00
Marcel Moolenaar f215b5459b Comment out the ida(4) driver (Compaq Smart Array controller).
The driver is not 64-bit clean and causes the kernel to fault
(page faults and hidden unalignment faults).
I may have a chance to look at it in the near future, so I left
it in GENERIC for -current. People there should be able to deal
with it. For now, let's avoid that ida(4) ends up in 5.4-RELEASE.
2005-02-10 21:34:49 +00:00
Lukas Ertl abc162a3d3 MFC:
Only report state changes of subdisks and plexes when there's
   really a state change.

   Reword the info a bit.
2005-02-10 12:52:32 +00:00
Lukas Ertl 259bae5a1d MFC:
Don't initialize error with ENXIO as we might end up here when
   the plex has no more consumers (e.g. orphaning).
2005-02-10 12:51:29 +00:00
Lukas Ertl 4e55b37313 MFC:
Rename synchronization and initialization threads and prefix them
   with 'gv_' for consistency.
2005-02-10 12:49:39 +00:00
Lukas Ertl 1bb7e32e60 MFC:
Although an object may already be known in the configuration, it's
   worker thread may have been destroyed (e.g. during orphaning).

   Make sure that objects get back their worker threads when they get a
   new geom.
2005-02-10 12:48:34 +00:00
Lukas Ertl 271840e5c7 MFC:
Reset object flags after killing off an object's worker thread.
2005-02-10 12:45:51 +00:00
Kirill Ponomarev ff9098de0e MFG: rev 1.50
Introduce three new targets for ports collection:
showconfig-recursive, rmconfig-recursive and config-conditional.
2005-02-10 07:02:33 +00:00
Paul Saab 5bb689aa16 MFC:
revision 1.108
date: 2005/01/12 21:40:51;  author: ps;  state: Exp;  lines: +16 -6
Fix a TCP SACK related crash resulting from incorrect computation
of len in tcp_output(), in the case where the FIN has already been
transmitted. The mis-computation of len is because of a gcc
optimization issue, which this change works around.

Submitted by:   Mohan Srinivasan
2005-02-09 20:36:51 +00:00
Marcel Moolenaar cb2a3a25cf MFC rev. 1.3:
Add the keyboard system device before we probe for the keyboard.
2005-02-09 02:08:20 +00:00
Marcel Moolenaar d75741c59f MFC rev. 1.7:
Revert rev. 1.5 (was MFC'd as rev. 1.4.2.1)
2005-02-09 01:38:52 +00:00
Tom Rhodes 10f3dc337a Document EBUSY.
PR:             73387
Submitted by:   Thomas Ludwig <[email protected]> (original version)
2005-02-08 20:21:57 +00:00
Tom Rhodes 8710490a6b Add xrefs to crypt(3) and pw(8) and add a warning about not manually
altering passwd related files.

PR:             74656
Submitted by:   Jilles Tjoelker <[email protected]> (original version)
2005-02-08 20:01:41 +00:00
John Baldwin b13c94d766 MFC: Add a small API to manage the MD user trap structures including adding
missing locking to close a race that resulted in use-after-free.
2005-02-08 17:48:03 +00:00
Christian Brueffer 463e0e71a7 MFC: rev. 1.4
Scheduled mdoc(7) sweep.

Original revision by:	ru
2005-02-08 14:30:54 +00:00
Christian Brueffer 1f30159a34 MFC:
Scheduled mdoc(7) sweep.

Original revisions by:	ru
2005-02-08 14:23:41 +00:00
Christian Brueffer 4f73b85346 MFC: rev. 1.95 by ceri
Correct typo.
2005-02-08 14:20:12 +00:00
Shunsuke Akiyama b992a58de1 MFC: Use a taskqueue to handle port status changes.
umodem.c:	1.57
uplcom.c:	1.27
uvscom.c:	1.25
2005-02-08 12:44:09 +00:00
Christian Brueffer c23ea02cc3 MFC: 1.7
Remove Xref to nonexistant ifmedia.4
2005-02-08 11:30:10 +00:00
Christian Brueffer a32a9ad376 MFC:
Remove last traces of le.4
2005-02-08 11:28:18 +00:00
Christian Brueffer c5cab18f34 MFC: rev. 1.14
Remove Xref to nonexistant cap.3
2005-02-08 11:26:11 +00:00
Christian Brueffer 810fec6bbb MFC: rev. 1.22
- replace pointers to XF86Config with xorg.conf
- remove outdated XFree86 3.3.1 information
- bump .Dd
2005-02-08 11:24:53 +00:00
Christian Brueffer fcd02d8f36 MFC:
Xref mac_lomac.4 instead of lomac.4
2005-02-08 11:23:49 +00:00
Christian Brueffer 5d934dc050 MFC:
Remove last traces of lomac.4
2005-02-08 11:22:03 +00:00
Christian Brueffer c1bdded2a0 MFC: rev. 1.13
Xref mac_lomac.4 instead of lomac.4
2005-02-08 11:19:51 +00:00
Gleb Smirnoff ef1d814a64 MFC 1.3, 1.4:
Remove redundant parameter inherited from ipacctctl.

  Remove code, inherited from ipacctctl, which sets socket to non-blocking
  mode, since this introduces problems on SMP.
2005-02-08 09:16:02 +00:00
Gleb Smirnoff 4199f772e4 Reduce diff to HEAD, merge whitespace fixes in rev. 1.7. 2005-02-08 09:06:21 +00:00
Gleb Smirnoff ce9e978063 MFC 1.6 and 1.8:
Expire aged flows in normal expiry thread. This fixes the problem, when
  a node disconnected from all sources of traffic never purges its cache.

  In case of various tunneling protocols, mbuf may pass several interfaces
  before entering ng_netflow. In this case it will have not NULL m_pkthdr.rcvif.
  However, it will enter ng_iface soon with another index. So let in_ifIndex
  value configured by user override m_pkthdr.rcvif.

  Reported by:    Damir Bikmuhametov
2005-02-08 09:04:55 +00:00
Roman Kurakin 2ffe01dad0 MFC: -j 1.31 -j 1.33, -j 1.34 -j 1.35, -j 1.36 -j 1.37
revision 1.37
	date: 2004/12/13 22:07:23;  author: rik;  state: Exp;  lines: +296 -66
	Make code MPSAFE.

	You could turn this off by debug.mpsafenet=0 for full network
	stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
	ctau(4) accordingly.

	MFC after:	10 days
	----------------------------
	revision 1.35
	date: 2004/12/03 16:57:15;  author: rik;  state: Exp;  lines: +4 -2
	Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
	to privent running of PPP's state machine in non PPP mode.

	MFC: after 3 days.
	----------------------------
	revision 1.33
	date: 2004/10/13 07:02:56;  author: phk;  state: Exp;  lines: +4 -401
	First half of tty code rework:  unifdef -D__FreeBSD_Version=600000

	The changes in the next commit would make the code totally unreadable
	if the #ifdef'ing were maintained.

	It might make a lot of sense to split if_cx.c in a netgraph related
	and in a tty related file but I will not attempt that without hardware.
	----------------------------
	revision 1.32
	date: 2004/09/23 12:21:11;  author: phk;  state: Exp;  lines: +0 -13
	Remove bogus cdevsw frobbing code which tries to prevent double
	loading of modules.

	MODULE_VERSION() should be used for this I belive.
2005-02-07 21:57:02 +00:00
Roman Kurakin d871f10ba9 MFC: -j 1.16 -j 1.19
revision 1.19
	date: 2004/12/13 22:07:23;  author: rik;  state: Exp;  lines: +213 -47
	Make code MPSAFE.

	You could turn this off by debug.mpsafenet=0 for full network
	stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
	ctau(4) accordingly.

	MFC after:	10 days
	----------------------------
	revision 1.18
	date: 2004/12/10 05:54:45;  author: rik;  state: Exp;  lines: +5 -320
	Clean up from '#if __FreeBSD_version'.
	----------------------------
	revision 1.17
	date: 2004/12/03 16:57:15;  author: rik;  state: Exp;  lines: +4 -2
	Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
	to privent running of PPP's state machine in non PPP mode.

	MFC: after 3 days.
	----------------------------
	revision 1.16
	date: 2004/09/23 12:21:11;  author: phk;  state: Exp;  lines: +0 -13
	Remove bogus cdevsw frobbing code which tries to prevent double
	loading of modules.

	MODULE_VERSION() should be used for this I belive.
2005-02-07 21:50:36 +00:00
Roman Kurakin df6b614613 MFC: -j 1.13 -j 1.17
revision 1.17
	date: 2004/12/14 23:13:08;  author: rik;  state: Exp;  lines: +1 -1
	Bring back ability to use FR support with sppp from Cronyx.
	----------------------------
	revision 1.16
	date: 2004/12/13 22:07:23;  author: rik;  state: Exp;  lines: +259 -68
	Make code MPSAFE.

	You could turn this off by debug.mpsafenet=0 for full network
	stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
	ctau(4) accordingly.

	MFC after:	10 days
	----------------------------
	revision 1.15
	date: 2004/12/11 05:38:16;  author: rik;  state: Exp;  lines: +5 -357
	Clean up from '#if __FreeBSD_version'.
	----------------------------
	revision 1.14
	date: 2004/12/03 16:57:15;  author: rik;  state: Exp;  lines: +4 -2
	Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
	to privent running of PPP's state machine in non PPP mode.

	MFC: after 3 days.
	----------------------------
	revision 1.13
	date: 2004/09/23 12:21:10;  author: phk;  state: Exp;  lines: +0 -13
	Remove bogus cdevsw frobbing code which tries to prevent double
	loading of modules.

	MODULE_VERSION() should be used for this I belive.
2005-02-07 21:33:40 +00:00
Gleb Smirnoff 1fbaa45148 Do a hacked MFC of rev. 1.59. Accept messages from userland if their version
macthes NG_VERSION or 0. There was a bug in libnetgraph, when messages were
sent with version of 0. The bug was fixed in msg.c rev 1.9.2.1. With this
commit we do not break ABI during RELENG_5 lifetime, and also protect from
using older and newer APIs. It is also important, that NG_VERSION has never
been 0.

This gentle kind of fix was suggested by scottl.
2005-02-07 19:50:34 +00:00
Sam Leffler d14ec87171 MFC 1.5:
o replace out-of-line copy of FCS w/ a flag that indicates the
  frame includes FCS (requires applications to be updated, but since
  we weren't doing the out-of-line FCS stuff anyway app changes
  were needed already)
o add a flag to indicate padding exists between the 802.11 header and
  the payload (e.g. for Atheros cards)
o diff reducation against netbsd
2005-02-07 18:10:17 +00:00
Sam Leffler a4b3b48e92 MFC 1.11:
o disable pci retry timeout to avoid problems when operating in C3 state
  (fix imported from madwifi by Takanori Watanabe)
o eliminate save/restore of pci registers handled by the system
o eliminate duplicate zero of the softc (noted by njl)
o consolidate common code
2005-02-07 18:01:28 +00:00
cvs2svn 53d7d47edd This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-02-07 11:26:54 +00:00
Gleb Smirnoff cc6f4fbec4 MFC 1.10:
When we have converted an ASCII message to binary, set its version in
  the header. Otherwise we will send a message with zero version.
2005-02-07 07:45:29 +00:00
Robert Watson 077c6d01ec Merge ip_input.c:1.295 from HEAD to RELENG_5:
date: 2005/01/30 19:29:47;  author: rwatson;  state: Exp;  lines: +9 -9
  Prefer (NULL) spelling of (0) for pointers.
2005-02-06 23:35:17 +00:00
Robert Watson 8b05d98b81 Merge if_fxp.c:1.222 from HEAD to RELENG_5:
date: 2005/01/29 23:13:20;  author: rwatson;  state: Exp;  lines: +1 -1
  Disable ethernet flow control in if_fxp by default, in order to prevent
  unexpected surprises when a system panics or is left in the debugger.

  Requested by:   kris
2005-02-06 23:34:13 +00:00
David Schultz 6d4b496e52 MFC src/bin/mkdir/mkdir.c,v 1.29:
Don't read the byte at *argv[strlen(*argv) + 1].

  PR:		71743
2005-02-06 17:34:57 +00:00
Ian Dowse ac29e971cf MFC: 1.14; add axe(4) devices to the USB ethernet regular expression. 2005-02-06 17:11:56 +00:00
Christian S.J. Peron 676474e13a MFC v1.88
FreeBSD src repository

  Modified files:
    sys/netinet          ip_fw2.c
  Log:
  Change the state allocator from using regular malloc to using
  a UMA zone instead. This should eliminate a bit of the locking
  overhead associated with with malloc and reduce the memory
  consumption associated with each new state.

  Reviewed by:    rwatson, andre
  Silence on:     ipfw@
  MFC after:      1 week
2005-02-06 16:16:20 +00:00
David E. O'Brien aad6e16ac7 Quite booting by hiding GIANT-LOCKED and INTR_FAST behind verboseboot.
(note coding style chosen to reduce diffs to 6-CURRENT)
2005-02-06 13:33:33 +00:00
David E. O'Brien a78972ae40 Correct the English. 2005-02-06 12:56:27 +00:00
David E. O'Brien fe39673cb7 Style nit. 2005-02-06 12:56:10 +00:00
Doug White 084556c768 Use ttymalloc() for proper struct tty initialization.
Driver should work again on RELENG_5. Tested on PCI Xem w/ 16 port EBI.

PR:		kern/72436
Submitted by:	Peter Jeremy <[email protected]>
Testing hardware sponsored by:	Looksmart
2005-02-05 23:42:58 +00:00
Jeff Roberson 8362eafa0b - Correct slightly botched MFC.
Pointy hat:	me
Diligent reporting:	Jon Noack
2005-02-05 17:05:37 +00:00
Xin LI 8392a14114 MFC 1.144+1.145 by gibbs@: Correct two off-by-one in the calculation
of the inquiry additional length field and inquiry buffer length.

This has fixed my Adaptec 39320A cards when connecting with some
disk arraies that is configured with multiple LUNs that is mapped
in one channel, which represents as "transmission error", and
strange timeouts, and only the first device is detected.
2005-02-05 14:31:30 +00:00
Bruce M Simpson 78346beb1e MFC rev 1.7:
Add a note about the slot number not necessarily indicating the physical
  location of a PCI device in the system chassis.
  Remove the note about PAE.
  Update document date.
  Update my email address.
  Update copyright.
2005-02-05 09:27:20 +00:00
Bruce M Simpson d60282e3be MFC rev 1.114:
Pass through the commands necessary to format USB floppy devices,
  from within umass_ufi_transform(). This includes the 12-byte commands
  FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES
  (sorted in numerical order).
2005-02-05 09:23:13 +00:00
Bruce M Simpson f6db6409e8 MFC rev 1.6:
Add necessary data structures and definitions for the 12-byte SCSI
  commands READ_FORMAT_CAPACITIES, WRITE_AND_VERIFY, and VERIFY.
2005-02-05 09:19:04 +00:00
Bruce M Simpson 8eaa7bb715 MFC rev 1.12:
Add mode page 0x1b, "Removable Block Access Capacities". This mode page is
  implemented by USB floppy devices using the UFI command set.
2005-02-05 09:16:29 +00:00
Bruce M Simpson bba291590f MFC rev 1.48:
Add PCI ID for Dell RAC III Virtual UART.

MFC rev 1.49:
  Add PCI ID for Dell RAC IV/ERA Virtual UART.
2005-02-05 09:06:35 +00:00
Jeff Roberson d8342456ec - Correct a bad merge job.
Pointy hat to me.
2005-02-05 08:09:02 +00:00
David Schultz d32fc56a94 MFC:
2004-11-20 02:28:15 UTC
  user.h is included only to get pcb.h, so use the latter directly instead.
2005-02-05 01:04:53 +00:00
David Schultz cd664da337 MFC:
2004-11-20 02:32:15 UTC
  Update the comment about what NO_SWAPPING does.
2005-02-05 01:04:49 +00:00
David Schultz 5f1c40ac11 MFC:
2004-11-20 23:00:59 UTC
  Remove local definitions of RANGEOF() and use __rangeof() instead.
  Also remove a few bogus casts.
2005-02-05 01:04:45 +00:00
David Schultz af8730a1d8 MFC:
2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.
2005-02-05 01:02:51 +00:00
David Schultz c5362a2340 MFC:
2004-11-22 03:15:21 UTC
  Remove some information that only applies to the old a.out core dump format.
2005-02-05 01:02:37 +00:00
David Schultz 937a43deaf MFC:
2004-11-20 02:33:05 UTC
  Remove the declaration of uarea_pages.
2005-02-05 01:02:34 +00:00
David Schultz e770e787b3 MFC:
2004-11-20 02:32:50 UTC
  Remove the p_uarea and p_upages_obj fields from struct proc.
  Prototype new routines to allocate, copy, and free pstats.

In the MFC, p_uarea and p_upages_obj are replaced with placeholders to
avoid changing the struct proc ABI.
2005-02-05 01:02:31 +00:00
David Schultz 84efca3433 MFC:
2004-11-20 02:32:42 UTC
  Remove the uarea column from the DDB 'ps' display, and from grog's gdb
  scripts.
2005-02-05 01:02:28 +00:00
David Schultz 28c5d31854 MFC:
2004-11-20 02:32:04 UTC
  Maintain the broken state of backwards compatibilty for a.out (and
  PECOFF!) core dumps.  None of the old versions of gdb I tried were
  able to read a.out core dumps before or after this change.

  2004-11-27 06:46:45 UTC
  Axe the semblance of support for PECOFF and Linux a.out core dumps.
2005-02-05 01:02:16 +00:00
David Schultz 3dc2d8ea68 MFC:
2004-11-20 02:32:04 UTC
  Maintain the broken state of backwards compatibilty for a.out (and
  PECOFF!) core dumps.  None of the old versions of gdb I tried were
  able to read a.out core dumps before or after this change.

  2004-11-27 06:46:59 UTC
  Axe a.out core dump support.  Neither older gdb binaries nor current
  bfd sources understand the present format.
2005-02-05 01:02:12 +00:00
David Schultz 56138c5d72 MFC:
2004-11-20 02:31:46 UTC
  We don't do U area swapping anymore, so update some comments.  Also,
  prototype the new routine that creates a mock U area for a.out core
  dumps.

  2004-11-27 06:46:59 UTC
  Axe a.out core dump support.  Neither older gdb binaries nor current
  bfd sources understand the present format.
2005-02-05 01:02:09 +00:00
David Schultz 8a2ed9f156 MFC:
2004-11-20 02:31:00 UTC
  Remove references to U area and garbage collect includes.
2005-02-05 01:02:05 +00:00
David Schultz 77afd85f1f MFC:
2004-11-27 06:46:48 UTC
  Remove a.out support from gcore(1).
2005-02-05 01:02:00 +00:00
David Schultz 1b2731fe6c MFC:
2004-11-20 02:30:02 UTC
  gcore(1) apparently still cares about a.out core dumps, so it still
  needs to know that a 1-page U area is part of the dump format.

  2004-11-27 06:46:48 UTC
  Remove a.out support from gcore(1).
2005-02-05 01:01:57 +00:00
David Schultz 153bad3538 MFC:
2004-11-20 02:29:50 UTC
  Remove UAREA_PAGES.
2005-02-05 01:01:54 +00:00
David Schultz 2d8f31bde1 MFC:
2004-11-20 02:29:25 UTC
  U areas are going away, so don't allocate one for process 0.

  2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.
2005-02-05 01:01:48 +00:00
David Schultz d09240938c MFC:
2004-11-20 02:29:25 UTC
  U areas are going away, so don't allocate one for process 0.
2005-02-05 01:01:40 +00:00
David Schultz b44e8f12dc MFC:
2004-11-20 02:29:00 UTC
  Disable U area swapping and remove the routines that create, destroy,
  copy, and swap U areas.

  2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.
2005-02-05 01:01:19 +00:00
David Schultz 92abe59100 MFC:
2004-11-20 02:29:00 UTC
  Disable U area swapping and remove the routines that create, destroy,
  copy, and swap U areas.
2005-02-05 00:59:57 +00:00
David Schultz b4ec08ec15 MFC:
2004-11-20 02:28:48 UTC
  Malloc p_stats instead of putting it in the U area.  We should consider
  simply embedding it in struct proc.

  2004-11-20 23:00:59 UTC
  Remove local definitions of RANGEOF() and use __rangeof() instead.
  Also remove a few bogus casts.

  2004-11-27 06:46:59 UTC
  Axe a.out core dump support.  Neither older gdb binaries nor current
  bfd sources understand the present format.
2005-02-05 00:59:49 +00:00
David Schultz 2b69bce1c5 MFC:
2004-11-20 02:28:48 UTC
  Malloc p_stats instead of putting it in the U area.  We should consider
  simply embedding it in struct proc.

  2004-11-20 23:00:59 UTC
  Remove local definitions of RANGEOF() and use __rangeof() instead.
  Also remove a few bogus casts.

  2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.
2005-02-05 00:59:46 +00:00
David Schultz 753a84cbec MFC:
2004-11-20 02:28:48 UTC
  Malloc p_stats instead of putting it in the U area.  We should consider
  simply embedding it in struct proc.

  2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.
2005-02-05 00:59:42 +00:00
David Schultz 83613a2294 MFC:
2004-11-20 02:28:26 UTC
  In preparation to remove U areas, don't refer to p_uarea in libkvm.
2005-02-05 00:59:37 +00:00
John Baldwin d2971b13a6 MFC: Allow the dragon and screen savers to be statically compiled into the
kernel and add them to NOTES.
2005-02-04 22:11:38 +00:00
John Baldwin 02c54052ff MFC: Workaroud MP Tables that use global APIC destination IDs for interrupt
entries but only have one I/O APIC.
2005-02-04 22:08:55 +00:00
John Baldwin 3a221c979d MFC: Don't create new-bus resources for ACPI extended IRQ resources that
are producers rather than consumers.
2005-02-04 22:07:18 +00:00
Jeff Roberson 19a2bce60e - MFC r1.146 sched_class() fix. 2005-02-04 20:13:21 +00:00
Jeff Roberson 9dfd7ac7cd - MFC KTR_SCHED/schedgraph support. 2005-02-04 20:11:59 +00:00
Jeff Roberson b3ab018bff - MFC r1.26 support for schedgraph. 2005-02-04 19:59:43 +00:00
Jeff Roberson 50dd989a8e - MFC removal of the unused ke_oncpu field. 2005-02-04 19:54:25 +00:00
Jeff Roberson 1b7fe051cf - MFC rev 1.135 - 1.140. This fixes ULE with PREEMPTION and KSE. 2005-02-04 19:49:10 +00:00
John Baldwin db881d543a MFC Most of the various fixes and changes to libpthread from HEAD to 5.x
including:

Pull debug symbols in for statically linked binaries.

gcc -O2 cleanups.

Don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is defined.

If a system scope thread didn't set a timeout, don't call the clock_gettime
system call before and after sleeping.

Add missing reference count drops to close a memory leak.

Save cancelflags in signal frame.

Use a generic way to back threads out of wait queues when handling
signals instead of having more intricate knowledge of thread state
within signal handling.

Simplify signal code because of above (by David Xu).

Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop().  This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.

When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.

Use private mutexes for libc and libpthread.  Signals are
deferred while threads hold private mutexes.  This fix breaks
an internal system ABI that old versions of the
www/linuxpluginwrapper port depend on.  Upgrading that port to the
latest version will fix that.

Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).

Don't panic when sigsuspend is interrupted by a cancellation.
2005-02-04 16:17:55 +00:00
John Baldwin 6617cd296c MFC: Check unhandled signals before thread marks itself as DEAD;
this reduces chances of losing a signal.
2005-02-04 16:07:33 +00:00
Yaroslav Tykhiy 4f26f8c9aa MFC 1.21-1.23:
Update the list of VLAN-aware interface types.
Revise the part on VLAN support in physical interfaces.
Bump the document date since its content has changed.
2005-02-04 11:43:14 +00:00
Christian Brueffer 728c5b48c7 MFC: rev. 1.5 by maxim
Remove an unnecessary .It.
2005-02-04 09:42:29 +00:00
Hajimu UMEMOTO ecda35eedb MFC 1.40: make _getipnodebyname_multi() static. 2005-02-04 08:06:13 +00:00
Hajimu UMEMOTO e6b1c1a6ed MFC 1.57: use strdup(). 2005-02-04 08:04:05 +00:00
Suleiman Souhlal d9300ee529 MFC 1.64:
Get rid of a NULL dereference when oid is too long.

  Reviewed by:    keramida
  Approved by:    grehan (mentor)

Approved by:	grehan (mentor)
2005-02-04 06:06:19 +00:00
Marcel Moolenaar ec5f4262e4 MFC rev 1.10: Fix a logic bug that caused DSR to never be deasserted. 2005-02-04 03:35:58 +00:00
Marcel Moolenaar 14e3c9ccb2 MFC rev 1.11: Fix the various interrupt related problems. 2005-02-04 03:35:09 +00:00
Christian S.J. Peron 0ad486dea0 MFC netinet/raw_ip.c v.144
fix up socket/ip layer violation...  don't assume/know that
SO_DONTROUTE == IP_ROUTETOIF and SO_BROADCAST == IP_ALLOWBROADCAST

This appears to fix a bug where under certain conditions sendto(2)
will fail with EHOSTUNREACH (No route to host) while sending data
to machines on the local network via raw sockets.
2005-02-04 03:22:06 +00:00
Scott Long 015a8b0621 MFC: Remove the inconsistent isp and ispfw entries. 2005-02-03 23:11:21 +00:00
John Baldwin c2dce2a750 MFC: 1.5: Make sure the first argument to the user function is 16-byte
aligned.
2005-02-03 21:29:42 +00:00
Bruce M Simpson 753c7007cc MFC rev 1.23:
When performing IP fast forwarding, immediately drop traffic which is
 destined for a blackhole route.

 This also means that blackhole routes do not need to be bound to lo(4)
 or disc(4) interfaces for the net.inet.ip.fastforwarding=1 case.

Submitted by:   james at towardex dot com
Sponsored by:   eXtensible Open Router Project <URL:http://www.xorp.org/>
2005-02-03 14:16:47 +00:00
Ruslan Ermilov 8768c5fa8b MFC: Document ASCII version of NGM_ETHER_GET_IFNAME. 2005-02-03 13:35:02 +00:00
Brian Somers 9fa8038ba5 Mention possible upgrade issues with the latest ppp(8) modifications. 2005-02-03 13:33:25 +00:00
Ruslan Ermilov 3227d0ad68 MFC. No functional changes, except supporting an ASCII version
of NGM_EIFACE_GET_IFNAME ("getifname").
2005-02-03 13:12:58 +00:00
Yoshihiro Takahashi 8b4838418b MFi386: revision 1.29.2.1. 2005-02-03 11:06:42 +00:00
Brian Somers c2ec09a792 MFC: - Add ``enable/disable echo'' and don't do fall back to sending echo
requests when lqr fails by default (PR 74821)
     - Add radius_Flush() and call it before trying to send RAD_STOP messages
     - Update the slcompress.[ch] copyright
     - Fix some signed/unsigned types and add a const or two
     - Remove various unused arguments
     - Add __unused where appropriate
     - Send both NAS-IP-Address and NAS-Identifier but make them configurable
     - Fix a reference-after-free error when deleting datalink chains
     - Fix an offset error when emitting the content of packets
     - Add comments to explain why we use strlen()
     - Optimise out two socket() calls
     - Use MAX_FSM_OPT_LEN instead of 24
     - Check some returns from malloc and fix some alignment issues (PRs 59995
       & 71592)
     - Pad static structures out with explicit NULLs
     - #define NOALIAS -> NONAT
     - Document ${var} and ~ and fix a SEE ALSO xref
     - Bump to version 3.4.2 (from 3.2)

Hopefully this also fixes PR 38058.
2005-02-03 10:49:18 +00:00
Pawel Jakub Dawidek 7c13fd6928 MFC: geom_mbr.c 1.64
Protect against recursive slices creation in simlar way as it is done
in BSD class, ie. if provider below us uses the same metadata, don't
create slices based on the metadata.
This allows to create slices on geoms with rank != 1 without hacks.

Discussed with:	phk
Approved by:	phk
2005-02-03 10:16:02 +00:00
Hajimu UMEMOTO 3e24f131d6 MFC: implement AI_NUMERICSERV (as defined in RFC3493).
src/include/netdb.h:		1.33
	src/lib/libc/net/getaddrinfo.c:	1.56
2005-02-03 07:47:55 +00:00
Hajimu UMEMOTO 3027636fc4 MFC 1.55: fill ai_canonname field for numeric hostname, by the given
hostname.  follow new recommendation in RFC3493.
2005-02-03 07:44:57 +00:00
Hajimu UMEMOTO a1d1dfd4fb MFC 1.54: query A RR before AAAA RR. 2005-02-03 07:41:06 +00:00
Warner Losh 0433373636 MFC: Only match ethernet functions 2005-02-03 00:36:06 +00:00
Warner Losh cacbcc7e5c MFC:
o Lots of pccard updates: all my fe pccards now work
o Fix some style issues and namespace polution
o Use macro to determine if the MAC address is a broadcast/multicast one or
  not.
2005-02-03 00:34:46 +00:00
Warner Losh 91fac61579 MFC:
Add new O2Micro card
Don't complain when we can't attach a device.  It is a silly warning.
2005-02-03 00:32:01 +00:00
Warner Losh a27221a3ea MFC: Various style fixes, as well as CIS3, CIS4 support and old-style
(or fe specific, not entirely sure) nic address parsing.
2005-02-03 00:30:02 +00:00
Warner Losh 82ac537e2a MFC: Catch up with the changes to the pccarddevs, plus a few
additional devices.
2005-02-02 22:54:18 +00:00
Warner Losh 43b2d2fed8 MFC: IODATA -> IODATA3 to reflect pccarddevs 2005-02-02 22:51:17 +00:00
Warner Losh c076dbaf40 MFC: Merge all the tweaks to PC Card vendor/devices from current. 2005-02-02 22:50:03 +00:00
Warner Losh 85bf39ef3a MFC: Merge the fixes for the DL10019, DL10022 and Ax88[17]90 based
pccards.  Also slight cleanup of the pccard devices.
2005-02-02 22:46:13 +00:00
Warner Losh 093f825733 MFC: u_intXXt -> uintXX_t changes, tweaks to boot messages. These are
effectively nops, but do reduce differences with head.
2005-02-02 22:44:25 +00:00
Poul-Henning Kamp 5a5694c6b6 MFC:
1.10: Hardlink the generated /etc/fstab to /conf/base/etc/fstab
where it is also needed.

1.11: Fix geometry calculation for media where the cylindersize is not
sufficiently magic.
2005-02-02 20:48:15 +00:00
Yaroslav Tykhiy 692f13708e MFC 1.34:
Document the user-controlled VLAN_MTU capability of fxp(4).
Bump .Dd accordingly.
2005-02-02 10:46:51 +00:00
Scott Long e61a52626a MFC: Add a do-nothing device to consume the exposed SCSI channels that are
used by ROMB controllers.
2005-02-02 06:44:24 +00:00
Scott Long d9f4432b9b MFC: Don't set the BUS_DMA_ALLOCNOW flag for static allocations. 2005-02-02 06:43:01 +00:00
Warner Losh a6e340210c MFC: Add cs module to i386 platforms. 2005-02-01 21:51:02 +00:00
Warner Losh 3c5a0b46c6 MFC: Only match functions that are network interfaces, don't write interrupt
number if we don't have to (for pccard), minor eeprom format tweaks (but
more will be needed, not yet even in current).  Style cleanups.
2005-02-01 21:48:53 +00:00
Warner Losh 57fcd58906 MFC: u_intXX_t -> uintXX_t cleanup. Only match those card functions which
claim to be network.
2005-02-01 21:45:16 +00:00
Warner Losh 1227b7151a MFC: 1.11, 1.12: only match card functions that declare themselves to be
network interfaces.
2005-02-01 21:42:25 +00:00
Warner Losh b0375400e8 MFC: 1.28 Tweaks to pccard allocation routines These are mostly nops,
but do appear to have an effect.
2005-02-01 21:39:18 +00:00
Shunsuke Akiyama 8fd9e98d05 MFC: rev 1.11
Add support for new chips, PL-2303X and PL-2303HX.
Bump document date.
2005-02-01 13:39:52 +00:00
Shunsuke Akiyama f338b8d5a2 MFC: rev 1.26
- Add support for new chips, PL-2303X and PL-2303HX.
- Update comment about datasheet.
- Fix minor typo in sysctl variable description.
2005-02-01 13:37:16 +00:00
Robert Watson 4d1df4aa48 Merge pam_krb5.c:1.22 from HEAD to RELENG_5:
date: 2005/01/24 16:49:50;  author: rwatson;  state: Exp;  lines: +4 -0
  When "no_ccache" is set as an argument to the pam_krb5 module, don't
  copy the acquired TGT from the in-memory cache to the on-disk cache
  at login.  This was documented but un-implemented behavior.

  PR:                     bin/64464
  Reported and tested by: Eric van Gyzen <vangyzen at stat dot duke dot edu>
2005-02-01 11:06:34 +00:00
Warner Losh c9769f3ab5 MFC: /*- and related license changes 2005-01-31 23:27:04 +00:00
Maxim Konovalov 8326343eee MFC rev. 1.88: FreeBSD 4.11 2005-01-31 18:50:47 +00:00
Yaroslav Tykhiy 612158e866 MFC 1.18: Document the recent change to the default status of VLAN support in em(4). 2005-01-31 10:18:52 +00:00
Nate Lawson 9180b5f906 Be conservative and don't power down by default until after 5.4R.
Discussed with imp@ and scottl@.
2005-01-31 06:28:36 +00:00
Brian Somers 5aa958079b MFC: Align allocated mbufs correctly and CTASSERT that their size is a power
of 2.

Reminded by:	rwatson
2005-01-31 02:55:39 +00:00
Robert Watson f6e90a7ddb Merge raw_cb.c:1.32 from HEAD to RELENG_5:
date: 2005/01/24 22:56:09;  author: rwatson;  state: Exp;  lines: +2 -0
  Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket control
  block from the global raw socket list.

  Submitted by:   Roselyn Lee <rosel at verniernetworks dot com>
2005-01-31 00:46:30 +00:00
Giorgos Keramidas 145c27b7ab MFC: 1.29
EISCONN may be returned by sendto() if an attempt is made to specify the
destination address to a datagram socket that is already connected.

Submitted by:	Rudolf Cejka <[email protected]>
PR:		docs/76399
MFC after:	1 week
2005-01-31 00:27:01 +00:00
Marcel Moolenaar e20c43d919 MFC rev. 1.313:
Improvement over rev 1.312 (and its MFC'd equivalent 1.306.2.3).
2005-01-30 23:33:16 +00:00
Marcel Moolenaar 5c0aeff2f3 MFC rev. 1.109:
Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.
2005-01-30 23:24:42 +00:00
Scott Long 78a3ed6c10 MFC locking, speed improvements, dumpsys support.
Sponsored by: ImproWare AG, Switzerland
2005-01-30 22:41:12 +00:00
Wilko Bulte 5e6f940b90 add em(4) 2005-01-30 21:27:13 +00:00
Xin LI cb3dad7a4b Last commit has removed U area which does not seem to be part of the
MFC, so fix build by temporarily putting it back.

Reported by:	tinderbox
2005-01-30 14:32:16 +00:00
Xin LI 1c5368f378 MFC revision 1.277
date: 2004/12/26 07:30:35;  author: jeff;  state: Exp;  lines: +4 -5
 - Run sched_userret() after thread_userret().  Before, sched_userret() would
   lower the priority of the returning thread to a user priority before
   calling into thread_userret() which would call wakeup() which in turn would
   cause the returning thread to eventually context switch rather than
   completing its slice.  Allowing this thread to complete its slice first
   yields a 15% performance improvement in super-smack on my dual opteron with
   4BSD.

This commit also containes rev. 1.278's style change.

I've been running RELENG_5 with this change for two weeks.
2005-01-30 13:37:25 +00:00
Ceri Davies 5f9470bc80 MFC revision 1.13:
s/ntpdate_command/ntpdate_program/ to match rc.conf(5) and
	/etc/defaults/rc.conf.

Approved by:	murray (mentor)
2005-01-30 13:23:44 +00:00
Ceri Davies 41b2b16bfa MFC the result of revisions 1.42 and 1.43:
Fix syntax error encountered with two DHCP consuming removable
	interfaces.

Approved by:	murray
2005-01-30 13:22:03 +00:00
Robert Watson db3a9bb573 Merge main.c:1.30 from HEAD to RELENG_5:
date: 2004/10/22 14:57:28;  author: simokawa;  state: Exp;  lines: +2 -0
  Respect RB_MULTIPLE flag.
2005-01-30 12:22:08 +00:00
Robert Watson f26cf789ae Merge loader.rc:1.3 from HEAD to RELENG_5:
date: 2004/12/06 05:30:31;  author: imp;  state: Exp;  lines: +1 -1
  The 'start' command processes loader.conf variables, not loader.rc.
  Fix comment to match.
2005-01-30 12:18:26 +00:00
Robert Watson b0ccaf92ab Merge load.c:1.5 from HEAD to RELENG_5:
date: 2004/08/22 08:57:05;  author: maxim;  state: Exp;  lines: +4 -5
  Trim EOL white spaces.
2005-01-30 12:11:15 +00:00
Robert Watson 8427097e3b Merge load.c:1.4 from HEAD to RELENG_5:
date: 2004/08/22 08:56:01;  author: maxim;  state: Exp;  lines: +1 -1
  Check a return code from read(2) correctly.

  PR:             kern/70815
  Submitted by:   info [at] haakh.de
2005-01-30 12:05:50 +00:00
Robert Watson ce451f6d8f Merge exception.S:1.121 from HEAD to RELENG_5:
date: 2005/01/21 05:56:40;  author: peter;  state: Exp;  lines: +1 -1
  MFi386: whitespace, copyright header, etc updates
2005-01-30 11:58:12 +00:00
Robert Watson 7495b6bf98 Minor style tweak to remove a gratuitous inconsistency between the RELENG_5
and HEAD versions of this file, introduced in change 1.37.
2005-01-30 11:53:28 +00:00
Pawel Jakub Dawidek a0bcd4cb8a MFC: gbde 1.12
Add a comment which explain why we need to use special function instead of
tr(1)/sed(1)/awk(1).
2005-01-30 11:05:01 +00:00
Pawel Jakub Dawidek 8511f519ca MFC: gbde 1.10, 1.11
Fix handling of providers with / in their names (e.g. mirror/foo).
2005-01-30 10:54:32 +00:00
Marcel Moolenaar f75e0b9c26 Bring back a line that was accidentally lost in previous commit. 2005-01-30 06:16:37 +00:00
Yaroslav Tykhiy 8c5eb8ac85 MFC 1.58, 1.59:
- Always respect IFCAP_VLAN_HWTAGGING.
- By default, disable VLAN processing in hardware since we are not ready yet
  to handle all aspects of using it together with promiscuous mode.

Agreed with:	rwatson
2005-01-30 06:05:12 +00:00
Robert Watson 6803dd15a5 Merge random.h:1.34 from HEAD to RELENG_5:
date: 2004/10/12 14:55:59;  author: rwatson;  state: Exp;  lines: +4 -0
  Add a note ahea of the esource enum that if new entropy source
  categories are added, the set of entropy source assertions in the
  harvesting code also need to be updated.
2005-01-30 03:10:42 +00:00
Robert Watson 2c669361fb Merge mbuf.h:1.163 from HEAD to RELENG_5:
date: 2004/10/12 20:18:27;  author: glebius;  state: Exp;  lines: +1 -1
  Fix comment: since move from mballoc to mbuma, the allocation functions live
  in kern_mbuf.c, not subr_mbuf.c
2005-01-30 03:06:22 +00:00
Robert Watson 1587e07745 Merge mac_policy.h:1.56 from HEAD to RELENG_5:
date: 2004/10/22 11:29:30;  author: rwatson;  state: Exp;  lines: +15 -4
  Expand comments on various sections of the MAC Framework Policy API,
  as well as document the properties of the mac_policy_conf structure.
  Warn about the ABI risks in changing the structure without careful
  consideration.

  Obtained from:  TrustedBSD Project
  Sponsored by:   SPAWAR
2005-01-30 03:04:47 +00:00
Robert Watson 79a80bd1a1 Merge ktr.h:1.23 and geom_io.c:1.64 from HEAD to RELENG_5:
date: 2004/10/21 18:35:24;  author: rwatson;  state: Exp;  lines: +2 -1
  date: 2004/10/21 18:35:24;  author: rwatson;  state: Exp;  lines: +26 -0
  Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuring
  in the g_up and g_down threads.  Each time a bio is propelled up and
  down the stack, an event is generating showing the provider, offset,
  and length, as well as thread wakeup and work status information.
2005-01-30 03:02:10 +00:00
Robert Watson bc49787781 Merge majors.c:1.204-1.205 from HEAD to RELENG_5, modulo a slight wording
tweak because 5.x is neither 4-STABLE nor -CURRENT:

  date: 2004/12/27 18:21:39;  author: imp;  state: Exp;  lines: +3 -0
  Add note about where major numbers are now assigned

  date: 2004/12/27 18:58:57;  author: imp;  state: Exp;  lines: +1 -1
  nos->now typo reported by njl
2005-01-30 02:32:17 +00:00
Robert Watson dfaa0524b9 Merge cam_periph.c:1.57 from HEAD to RELENG_5:
date: 2004/08/30 20:14:21;  author: gibbs;  state: Exp;  lines: +1 -1
  Correct a typo in a comment: alloation->allocation

  Reported by: Jens Schweikhardt <[email protected]>
2005-01-30 02:30:26 +00:00
Robert Watson a823c65d7f Merge if_sfreg.h:1.12 from HEAD to RELENG_5:
date: 2004/11/17 23:33:56;  author: brueffer;  state: Exp;  lines: +1 -1
  Add missing /* DEVICE_POLLING */
2005-01-30 02:13:12 +00:00
Marcel Moolenaar 46b748cd3e MFC rev. 1.11: Fix handling of post increment. 2005-01-30 01:20:44 +00:00
Warner Losh 5b26fb7044 MFC: /*- and my license changes for sys/[a-d]* 2005-01-30 01:00:13 +00:00
Robert Watson bc57bbf9bb Merge kern_prot.c:1.190-1.191 from HEAD to RELENG_5:
date: 2005/01/23 21:01:00;  author: rwatson;  state: Exp;  lines: +0 -4
  When reading pr_securelevel from a prison, perform a lockless read,
  as it's an integer read operation and the resulting slight race is
  acceptable.

  date: 2005/01/23 21:11:39;  author: rwatson;  state: Exp;  lines: +2 -4
  Style cleanup: with removal of mutex operations, we can also remove
  {}'s from securelevel_gt() and securelevel_ge().
2005-01-30 00:35:48 +00:00
Robert Watson 8f25320d76 Merge kern_mib.c:1.72-1.73 from HEAD to RELENG_5:
date: 2005/01/23 20:59:19;  author: rwatson;  state: Exp;  lines: +4 -5
  When retrieving the current per-jails securelevel for a sysctl read,
  don't acquire the prison mutex, as it's an integer read and races
  here don't make a difference.

  date: 2005/01/30 00:31:19;  author: rwatson;  state: Exp;  lines: +1 -1
  Fix spelling of integer in a comment.

  Beady eyes:     ceri
2005-01-30 00:33:36 +00:00
Eric Anholt e1d7573f85 MFC r1.25-r1.26: Add support for the E7205, and don't pretend that we can
generically support Intel AGP chipsets.
2005-01-30 00:29:25 +00:00
Eric Anholt e7de994afc MFC r1.12-1.15: Fix hangs due to aperture size misdetection, add the other PCI
ID, and don't attempt "generic" support.
2005-01-30 00:28:02 +00:00
Gleb Smirnoff dc8bd0d67c MFC 1.5:
- Use ng_callout() instead of home-grown implementation.

  Submitted by:   emax
2005-01-29 23:42:37 +00:00
Gleb Smirnoff c5b231e80c MFC 1.13:
- Use ng_callout() instead of home-grown implementation.

  Submitted by:   emax
2005-01-29 23:41:24 +00:00
Gleb Smirnoff e8e6dd3d8f MFC 1.35:
Use ng_callout() and ng_uncallout() instead of home-grown
  implementation.

  Tested by:      Savchuk Taras
  Reviewed by:    archie
  Approved by:    julian (mentor)
2005-01-29 23:36:29 +00:00
Robert Watson 3ecd39569e Merge if_bge.c:1.80 from HEAD to RELENG_5:
date: 2004/11/08 19:27:00;  author: phk;  state: Exp;  lines: +7 -5
  Hide link up/down/media printfs behind bootverbose
2005-01-29 23:34:55 +00:00
Gleb Smirnoff ed1a8d8572 Sync with HEAD, MFC 1.68-1.71:
1.68-1.69:
  Rename debug macro to DBG and indent it properly.
1.70:
  - Use ng_callout() instead of timeout()
  - remove spl(9) calls
1.71:
  /* -> /*- for license, minor formatting changes
2005-01-29 23:33:54 +00:00
Robert Watson 44aa649e2c Merge if_lge.c:1.35 from HEAD to RELENG_5:
date: 2004/11/08 19:21:57;  author: phk;  state: Exp;  lines: +3 -2
  Hide link up/down/media printfs behind bootverbose
2005-01-29 23:30:45 +00:00
Robert Watson 14c8005083 Merge if_nge.c:1.69 from HEAD to RELENG_5:
date: 2004/11/08 19:21:35;  author: phk;  state: Exp;  lines: +4 -3
  Hide link up/down/media printfs behind bootverbose
2005-01-29 23:29:56 +00:00
Robert Watson 0f4038454d Merge if_de.c:1.160 from HEAD to RELENG_5:
date: 2004/11/08 19:20:55;  author: phk;  state: Exp;  lines: +2 -1
  Hide link up/down/media printfs behind bootverbose
2005-01-29 23:29:04 +00:00
Gleb Smirnoff 1ea62882ba MFC 1.53:
- Use ng_callout() instead of timeout(9).
  - Do not put/remove node references, since this no longer
    needed.
  - Remove timerActive flag, use callout flags.
  - Schedule next callout after doing current one.

  Reviewed by:    archie
  Approved by:    julian (mentor)
2005-01-29 23:28:10 +00:00
Gleb Smirnoff db594172e7 MFC 1.14:
- Use ng_callout() instead of callout_reset(9).
  - Use callout_pending() instead of our own flags.
  - Remove home-grown protection of node, which has a scheduled
    callout().
  - Remove spl(9) calls.

  Tested by:      bz
2005-01-29 23:24:51 +00:00
Gleb Smirnoff 076776b9f4 MFC: 1.39, 1.41
Return 0, not NULL, from a function declared as returning int.

  Remove a check that never returns true, because in this case we have panic
  before the check.
2005-01-29 23:22:01 +00:00
Gleb Smirnoff 7b6f1bbc69 MFC 1.29:
- Use ng_callout() instead of timeout.
  - Schedule next timeout *after* finishing job of the current one.
  - Remove spl(9) calls.

  Tested by:      ru
  Reviewed by:    julian
2005-01-29 23:17:09 +00:00
Gleb Smirnoff 8f1541aa98 MFC 1.88:
Assert queue mutex in ng_dequeue() and ng_queue_rw().
2005-01-29 23:14:55 +00:00
Robert Watson c5991d042d Merge ip_input.c:1.288 from HEAD to RELENG_5:
date: 2004/09/15 20:17:03;  author: andre;  state: Exp;  lines: +4 -4
  Clarify some comments for the M_FASTFWD_OURS case in ip_input().
2005-01-29 23:04:00 +00:00
Robert Watson e6abb2e9f0 Merge if_vlan.c:1.75 and if_vlan.c:1.76 from HEAD to RELENG_5:
date: 2005/01/23 23:10:33;  author: yar;  state: Exp;  lines: +2 -2
  Reduce the global name space pollution.
  The cloner structure isn't referenced by name outside this file.

  date: 2005/01/24 15:48:00;  author: yar;  state: Exp;  lines: +1 -1
  Fix spelling in a comment.
2005-01-29 22:44:56 +00:00
Robert Watson 49472b1462 Merge if_sl.c:1.123 and if_sl.c:1.126 from HEAD to RELENG_5:
date: 2004/08/22 21:32:52;  author: rwatson;  state: Exp;  lines: +15 -38
  Style update: use newer style function prototypes in if_sl.c in
  prep for merging locking.

  date: 2004/08/30 04:48:52;  author: yar;  state: Exp;  lines: +1 -2
  Use an ANSI-style definition for slstart()
  in accord with the rest of the file.
2005-01-29 22:41:58 +00:00
Robert Watson 7381b9170a Merge if.h:1.93 from HEAD to RELENG_5:
date: 2004/11/17 18:32:44;  author: jmg;  state: Exp;  lines: +1 -1
  sync comment on IFF_OACTIVE with reality..  IFF_OACTIVE is set when the
  hardware cannot take anymore packets, and so will supress the calling of
  the device's if_start method...

  Submitted by:   bde
2005-01-29 22:38:00 +00:00
Robert Watson c68bfc9ff1 Merge bridge.c:1.87 from HEAD to RELENG_5:
date: 2005/01/11 10:47:51;  author: keramida;  state: Exp;  lines: +1 -1
  Fix a typo in a comment that may be confusing if one doesn't really
  check what the code does.  Separators are spaces, commas or tabs;
  not '*' characters (as one may assume by reading the old comment).
2005-01-29 22:36:28 +00:00
Robert Watson e48da8f41f Merge strvalid.c:1.4 from HEAD to RELENG_5:
date: 2005/01/29 13:04:04;  author: rwatson;  state: Exp;  lines: +0 -3
  Per permission from McAfee, remove clause 3 of the BSD license on
  strvalid.c.
2005-01-29 22:33:00 +00:00
Robert Watson 67a0971742 Merge kern_xxx.c:1.45 from HEAD to RELENG_5:
date: 2004/10/22 12:10:50;  author: rwatson;  state: Exp;  lines: +2 -4
  In osethostname(), don't need to call suser() directly as
  userland_sysctl() will perform all necessary privilege checks for
  the caller.
2005-01-29 21:59:32 +00:00
Robert Watson f94e68256d Merge kern_mtxpool.c:1.10 from HEAD to RELENG_5:
date: 2005/01/06 23:34:38;  author: imp;  state: Exp;  lines: +24 -4
  Expand COPYRIGHT inline, per Matthew Dillon's earlier approval.
2005-01-29 21:50:57 +00:00
Robert Watson 388052568e Merge ugidfw.c:1.3 from HEAD to RELENG_5:
date: 2004/10/21 11:22:07;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove unnecessary include of vnode.h.

  Requested by:   phk
2005-01-29 20:44:10 +00:00
Robert Watson db74486739 Merge ugidfw.c:1.7 from HEAD to RELENG_5:
date: 2004/10/21 11:21:13;  author: rwatson;  state: Exp;  lines: +12 -13
  Modify libugidfw(3) to use MBI_* permission flags from mac_bsdextended.h
  instead of using the V* permission flags from vnode.h.  Remove include
  of vnode.h.

  Requested by:   phk
2005-01-29 20:42:47 +00:00
Robert Watson 58a650993d Merge mac_bsdextended.c:1.22-1.23 and mac_bsdextended.h:1.4-1.5 from HEAD
to RELENG_5:

  date: 2004/10/21 11:19:02;  author: rwatson;  state: Exp;  lines: +59 -33
  date: 2004/10/21 11:19:02;  author: rwatson;  state: Exp;  lines: +15 -0
  Modify mac_bsdextended policy so that it defines its own vnode access
  right bits rather than piggy-backing on the V* rights defined in
  vnode.h.  The mac_bsdextended bits are given the same values as the V*
  bits to make the new kernel module binary compatible with the old
  version of libugidfw that uses V* bits.  This avoids leaking kernel
  API/ABI to user management tools, and in particular should remove the
  need for libugidfw to include vnode.h.

  Requested by:   phk

  date: 2004/10/21 11:29:56;  author: rwatson;  state: Exp;  lines: +1 -1
  date: 2004/10/21 11:29:56;  author: rwatson;  state: Exp;  lines: +1 -1
  Bump copyright dates for NETA on these files.
2005-01-29 20:36:30 +00:00
Robert Watson e1663fe048 Merge mac_biba.c:1.83, mac_lomac.c:1.33, mac_mls.c:1.68, mac_stub.c:1.44,
mac_test.c:1.52 from HEAD to RELENG_5:

  date: 2005/01/26 23:43:32;  author: rwatson;  state: Exp;  lines: +0 -1
  date: 2005/01/26 23:43:32;  author: rwatson;  state: Exp;  lines: +1 -30
  date: 2005/01/26 23:43:32;  author: rwatson;  state: Exp;  lines: +0 -1
  date: 2005/01/26 23:43:32;  author: rwatson;  state: Exp;  lines: +0 -9
  date: 2005/01/26 23:43:32;  author: rwatson;  state: Exp;  lines: +1 -13

  Remove policy references to mpo_check_vnode_mprotect(), which is
  currently unimplemented.

  Update copyrights.

  Pointed out by: csjp

Update copyrights to reflect year, NETA->McAfee change.
2005-01-29 20:31:44 +00:00
Robert Watson fa165b7c7e Merge mac_label.c:1.3 from HEAD to RELENG_5:
date: 2004/10/22 11:08:52;  author: rwatson;  state: Exp;  lines: +3 -1
  In the MAC label zone destructor, assert that the label is only
  destroyed in an initialized state.
2005-01-29 20:19:57 +00:00
Robert Watson 4f9509d80d Merge mac_internal.h:1.112 from HEAD to RELENG_5:
date: 2004/10/22 11:07:18;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove extern declaration of mac_enforce_sysv, as it's not present in
  the CVS version of the MAC Framework.
2005-01-29 20:18:32 +00:00
Marcel Moolenaar 0fdecdf115 MFC 1.312: Unbreak the MAKEOBJDIRPREFIX variable check by avoiding
bugs in make(1). For a complete explanantion, see the commit log
of rev. 1.312.
2005-01-29 19:57:36 +00:00
Nate Lawson bb0009d899 MFC: Enable power state support for ACPI and PCI devices for suspend and
resume.
2005-01-29 19:52:40 +00:00
Nate Lawson 53e29cc919 MFC 1.268 and 1.272: Don't power down base peripherals and enable power
states by default.
2005-01-29 19:47:12 +00:00
Andrey A. Chernov c68c60b13c MFC: fix EINVAL settings for 0x and document nonportability 2005-01-29 03:44:54 +00:00
Matt Jacob 58c53751a7 MFC: 6312 support 2005-01-29 02:42:58 +00:00
Matt Jacob e2dbd09f41 6312 support 2005-01-29 02:42:14 +00:00
Pawel Jakub Dawidek df0343727e MFC: ffs_vfsops.c:1.269
Fix ACLs handling for the root file system.
Without this fix, when ACLs are set via tunefs(8) on the root file system,
they are removed on boot when 'mount -a' is called, because mount(8)
called for the root file system always add MNT_UPDATE flag and MNT_UPDATE
flag isn't perfect.
Now, one cannot remove ACLs stored in superblock (configured with tunefs(8))
via 'mount -a' nor 'mount -u -o noacls <file system>', but it is still
possible to mount file system which doesn't have ACLs in superblock via
'mount -o acls <file system>' or /etc/fstab's 'acls' option.

Reported by:	Lech Lorens/pl.comp.os.bsd
Discussed with:	phk, rwatson
Reviewed by:	rwatson
2005-01-29 00:58:36 +00:00
Wilko Bulte 5fc36957cc we shipped at least one 5.x already with ncr(4) commented out in favor
of sym(4).  Remove the commented-out ncr altogether.
2005-01-28 23:25:12 +00:00
Sam Leffler ed4b3d9599 Merge support for 795x parts from HEAD:
o rework pll setup code to follow h/w specification
  o add hint.hifn.X.pllconfig to specify reference clock setup
    requirements; default is pci66 which means the clock is
    derived from the PCI bus clock and the card resides in a
    66MHz slot

  Tested on 7955 and 7956 cards; support for 7954 cards not enabled
  since we have no cards to test against.

  In collaboration with Poul-Henning Kamp.

Reviewed by:	phk
2005-01-28 16:40:53 +00:00
Daniel Hartmeier 2894ecd5b2 MFC 1.26: Use the packet's address family instead of the rule's when
selecting a replacement address for an rdr rule. Some rdr rules
          have no address family (when the replacement is a table and no
          other criterion implies one AF). In this case, pf would fail to
          select a replacement address and drop the packet due to
          translation failure.
2005-01-28 13:42:29 +00:00
Hajimu UMEMOTO d97667cd4e MFC 1.55: we don't need to make fake sockaddr_in6 to compare subject
address.
2005-01-28 09:11:03 +00:00
Nate Lawson fd614b9afb MFC v1.198: Probe devices from \ (root) since some systems put PCI link
devices there.  Since the new PCI irq routing code hasn't been MFCd yet,
this shouldn't affect any systems.
2005-01-27 20:55:11 +00:00
Hajimu UMEMOTO 638c59867e MFC 1.15: we are not OLD_BPF system. 2005-01-27 15:44:49 +00:00
Hajimu UMEMOTO f06ccefc10 MFC 1.44-1.46:
- fix typo.
  - remove HAVE_OLD_BPF part.
  - don't see NBPFILTER.
2005-01-27 15:43:54 +00:00
Gleb Smirnoff 463182b32a MFC 1.93:
Fix an evil typo.

  Submitted by:   Roselyn Lee
2005-01-27 07:49:04 +00:00
Gleb Smirnoff 60baba140b MFC:
Use log() instead of printf(), to reduce flood on console.
2005-01-27 07:47:24 +00:00
Peter Edwards d95a273cf6 MFC 1.13
Only update the boot sector when there is a valid drive number provided.
2005-01-26 19:11:21 +00:00
Robert Watson 574ab9acf7 MFC syscall_timing tool. 2005-01-26 17:27:44 +00:00
Robert Watson 5b987c8784 Merge pam_krb5.c:1.5 from HEAD to RELENG_5:
date: 2005/01/24 16:49:50;  author: rwatson;  state: Exp;  lines: +4 -0
  When "no_ccache" is set as an argument to the pam_krb5 module, don't
  copy the acquired TGT from the in-memory cache to the on-disk cache
  at login.  This was documented but un-implemented behavior.

  PR:                     bin/64464
  Reported and tested by: Eric van Gyzen <vangyzen at stat dot duke dot edu>
2005-01-26 11:25:00 +00:00
Robert Watson c8613e291f Merge mac_get.c:1.5 from HEAD to RELENG_5:
date: 2005/01/23 15:28:02;  author: rwatson;  state: Exp;  lines: +1 -1
  Minor white space tweak.
2005-01-26 11:23:40 +00:00
Robert Watson 3fec77e30c Merge mac_lomac.h:1.4 from HEAD to RELENG_5:
date: 2005/01/23 14:26:09;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove an obsoleted comment about struct versions.

  Pointed out by: trhodes
2005-01-26 11:21:51 +00:00
Yoshihiro Takahashi e884d64fb7 MFi386: revision 1.37.2.1. 2005-01-26 09:38:26 +00:00
Bill Paul f26a7919b1 Merge recent changes from -current (start of IRP/MDL support for USB,
icc compiler fixes).
2005-01-25 17:12:12 +00:00
Roman Kurakin d6a37abe1a MFC:
=============================================================================
	RCS file: /home/ncvs/src/sys/net/if_spppsubr.c,v
	----------------------------
	revision 1.118
	date: 2005/01/07 01:45:34;  author: imp;  state: Exp;  lines: +2 -1
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.117
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +38 -12
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

	PR:		kern/21771, kern/66348
	----------------------------
	revision 1.116
	date: 2004/12/14 18:18:54;  author: rik;  state: Exp;  lines: +0 -2
	Kill double inclusion for <netinet/in.h> and <netinet/in_systm.h>.
	----------------------------
	revision 1.115
	date: 2004/12/12 14:54:15;  author: rik;  state: Exp;  lines: +229 -110
	Make sppp MPSAFE.
	MPSAFE could be turned off by IFF_NEEDSGIANT.

	Silence on: net@, current@, hackers@.
	No objections: joerg

	=============================================================================
	RCS file: /home/ncvs/src/sys/net/if_sppp.h,v
	----------------------------
	revision 1.27
	date: 2005/01/07 01:45:34;  author: imp;  state: Exp;  lines: +2 -1
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.26
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +13 -2
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

	PR:		kern/21771, kern/66348
	----------------------------
	revision 1.25
	date: 2004/12/12 14:54:15;  author: rik;  state: Exp;  lines: +8 -2
	Make sppp MPSAFE.
	MPSAFE could be turned off by IFF_NEEDSGIANT.

	Silence on: net@, current@, hackers@.
	No objections: joerg
	----------------------------

	=============================================================================
	RCS file: /home/ncvs/src/sys/conf/files,v
	----------------------------
	revision 1.976
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +2 -0
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

	PR:		kern/21771, kern/66348

	=============================================================================
	RCS file: /home/ncvs/src/sys/modules/sppp/Makefile,v
	----------------------------
	revision 1.6
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +1 -1
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

	PR:		kern/21771, kern/66348
2005-01-25 16:26:25 +00:00
Roman Kurakin 8bbd91ad15 MFC:
revision 1.2
	date: 2005/01/07 01:45:35;  author: imp;  state: Exp;  lines: +1 -1
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.1
	date: 2004/12/28 00:07:57;  author: rik;  state: Exp;
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

	PR:		kern/21771, kern/66348
2005-01-25 15:24:45 +00:00
Suleiman Souhlal fee7fa3654 MFC 1.57:
Get the vnode from file.f_vnode instead of file.f_data.

  Nowadays, f_data points to the vnode only if the underlying filesystem
  doesn't use it for other purposes (devfs uses it to store the cdev,
  for example).

  Found by:       csjp
  Reviewed by:    csjp
  Approved by:    phk, wes, grehan (mentor)
  MFC after:      1 week

Approved by:	grehan (mentor)
2005-01-25 14:45:23 +00:00
Ruslan Ermilov 10f721aa17 MFC: libpam is now standard. 2005-01-25 09:39:17 +00:00
Ruslan Ermilov ccb3129606 MFC: Latest mdoc(7) fixes. 2005-01-25 09:36:25 +00:00
Gleb Smirnoff 99d58d531c MFC 1.68:
Don't print extra " via ", if we have already printed one. While here,
  slightly style brackets.

  PR:             misc/75297
2005-01-25 07:23:34 +00:00
Warner Losh 70dd2dbee8 remove obsolete comment 2005-01-25 02:30:24 +00:00
Colin Percival b6bf98ded4 MFC revision 1.53:
Add -frandom-seed=RepeatabilityConsideredGood to CFLAGS for building this
  library.  As the value suggests, this allows the library to be built
  repeatably; without this flag, gcc uses a random value in its parsing.
2005-01-24 15:49:52 +00:00
Brian Somers 0d12f0bc1e MFC: Adjust the mail reject output so that it gives an abreviated reason
for the reject.
2005-01-24 14:44:47 +00:00
Brian Somers d8cc5f6441 MFC: Don't descend into directories when -d is set and the directory itself
doesn't match.

PR:		28095
2005-01-24 14:03:23 +00:00
Brian Somers 78e48f6942 MFC: Fix some signed/unsigned comparisons. Fix prototypes while I'm here.
PR:		28890
2005-01-24 13:58:14 +00:00
Brian Somers 64552778ea MFC: Include opt_bootp.h for BOOTP_NFSROOT
PR:		73183
2005-01-24 13:50:04 +00:00
Mike Silbersack 0b9e95c8d8 MFC rev 1.183; fix panic when too many pipes are allocated. 2005-01-24 09:03:27 +00:00
Warner Losh be577225e1 MFC: 1.19
Properly calculate the offset in mapping.  This fixes many
	problems, most notably with 3Com cards.
2005-01-24 06:58:16 +00:00
Scott Long 221e01e791 MFC: Check to make sure the adapter is still running if commands start timing
out.
2005-01-23 16:16:51 +00:00
Robert Watson 39cf107469 Merge ipx_pcb.c:1.41 from HEAD to RELENG_5:
date: 2005/01/09 04:47:42;  author: rwatson;  state: Exp;  lines: +2 -2
  In ipx_setsockaddr(), use M_WAITOK instead of M_NOWAIT so that the
  call always succeeds, avoiding causing the caller to return success
  even though the returned *sockaddr is NULL.
2005-01-23 14:44:08 +00:00
Robert Watson af92076a3e Merge ipx_input.c:1.43 from HEAD to RELENG_5:
date: 2005/01/09 04:39:16;  author: rwatson;  state: Exp;  lines: +14 -13
  Eliminate jump to 'bad' label in order to clean up the ipx_input()
  return/unwind path for locking work.
2005-01-23 14:42:35 +00:00
Shunsuke Akiyama edb57cc517 MFC: revision 1.56
Fix USB serial device stalled after tcflush() was called.
2005-01-23 11:42:28 +00:00
Gleb Smirnoff 98b6244237 MFC:
1.5: Scheduled mdoc(7) sweep.
  1.6: log(9) requires sys/syslog.h
2005-01-23 10:08:45 +00:00
Julian Elischer df1b572457 Revert a bit of the last MFC that reflects changes not
relavent to 5.x.
2005-01-23 08:53:55 +00:00
Julian Elischer 9a202fa880 MFC to bring in line with -current version
PR:	usb/76240
Submitted by:	Claude Buisson <[email protected]>
2005-01-23 06:48:06 +00:00
Christian Brueffer 80372fb1b0 MFC: rev. 1.31
- list the 3Com 3c920B-EMB-WNM as supported.
- bump .Dd
2005-01-23 00:24:14 +00:00
Robert Watson d17cec628e Rapid merge subr_witness.c:1.187 from HEAD to RELENG_5:
date: 2005/01/22 21:14:21;  author: rwatson;  state: Exp;  lines: +2 -0
  When DDB is not defined, don't implement witness_thread_has_locks() and
  witness_proc_has_locks(), as they are unused, which results in a compiler
  error.  This problem was introduced with the implementation of "show
  alllocks".

  Spotted by:     Artem Kuchin <matrix at itlegion dot ru>
2005-01-22 21:15:21 +00:00
Wilko Bulte 8c83b3ef3d s/principals/principles/
Fortune was duplicated, remove one copy.
2005-01-22 20:17:29 +00:00
Robert Watson 9414eb7ee0 Merge kern_acct.c:1.73 from HEAD to RELENG_5:
date: 2005/01/08 04:45:57;  author: rwatson;  state: Exp;  lines: +12 -1
  In acct_process(), do a lockless read of acctvp to see if it's NULL
  before deciding to do more expensive locking to account for process
  exit.  This acceptable minor race avoids two mutex operations in
  that highly common case of accounting not being enabled.
2005-01-22 19:22:08 +00:00
Robert Watson cc121697f0 Merge if_xl.c:1.183 and if_xlreg.h:1.51 from HEAD to RELENG_5:
date: 2005/01/03 19:22:37;  author: rwatson;  state: Exp;  lines: +5 -1
  date: 2005/01/03 19:22:37;  author: rwatson;  state: Exp;  lines: +1 -0

  Add PCI and device ID's to if_xl to support:

    3C920B-EMB-WNM Integrated Fast Ethernet Controller

  Submitter reports that the card appears to autonegotiate properly, and
  operate well with high levels of NFS traffic.

  PR:             75253
  Submitted by:   "Oleg V. Nauman" <oleg at reis dot zp dot ua>
2005-01-22 19:19:54 +00:00
Robert Watson 3970537e13 Merge mac_seeotheruids.c:1.7 from HEAD to RELENG_5:
date: 2005/01/03 12:08:18;  author: rwatson;  state: Exp;  lines: +3 -0
  Exempt the superuser from mac_seeotheruids checks.

  Submitted by:   bkoenig at cs dot tu-berlin dot de
  PR:             72238
2005-01-22 19:18:15 +00:00
Robert Watson 287f8bb5d9 Merge ipc_pcb.c:1.37 from HEAD to RELENG_5:
date: 2005/01/02 01:51:18;  author: rwatson;  state: Exp;  lines: +3 -3
  Use 'NULL' in preference to '0' for pointer comparisons.
2005-01-22 19:16:56 +00:00
Robert Watson f3688be27c Merge sysv_msg.c:1.55 from HEAD to RELENG_5:
date: 2004/12/30 13:56:34;  author: rwatson;  state: Exp;  lines: +4 -2
  Make the sysctls kern.ipc.msgmnb and kern.ipc.msgtql into tunables as
  is the case for most other sysctls in the System V IPC message queue
  implementation.

  PR:             75541
  Submitted by:   Sergiy Vyshnevetskiy <serg at vostok dot net>
2005-01-22 19:14:08 +00:00
Yaroslav Tykhiy a4e35e2809 MFC 1.203: Respect the logging level. 2005-01-22 16:40:11 +00:00
Roman Kurakin 82480803b4 MFC: -j 1.26 -j 1.27
Kill a half dead comment. It's first half was killed in rev 1.12.

	MFC after:      3 days

MFC: -j 1.25 -j 1.26
	Fix creation on "dlciX" hook in ng_sample.

	Approved by:    julian
	MFC after:      3 days

MFC: -j 1.24 -j 1.25
	Fix counting length of leadin for hook name (sizeof () => strlen ()).

	Approved by:    julian
	MFC after:      3 days
2005-01-21 19:39:10 +00:00
Roman Kurakin 803210fb8c MFC: -j 1.11 -j 1.12
Fix variable name in comment num=>alen. (Lost part of commit rev 1.2)

	MFC after:      3 days
2005-01-21 19:32:32 +00:00
Roman Kurakin 39942a020f MFC: -j 1.21 -j 1.23
Fix comment. Code 0x95 means locking shift to codeset 5 according to
	T1.617 AnnexD.
	Locking shift procedure is described in ANSI T1.607.

	MFC after:      3 days

Add-on: codeset 5 is a codeset for national use according Q.xxx standards.
	so this procedure is used for compatibility with ITU.
2005-01-21 19:29:25 +00:00
Daniel Hartmeier ab69096234 MFC 1.17: Prohibit ruleset changes at securelevel > 2, not > 1. It's
documented like this in init(8), but the code didn't match the
          documentation.

PR:		kern/76526
2005-01-21 19:07:44 +00:00
Roman Kurakin c9a9eda600 MFC: -j 1.15 -j 1.16
tsleep => msleep
	read sys/kern/kern_synch.c, msleep ():

		KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
		    ("sleeping without a mutex"));

	MFC after:      3 days
2005-01-21 18:31:25 +00:00
Christian Brueffer 18dbc19eb2 MFC: rev. 1.22
Typo fixes.
2005-01-21 15:19:44 +00:00
Christian Brueffer 2c3b5acd6a MFC: rev. 1.22
Capitalize Windows and fix a typo.
2005-01-21 15:19:03 +00:00
Peter Edwards 559bcde6c8 MFC version 1.9:
Fix thread support in corefiles.
2005-01-21 14:12:11 +00:00
Peter Wemm 341244a87d MFC: rev 1.171 (which mostly backed out 1.133 and followon fixup attempts).
Remove broken blocksize scaler now that statfs is 64 bit.
2005-01-21 01:28:04 +00:00
Max Laier e19fb30fbd MFC: if_sk.c, 1.94
ALTQ-support for sk(4)

	Thoroughly tested by:   Ender <ender NO tog SPAM net>
2005-01-21 00:50:51 +00:00
Paul Saab bf065d9f0b MFC rev 1.57: Remove 6422, V100 and add the P600. 2005-01-20 22:56:55 +00:00
Pawel Jakub Dawidek 0e17b8bd52 MFC: Fix arguments syntax.
Manual pages fixes by:	ru
2005-01-20 21:49:52 +00:00
Simon L. B. Nielsen d63529f1d7 Add FreeBSD-SA-04:17.procfs.
Noticed by:	maack_ @ #bsd-dk via Flemming Jacobsen
OK'ed by:	hrs
2005-01-20 12:47:13 +00:00
Gleb Smirnoff 587be578dd MFC 1.8:
Don't do setuid checks on file systems mounted with noexec option.

  Reviewed by:    brian, ru
2005-01-20 10:04:53 +00:00
Colin Percival 87112acd1f MFC revision 1.70: Add sysutils/portsnap onto the list of desired
packages.

Approved by:	scottl
2005-01-19 21:09:38 +00:00
Yaroslav Tykhiy 2456962edf MFC 1.201: Use syslog(3) instead of err(3) when a daemon.
A daemon has no stderr to send its complains to.
2005-01-18 21:56:30 +00:00
Xin LI 7d0e785ebf MFC revision 1.37
date: 2005/01/12 04:06:31;  author: brian;  state: Exp;  lines: +4 -4
	Don't reprint file names unnecessarily.

	PR:             75028
	Submitted by:   mteterin at 250-217 dot customer dot cloud9 dot net
	MFC after:      7 days

Approved by:	brian
2005-01-18 14:17:07 +00:00
Joerg Wunsch 56a526716f MFC: (rev 1.84) document the actual behaviour for displaying the `Total'
line.
2005-01-18 10:53:10 +00:00
Tom Rhodes d84db48464 MFC:
Various markup and spelling fixes.

PR:		75574
Submitted by:	Nobuyuki Koganemaru <[email protected]> (original version)
2005-01-18 04:59:04 +00:00
Tom Rhodes 0f40fa561d MFC:
Remnant code (broken, unhooked) from a.out which I missed.
2005-01-18 04:44:08 +00:00
Tom Rhodes 24a77d3af5 MFC:
Remove a.out runtime linker.  It doesn't build and was removed from the
build over two years ago by peter.

The binary a.out version of ld.so can be obtained from misc/compat22 or
src/lib/compat/compat22.
2005-01-18 04:43:02 +00:00
Tom Rhodes f6b461b162 MFC 1.8:
Wording nit.
2005-01-18 04:41:40 +00:00
Tom Rhodes 77b223cb9c MFC:
List RFCs under SEE ALSO.

PR:	46918
2005-01-18 01:47:36 +00:00
Tom Rhodes b259fe443a MFC:
S_ISVTX -> S_ISTXT to reflect the code.
2005-01-18 01:40:15 +00:00
Tom Rhodes def7dcd6c3 Remove FreeBSD RCS ID tags, they should not have been MFC'ed.
Poked by:	ru
2005-01-18 01:06:30 +00:00
Wilko Bulte 7877f4ba22 MFC:
Add support for Chase/Perle PCI FAST-4 4 port serial cards which appear
  to be the same as Boca Research Turbo Serial 654 (4 serial port).
  While add the 8 port variants as well.

  Submitted by: [email protected]
  PR: kern/75793
2005-01-17 21:09:27 +00:00
Bill Paul ff94932875 MFC changes from current:
- Prevent ndis_get_info()/ndis_set_info() from possibly sleeping on
  the same wait channel from two different threads
- Protect calls to MiniportQueryInformation()/MiniportSetInformation()
  with a spinlock
- Export ntoskrnl_init_spinlock() from subr_ntoskrnl
2005-01-17 18:20:23 +00:00
Xin LI bd79f8c742 MFC Paul's addition of support for following more than one file,
i.e.  tail -f file1 file2
2005-01-17 15:14:19 +00:00
Giorgos Keramidas a3f947176d MFC: 1.12
The `timep' argument of utime() is not an array of structs.
Make sure we don't confuse the reader by claiming it is.
2005-01-17 12:08:32 +00:00
Giorgos Keramidas aa90bdf453 MFC: 1.39 -> Better signal(3) prototype rendering.
1.40 -> mdoc nits
2005-01-17 12:06:50 +00:00
Giorgos Keramidas eb579902ea MFC: defaults/rc.conf -> 1.230, 1.231
rc.subr		-> 1.32, 1.33
     rc.d/tmp		-> 1.35
     rc.d/var		-> 1.35

Fix a minor, cosmetic typo of `rc.subr'.
Add two new rc.conf options: tmpmfs_flags and varmfs_flags.

These can be used to pass extra options to the mdmfs(8) utility,
to customize the finer details of the md file system creation
(i.e. to turn on/off softupdates, to specify a default owner for
md filesystem, etc).

Use these two new flags to mount tmpmfs and varmfs without
softupdates, since it doesn't make much sense to use SU on
malloc-backed file systems.
2005-01-17 11:51:00 +00:00
Giorgos Keramidas 048bce47fd MFC revision 1.31: mdoc(7) sweep by Ruslan. 2005-01-17 11:34:57 +00:00
David E. O'Brien 8a549550ad Ident the SMP kernel as SMP-GENERIC. 2005-01-17 10:27:21 +00:00
Stefan Farfeleder e25e747dfd MFC rev. 1.3:
Fix off-by-one error.
2005-01-17 10:10:30 +00:00
Sean Kelly 7138f71a52 Fix cognet's previous MFC so it builds.
It appears that part of 1.136 snuck into the MFC by accident. This fixes
the build on my system and for others on -stable as well.

Submitted by:	Jon Noack <[email protected]>
2005-01-16 12:42:07 +00:00
Olivier Houchard d62eb39793 MFC rev 1.139:
revision 1.138
date: 2005/01/09 17:42:03;  author: cognet;  state: Exp;  lines: +64 -64
Use uint32_t instead of u_long when appropriate.
That's enough to make my bt848 work on amd64.
2005-01-16 01:01:14 +00:00
David Schultz 5d7e8f40b7 MFC rev. 1.2:
s/isnormal/isfinite/ so subnormals are rounded correctly.
2005-01-15 22:59:35 +00:00
David Schultz 383b8481b7 MFC fenv.h:1.2,1.3:
Mark all inline asms as volatile.
2005-01-15 22:59:16 +00:00
David Schultz 0ee8431f1e MFC fenv.h:1.2:
Mark all inline asms as volatile.
2005-01-15 22:59:05 +00:00
David Schultz 974565f13f MFC s_log1p.S:1.8:
Remove unused file.
2005-01-15 22:58:46 +00:00
David Schultz 964ebc54ac MFC Makefile:1.54,1.57:
Add single-precision x86-optimized math routines.
  Implement [l]lrint[f]() and [l]lround[f]().
2005-01-15 22:58:30 +00:00
David Schultz e98103af4c MFC math.h:1.44,1.46:
Allow math.h to compile with versions of icc prior to 8.0.
  Add MI implementations of [l]lrint[f]() and [l]lround[f]().
2005-01-15 22:58:13 +00:00
David Schultz b9cfc94f2b MFC math.h:1.13,1.14,1.15,1.16:
Various content and markup updates.
2005-01-15 22:58:00 +00:00
David Schultz 2471eadb68 MFC round.3:1.3,1.4:
Cross reference lrint(3) and lround(3).  Whitespace.
2005-01-15 22:57:44 +00:00
David Schultz 2bce3974a1 MFC rint.3:1.11:
Cross-reference lrint(3) and lround(3).
2005-01-15 22:57:34 +00:00
David Schultz 8234fd488b MFC rev. 1.1:
Implement [l]lrint[f]() and [l]lround[f]().
2005-01-15 22:57:17 +00:00
David Schultz 832bccd6c8 MFC rev. 1.1:
Add single-precision x86-optimized math routines.
2005-01-15 22:56:55 +00:00
David Schultz c8e722ebf5 MFC swap_pager.c:1.263,1.264:
Close swapoff(2) races.
2005-01-15 22:56:43 +00:00
Garrett Wollman 8d2627ceb7 Insta-MFC IERS Bulletin C 29.
Obtained from:	International Earth Rotation Service
2005-01-15 21:54:52 +00:00
Nate Lawson 45a48b78f1 MFC: Add devclass_get_count(9) 2005-01-15 03:52:23 +00:00
Nate Lawson 8bca641469 MFC 1.1.1.23: Fix small memory leak with implicit return from _STA. 2005-01-15 03:48:14 +00:00
cvs2svn 6c7214a68e This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-01-15 03:32:29 +00:00
Garance A Drosehn 3a7f9e44ce MFC 1.6: Have 'lptest' stop when it gets an error writing to the printer.
[original commit done by phk]
2005-01-14 23:05:04 +00:00
Garance A Drosehn fe3224a4da MFC *: Get it so all parts of lpd, lpc, lpq, and lprm will use the same
algorithm when they calculate the job number for a job, based on the name
of the control-file.  This also uses a newer algorithm for determining a
job number, to avoid some problems caused when a control-file is named
using an IP address, instead of the hostname

[* = 1.34 common.c, 1.26 displayq.c, 1.25 lp.h, 1.5 matchjobs.c, 1.21 rmjob.c]
2005-01-14 22:25:49 +00:00
John Baldwin 2c4006f49d MFC: revision 1.237, various fixes for older MP systems that use a default
configuration.
2005-01-14 19:26:28 +00:00
Maksim Yevmenkin 3d790b85d8 MFC ng_btsocket_rfcomm.h v1.4 to RELENG_5
Make default RFCOMM session MTU match default L2CAP MTU.

This is just a workaround for a know problem with Motorola E1000
phone. Something is wrong with the configuration of L2CAP/RFCOMM
channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM
MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it,
the phone still sends oversized L2CAP packets. It appears that the
phone wants to use bigger (667 bytes) RFCOMM frames, but it does
not segment them according to the configured L2CAP MTU. The 667
bytes RFCOMM frame size corresponds to the default L2CAP MTU of
672 bytes (667 + 5 bytes RFCOMM frame header).

This problem only appears if connection was initiated from the
phone. I'm not sure who is at fault here, so for now just put
workaround in place. Quick look at the spec did not reveal any
anwser.
2005-01-14 18:14:51 +00:00
Christian Brueffer a25fe3fccc MFC: rev. 1.10
- list the Hama USB RS-232 Serial Adapter as supported
- bump .Dd
2005-01-14 12:27:26 +00:00
Pawel Jakub Dawidek 83da4bc5ac MFC: test-1.sh 1.2
Fix incorrect comment.
2005-01-14 10:06:04 +00:00
Ruslan Ermilov 5d1f13326c MFC: Sync with HEAD. 2005-01-14 09:55:41 +00:00
Ralf S. Engelschall b049e465cf MFC: revision 1.110
Fix the derivation of the GEOM name from the specified device name by
complementing the existing special case of a not existing /dev prefix
with the recognition of an already existing /dev prefix.

This implicitly solves the following two issues related to working on
GEOM devices /dev/foo/bar (which have the GEOM provider name "foo/bar")
with the expected commands like "bsdlabel /dev/foo/bar":

1. the error "Geom not found" when trying to write or edit the BSD
   label (because previously the incorrect GEOM name "bar" instead of
   "foo/bar" was derived from "/dev/foo/bar").

2. the multiple times reported "magically introduced" partition offset
   of 63 blocks and the resulting errors like "partition extends past
   end of unit" and "partition c doesn't start at 0!".

   This implicitly resulted because bsdlabel(8) determines the "MBR
   offset" via GEOM and (intentionally) silently falls back to an offset
   of 0 if it could not be queried (which is the case if the name was
   incorrectly derived).

   Usually (at least on PCs) the offset for the first slice is 63 blocks
   and bsdlabel(8) automatically subtracts them from the absolute
   offsets in the read on-disk BSD label, resulting in the display of an
   effective offset of 0. If the GEOM query fails, the assumed offset of
   0 is subtracted and an incorrect effective offset of 63 is displayed
   and tried to be worked upon.

Reviewed by: pjd
2005-01-14 07:47:32 +00:00
Garance A Drosehn ef8c13bacb MFC 1.10: Do more extensive checking of the userid field which is read in
from the control-file for each print job.  The main reason is to handle the
case where some remote host sends a print job where the given userid is an
uppercase-version of the real userid.  Now if lpd sees that in a job which
came from a remote host, it will check to see if the given userid is valid,
and if not it will make a lowercase version of it.
2005-01-14 05:54:53 +00:00
Ken Smith eb41a8e989 MFC v1.263:
Minor comment fix.
2005-01-14 00:43:19 +00:00
SUZUKI Shinsuke 706fe2bc71 MFC Rev 1.71
fixed an unexpected addr/port matching failure in IPv6 SA management

PR:		kern/72393
2005-01-13 22:32:26 +00:00
Brian Somers 60831e9d33 MFC: include "alias.h", not <alias.h> 2005-01-13 14:52:33 +00:00
Giorgos Keramidas 3b74d88aac MFC:
Fixes from Ruslan.  The versions merged are:
  DECLARE_GEOM_CLASS.9	1.4
  DECLARE_MODULE.9	1.9
  VFS_START.9		1.12
  VFS_STATFS.9		1.12
  VFS_SYNC.9		1.14
2005-01-13 13:45:52 +00:00
Giorgos Keramidas 02910874d9 Link EVENTHANDLER.9 to the build. 2005-01-13 13:41:46 +00:00
Giorgos Keramidas c1749aead4 MFC 1.112 and 1.113:
/usr/lib doesn't contain only archive (ar(1) style) libraries.  Shared
 libraries live there too.  Also point to ar(1) which contains a nice
 description of what an 'archive library' is.

 PR:		docs/76056
 Submitted by:	Enrique Matías Sanchez <[email protected]>
2005-01-13 10:54:25 +00:00
Diomidis Spinellis 47335dc995 MFC 1.16 (plug memory leak)
PR:		bin/75656
2005-01-13 08:41:36 +00:00
Gleb Smirnoff bd2de85bff MFC 1.34:
Make syslog(3) thread safe.

  PR:             bin/72394
  Submitted by:   Dan Nelson
  Reviewed by:    deischen
2005-01-13 07:26:29 +00:00
Hidetoshi Shimokawa 803cb5efc4 MFC rev 1.50:
Clear PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN for broken hardware.
2005-01-13 07:15:11 +00:00
Nate Lawson f699ca303f MFC 1.1.1.23: Fix implicit return for external methods (e.g., _STA) 2005-01-13 05:04:52 +00:00
Maksim Yevmenkin 4bbd12d5bd MFC parser.y v1.3 to RELENG_5
Fix typo %d -> %x

That should fix the problem with invalid PSM returned from bthidcontrol.
Pointy hat goes to me.

While I'm here change #include <libusbhid.h> to #include <usbhid.h>
2005-01-13 00:36:14 +00:00
Ken Smith 07b710eae3 MFC v1.37:
revision 1.37
  date: 2004/09/07 07:06:36;  author: phk;  state: Exp;  lines: +2 -1
  Make the alpha timecounter preferable to the i8254.

This might help fix a problem Kris is having with the package builders.
2005-01-13 00:34:32 +00:00
Eric Anholt 0363ca9212 MFC r1.12:
Create three additional X socket directories.  Using X applications when another
user owns these directories or the sticky bit is unset may open security holes,
so simply create them at startup with the correct owner/mode.
2005-01-12 22:36:36 +00:00
Ceri Davies 66e668834b MFC r1.17:
Add a usb category for USB PRs.
2005-01-12 20:06:24 +00:00
Ruslan Ermilov 82a4fae8b3 MFC: Fixed handling of manpage subdirectories and plug a memory leak. 2005-01-12 15:28:42 +00:00
Pawel Jakub Dawidek 15a16ac8c8 MFC: g_mirror.c 1.58
g_raid3.c	1.37

Increase default synchronization speed.
2005-01-12 11:42:16 +00:00
Maxime Henrion c2cb7b2b0d Merge if_fxp.c:1.221 from HEAD to RELENG_5:
date: 2005/01/04 19:30:14;  author: mux;  state: Exp;  lines: +1 -1
  Allow fxp(4) cards with a revision id of 0 to use the 82503 serial
  interface as well.  This is not an expected revision id per the
  datasheet, but unfortunately there are such cards out there with
  a 82557 chipset, and they want to use the 82503.

  PR:             kern/75739
  Reported by:    Andre Albsmeier <[email protected]>
2005-01-12 11:38:16 +00:00
Pawel Jakub Dawidek 8069fb45cc MFC: du.c 1.37
- Use 64bit 'fts_bignum' field instead of 32bit (on 32bit archs) field
  'fts_number' to remember number of blocks.
- Use %jd format when printing intmax_t values.
This makes du(1) 64bit-clean.

This work is part of the BigDisk project:

	http://www.FreeBSD.org/projects/bigdisk/

Discussed on:	arch@
2005-01-12 07:39:26 +00:00
Pawel Jakub Dawidek fbde336928 MFC: fts.h 1.11
fts.3	1.22

Introduce new field 'fts_bignum' which is 64bit long and will allow to
make utilities like du(1) 64bit-clean.
When this field is used, one cannot use 'fts_number' and 'fts_pointer'
fields.

This commit doesn't break API nor ABI.

This work is part of the BigDisk project:

	http://www.FreeBSD.org/projects/bigdisk/

Discussed on:		arch@
Manual page work from:	Peter Jeremy <[email protected]>
2005-01-12 07:35:09 +00:00
Tony Ackerman 07d00e9904 MFC: 1.55 and 1.56
PR:	kern/66634
2005-01-12 00:52:37 +00:00
Nate Lawson b4f634739e MFC: Bring up to HEAD with battery print changes and WARNS to 6. 2005-01-11 23:37:15 +00:00
Nate Lawson 57ab11dea3 MFC: Bring acpidb up to HEAD and set WARNS to 2. 2005-01-11 23:35:49 +00:00
Christian Brueffer bd3c66f8d2 MFC: rev. 1.26
Remove the LSI MegaRAID SATA 150-2, this is a SiL 3112 based software RAID
device.
2005-01-11 20:33:47 +00:00
Vinod Kashyap 0d712631f0 MFC to RELENG_5, recent changes corresponding to the 9.1.5.2 release of twa on
the 3ware website.

Reviewed by:re
Approved by:re
MFC after:5 days
2005-01-11 03:00:49 +00:00
Pawel Jakub Dawidek f24d49baa3 MFC: newfs.c 1.78
Cast to intmax_t when using %jd format.
2005-01-11 00:31:05 +00:00
Giorgos Keramidas 56b11edfeb MFC: The .Fn macro/function. 2005-01-10 23:51:38 +00:00
Giorgos Keramidas a08fa7a6df MFC 1.11:
- The .Fn macro and description of the `struct statfs' type of `sbp'.
- List of struct statfs fields that are related to file systems, much
  like the list in stat.2 for the userlevel `struct stat'.
- Bump document date.
2005-01-10 23:48:26 +00:00
Giorgos Keramidas 53ad8231b9 MFC 1.8: Trim excessively verbose sentence. 2005-01-10 23:47:20 +00:00
Giorgos Keramidas dcc41c24ad MFC 1.14: The VFS_MOUNT() macro expects only 2 arguments in the nmount
world (since revision 1.173 of src/sys/sys/mount.h).  Update its
prototype, the argument list description and bump the date.
2005-01-10 23:46:12 +00:00
Giorgos Keramidas 7b58fd75f5 MFC 1.6: Use a .Bl -tag list instead of plain .Pp paragraphs for
describing the macro arguments expected by SYSCALL_MODULE().
2005-01-10 23:45:00 +00:00
Giorgos Keramidas b13c537e6a MFC 1.8-1.9: Avoid overusing "these" by breaking a long sentence
in 2 smaller ones.
2005-01-10 23:43:39 +00:00
Giorgos Keramidas 2b7cbe20f4 MFC 1.6:
Convert the descriptions of module versions to an explicit list and note
that these versions numbers refer to moddepend, not the current module.
2005-01-10 23:39:18 +00:00
Giorgos Keramidas ba06853000 MFC 1.12: Properly cross-reference pccard(4). 2005-01-10 23:36:20 +00:00
Giorgos Keramidas 2214fb0ccc MFC 1.3:
. Use a -tag instead of an -inset list, which makes the arguments of the
  macro stand out more clearly.
. Various other wording fixes.
. Bump document date.
2005-01-10 23:34:51 +00:00
Giorgos Keramidas c4c3ea92db MFC: There is no VFS_INIT() macro. 2005-01-10 23:29:08 +00:00
Giorgos Keramidas 622ec151f1 MFC 1.8:
. Use a .Bl list for describing macro arguments.
. Various wordign fixes.
. Bump document date.
2005-01-10 23:10:51 +00:00
Giorgos Keramidas 14037604ea MFC 1.11:
Move the description of MNT_FORCE closer to mntflags and use a .Bl list
for the valid flag values.  This way, if VFS_UNMOUNT(9) supports more
flags in the future, adding a single list item is going to be easy and
all the flags are going to be in one place.
2005-01-10 23:08:56 +00:00
Giorgos Keramidas 6448817b94 MFC: The .Fn function. 2005-01-10 23:06:34 +00:00
Giorgos Keramidas 328731622e Add a manual page for the kernel's EVENTHANDLER facility. 2005-01-10 23:04:55 +00:00
Giorgos Keramidas 7309872403 MFC 1.5: Add missing .It in list tag. 2005-01-10 23:01:44 +00:00
Giorgos Keramidas 13ff6e75ab MFC 1.7: Fix .Nd description and bump document date. 2005-01-10 23:00:58 +00:00
Giorgos Keramidas 9ca5fe10c4 MFC 1.44: "non-spin" is better with a dash, than without. 2005-01-10 22:34:21 +00:00
Giorgos Keramidas 05f8bd3e23 MFC 1.30: Make an attempt at explaining why sx(9) locks cannot be safely
obtained after acquiring a mutex(9).
2005-01-10 22:24:12 +00:00
Marius Strobl 08f0dac385 MFC: 1.8
Use byteorder(9) functions to implement the [g,s]et[d,w][b,l]e macros so
only one set is needed for either endianess. This also completes them for
big endian archs and fixes the compilation of libncp, netncp, etc. there.
2005-01-10 21:16:44 +00:00
Maksim Yevmenkin 46d61e35e6 MFC to RELENG_5
Fix kernel crash when both Netgraph(4) framework and Netgraph
Bluetooth Drivers are compiled into the kernel.

Introduce new startup level SI_SUB_NETGRAPH that is after
SI_SUB_INIT_IF but before SI_SUB_DRIVERS. Make Netgraph(4)
framework initialize at SI_SUB_NETGRAPH level.

This does not address the bigger problem: MODULE_DEPEND
does not seem to work when modules are compiled into the
kernel, but it fixes the problem with Netgraph Bluetooth
device drivers reported by a few folks.

This should not have any impact on API/ABI and should not
break anything that was working before.
2005-01-10 18:21:26 +00:00
Alexey Zelkin 479b3da2db MFC: rev 1.40, fix redraw of checklist box while specifiyng manual dialog
size
2005-01-10 18:17:22 +00:00
Philip Paeps 59162eb22c MFC: moused.c r1.68 and r1.69
moused.8 r1.47

 date: 2004/10/11 07:57:08;  author: philip;  state: Exp;  lines: +102 -3
 Add 'virtual scrolling' support to moused(8).  When holding down the middle
 mouse button, motions are interpreted as scrolling.
2005-01-10 13:57:19 +00:00
Warner Losh 78c402ff90 MFC: spring cleaning 2005-01-10 08:37:54 +00:00
Colin Percival 37074ddbe4 MFC revision 1.44: Point out that tsleep(..., 0) is not permitted if the
Giant lock is not held.
2005-01-10 08:27:21 +00:00
Warner Losh f3872440ab MFC: spring cleaning 2005-01-10 08:02:03 +00:00
Robert Watson 4531b0a083 Merge ipx_usrreq.c:1.49 and ipx_var.h:1.21 from HEAD to RELENG_5:
date: 2005/01/03 12:54:31;  author: rwatson;  state: Exp;  lines: +2 -12
  date: 2005/01/03 12:54:31;  author: rwatson;  state: Exp;  lines: +0 -1
  Garbage collect unused ipx_abort().
2005-01-10 04:36:12 +00:00
Robert Watson c311e3a130 Merge ddp_pdb.c:1.46 from HEAD to RELENG_5:
date: 2005/01/03 00:16:07;  author: rwatson;  state: Exp;  lines: +3 -1
  If MALLOC() fails in at_pcballoc(), return ENOBUFS rather than
  potentially panicking.
2005-01-10 04:33:53 +00:00
Ruslan Ermilov e38ec901cd MFC: -p fixes. 2005-01-09 14:35:46 +00:00
Marcel Moolenaar 32686e1c61 MFC support.S:1.24, unaligned.c:1.10, md_var.h:1.21
Further enhance the handling of misaligned loads and stores.

PR: 72268
2005-01-09 05:47:12 +00:00
Wilko Bulte 37c3cfdd56 MFC:
- make machine model list more comprehensive, the whole Alpha family tree
should now be present
- clean up comment a bit
2005-01-08 19:13:36 +00:00
Pawel Jakub Dawidek f180c225f3 MFC: g_raid3.c 1.36
g_raid3.h	1.9
	g_raid3_ctl.c	1.7

- Fix 'rebuild' command - it can no longer relay on retaste event
  (we ignore it).
- Remove code used for handling spoil events, as spoiling is not possible
  anymore, because we keep consumers open for writing all the time.
2005-01-08 16:29:05 +00:00
Pawel Jakub Dawidek 9b4fbe6801 MFC: g_mirror.c 1.56,1.57
g_mirror.h	1.13,1.14
	g_mirror_ctl.c	1.7,1.8

- Fix 'rebuild' command (we ignore retaste event now, so don't relay on it).
- Spoiling is now not possible, because we keep consumers open for writing
  all the time. Remove unused code then.
2005-01-08 16:26:54 +00:00
Christian Brueffer 12776d065b MFC: rev. 1.17
- add new supported chips: 82541ER and 82546GB
- add the long supported, but still missing 82545
- change .Nd to look better (no need to mention FreeBSD there)
- bump .Dd
2005-01-08 03:09:25 +00:00
Maksim Yevmenkin 6eee0880c3 MFC to RELENG_5
Teach sdpd(8) about 32-bit and 128-bit uuid's.
2005-01-08 00:40:49 +00:00
Christian S.J. Peron 8e80cd47fe MFC v1.160
Log:
  Update the IPFW man page to reflect reality. mpsafenet=0 is no longer
  required when using ucred based rules.

  Pointed out by: seanc (thanks!)
2005-01-07 23:12:11 +00:00
Christian S.J. Peron 9214c7647c MFC v1.85
Log:
  This commit adds a shared locking mechanism very similar to the
  mechanism used by pfil.  This shared locking mechanism will remove
  a nasty lock order reversal which occurs when ucred based rules
  are used which results in hard locks while mpsafenet=1.

  So this removes the debug.mpsafenet=0 requirement when using
  ucred based rules with IPFW.

  It should be noted that this locking mechanism does not guarantee
  fairness between read and write locks, and that it will favor
  firewall chain readers over writers. This seemed acceptable since
  write operations to firewall chains protected by this lock tend to
  be less frequent than reads.

  Reviewed by:    andre, rwatson
  Tested by:      myself, seanc
  Silence on:     ipfw@
  MFC after:      1 month
2005-01-07 23:09:39 +00:00
Wilko Bulte 550b490f22 MFC:
Document slot specific location for base I/O board on AS600.

Thanks to: Charles Smeijer for getting me my AS600.
2005-01-07 21:11:08 +00:00
John Baldwin e8a1e54456 MFC: Various cleanups to the comments. 2005-01-07 21:00:18 +00:00
John Baldwin d887e37a19 MFC revision 1.12:
- If the COMSPEED is set to 0, then don't try to initialize the serial port
  and assume that the BIOS has set it up for us.  This allows folks with a
  serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to
  just use the existing settings.
- Purge some gratuitous cpp comments as per style(9).
2005-01-07 20:58:23 +00:00
John Baldwin 6d446e8aa3 MFC: Fix comments for serial I/O function prototypes. 2005-01-07 20:55:43 +00:00
John Baldwin ad76a0fcdf MFC: Add a new flag to the atkbd(4) driver to disable testing the keyboard
port during the device probe as this can cause hangs on some machines,
specifically Compaq R3000Z series amd64 laptops.  The flag is bit 3, or
0x8.
2005-01-07 20:36:00 +00:00
John Baldwin 3462c64c49 MFC: Don't allow ISO images to be made that try to use boot.flp to boot as
the boot.flp in 5.3 and later is not self-contained and thus not suitable
for CD booting.  /boot/cdboot is now the only way to boot the install CDs.
2005-01-07 20:32:13 +00:00
John Baldwin 134a73defe MFC: Allow individual application processors to be disabled from the
loader via hints for 'lapicX'.  For example, to disable the CPU with the
local APIC ID of 7, use 'hint.lapic.7.disabled=1'.
2005-01-07 20:30:01 +00:00
John Baldwin 7b310014ad MFC: Add Estonian keyboards. 2005-01-07 20:16:20 +00:00
John Baldwin 24102972e6 MFC: Bind the shutdown thread to the BSP on all archs. 2005-01-07 20:09:08 +00:00
John Baldwin 8d8ecb30e1 MFC more standard CPU ID support for Alpha:
- Add a new MD per-CPU field for Alpha 'pal_id' which is the PAL ID
  associated with each processor.  This ID is inferred from the index
  of the pcs structure in the hwprb.
- Give Alpha CPUs FreeBSD CPU IDs more like other architectures where the
  boot processor is always CPU 0 and the other processors are numbered
  1 ... N.  List active CPUs in the system in cpu_mp_announce() as well.
2005-01-07 20:07:42 +00:00
cvs2svn 95f2b745d4 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2005-01-07 19:41:01 +00:00
Wilko Bulte 97d87c0687 MFC:
Note that fdisk is not used on Alpha.
Remove outdated info on install media.

Submitted by: "William H. Magill" <[email protected]>
2005-01-07 19:38:19 +00:00
John Baldwin 3319eb5c33 MFC 1.32 and 1.33:
- Set the priority of the page zeroing thread using sched_prio() when the
  thread is created rather than adjusting the priority in the main
  function.  (kthread_create() should probably take the initial priority
  as an argument.)
- Only yield the CPU in the !PREEMPTION case if there are any other
  runnable threads.  Yielding when there isn't anything else better to do
  just wastes time in pointless context switches (albeit while the system
  is idle.)
2005-01-07 16:28:32 +00:00
Christian Brueffer 811f267a8a MFC: rev. 1.30
- some SATA controllers were erroneously marked as SCSI, correct that
- move those controllers into the right place
- bump .Dd
2005-01-07 02:57:49 +00:00
Christian Brueffer aa3a49f571 MFC: rev. 1.25
- list the LSI MegaRAID SATA 150-(2|4|6) controllers as supported
- mention SATA support in a few places
- AMI -> AMI/LSI for controllers now sold my LSI
- bump .Dd
2005-01-07 02:56:20 +00:00
Maksim Yevmenkin ff6db699fd MFC ng_hci.h v1.5 to RELENG_5
MFC link_control.c v1.9 to RELENG_5

Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.
class is a reserved word in C++

Submitted by:	Markus Brueffer < markus AT brueffer DOT de >
2005-01-07 01:28:28 +00:00
Maksim Yevmenkin 7bc8a4687f MFC v1.4 to RELENG_5
Fix typo: NUL -> NULL

Submitted by:	Markus Brueffer < markus AT brueffer DOT de >
2005-01-07 01:20:03 +00:00
Alan Cox 33da1d6351 MFC revision 1.144
Add send buffer locking to uipc_send().  Without this locking a race can
  occur between a reader and a writer that results in a panic upon close,
  e.g.,
          "panic: sbflush_locked: cc 4 || mb 0xffffff0052afa400 || mbcnt 0"
2005-01-07 00:23:50 +00:00
Alan Cox 56401e127c MFC revisions 1.456, 1.458, and 1.464
- Use VM_ALLOC_NOBUSY to eliminate vm_page_wakeup() calls and the
   acquisition and release of the global page queues lock required to make
   those calls.
 - Remove GIANT_REQUIRED from vm_hold_free_pages().  All of its VM operations
   are properly synchronized.
 - Hold the lock on the containing vm object when calling
   vm_page_sleep_if_busy().
 - Eliminate unnecessary calls to vm_page_busy().
2005-01-07 00:12:06 +00:00
Robert Watson b4442f93f8 Merge subr_witness.c:1.184 and subr_witness.c:1.185 from HEAD to RELENG_5:
date: 2004/12/27 10:47:08;  author: rwatson;  state: Exp;  lines: +2 -2
  Attempt to slightly refine the print out from "show alllocks" -- list
  the process and thread numbers/names on the same line rather than on
  separate lines, and print the thread pointer not just the tid.

  date: 2004/12/26 22:52:24;  author: rwatson;  state: Exp;  lines: +42 -0
  Add "show alllocks" command to DDB, which dumps a list of processes
  and threads currently holding sleep mutexes (and spin mutexes for
  curthread).  This can be quite useful in looking for a lock condition
  summary for a system, as it avoids manually iterating through threads
  and processes to find all the interesting locks.

  NB: "alllocks" is up there with "lockedvnods" for a bad argument for
  show.

  MFC after:      2 weeks
2005-01-06 23:10:50 +00:00
Robert Watson bb5eedc7d5 Merge uipc_sem.c:1.13 from HEAD to RELENG_5:
date: 2004/12/23 02:22:47;  author: rwatson;  state: Exp;  lines: +2 -0
  Assert the sem lock in sem_ref() and sem_rel(), as it is required to
  safely manipulate the reference count.
2005-01-06 22:47:46 +00:00
Robert Watson 17f385c62f Merge tcp_subr.c:1.214 from HEAD to RELENG_5:
date: 2004/12/23 01:34:26;  author: rwatson;  state: Exp;  lines: +18 -18
  Attempt to consistently use () around return values in calls to
  return() in newer code (sysctl, ISN, timewait).
2005-01-06 22:46:55 +00:00
Robert Watson 2ccdc745d9 Merge uipc_socket2.c:1.140 from HEAD to RELENG_5:
date: 2004/12/23 01:16:21;  author: rwatson;  state: Exp;  lines: +5 -5
  In sonewconn(), the s/if/while/ change to wait for room at the tail of
  the accept queue is a feature, not a bug/issue, so remove the XXXRW
  from the comment.
2005-01-06 22:44:52 +00:00
Robert Watson c68761f049 Merge tcp_input.c:1.261 from HEAD to RELENG_5:
date: 2004/11/28 11:06:22;  author: rwatson;  state: Exp;  lines: +2 -0
  Assert the inpcb lock in tcp_xmit_timer() as it performs read-modify-
  write of various time/rtt-related fields in the tcpcb.
2005-01-06 22:38:57 +00:00
Robert Watson 2c66b45abf Additional merges from tcp_input.c:1.255 in HEAD:
After releasing the tcbinfo lock in preparation for jumping to
  check_delack, set headlocked to 0.  At the check_delack label,
  assert that headlocked is 0.
2005-01-06 22:33:58 +00:00
Robert Watson 0021d44b01 Merge ip_output.c:1.235 from HEAD to RELENG_5:
date: 2004/12/05 21:38:33;  author: rwatson;  state: Exp;  lines: +8 -10
  Push the inpcb argument into ip_setmoptions() when setting IP multicast
  socket options, so that it is available for locking.
2005-01-06 21:05:07 +00:00
Robert Watson 5645dbfcbb Merge tcp_subr.c:1.213 from HEAD to RELENG_5:
date: 2004/12/23 01:27:13;  author: rwatson;  state: Exp;  lines: +1 -6
  Remove an XXXRW comment relating to whether or not the TCP timers are
  MPSAFE: they are now believed to be.

  Correct a typo in a second comment.

  MFC after:      2 weeks
2005-01-06 20:28:24 +00:00
Robert Watson 3ec87a1da7 Merge tcp_timer.c:1.72 and tcp_var.h:1.113 from HEAD to RELENG_5:
date: 2004/12/23 01:25:59;  author: rwatson;  state: Exp;  lines: +0 -15
  date: 2004/12/23 01:25:59;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove the now unused tcp_canceltimers() function.  tcpcb timers are
  now stopped as part of tcp_discardcb().

  MFC after:      2 weeks
2005-01-06 20:27:31 +00:00
Robert Watson dbc1d3c1b2 Merge tcp_timer.c:1.71 from HEAD to RELENG_5:
date: 2004/12/23 01:21:54;  author: rwatson;  state: Exp;  lines: +0 -7
  Remove an annotation of a minor race relating to the update of
  multiple MIB entries using sysctl in short order, which might
  result in unexpected values for tcp_maxidle being generated by
  tcp_slowtimo.  In practice, this will not happen, or at least,
  doesn't require an explicit comment.

  MFC after:      2 weeks
2005-01-06 20:26:07 +00:00
Robert Watson f3b06da777 Merge uipc_socket.c:1.223 from HEAD to RELENG_5:
date: 2004/12/23 01:07:12;  author: rwatson;  state: Exp;  lines: +4 -12
  Remove an XXXRW indicating atomic operations might be used as a
  substitute for a global mutex protecting the socket count and
  generation number.

  The observation that soreceive_rcvoob() can't return an mbuf
  chain is a property, not a bug, so remove the XXXRW.

  In sorflush, s/existing/previous/ for code when describing prior
  behavior.

  For SO_LINGER socket option retrieval, remove an XXXRW about why
  we hold the mutex: this is correct and not dubious.

  MFC after:      2 weeks
2005-01-06 20:24:58 +00:00
Robert Watson 3a575af52d Merge uipc_socket.c:1.222 from HEAD to RELENG_5:
date: 2004/12/23 00:59:43;  author: rwatson;  state: Exp;  lines: +3 -14
  In soalloc(), simplify the mac_init_socket() handling to remove
  unnecessary use of a global variable and simplify the return case.
  While here, use ()'s around return values.

  In sodealloc(), remove a comment about why we bump the gencnt and
  decrement the socket count separately.  It doesn't add
  substantially to the reading, and clutters the function.

  MFC after:      2 weeks
2005-01-06 20:23:57 +00:00
Robert Watson 67f91ec5b0 Mege ipx_outputfl.c:1.21 and ipx_pcb.c:1.36 from HEAD to RELENG_5:
date: 2005/01/02 01:47:56;  author: rwatson;  state: Exp;  lines: +1 -1
  date: 2005/01/02 01:47:56;  author: rwatson;  state: Exp;  lines: +1 -1
  Use RTFREE() to free route references rather than rtfree(), as rtfree()
  expects a locked route reference.  This removes a panic that occurs
  when connected ipxpcb is closed and its route free'd, and may have been
  present since the route locking took place.

  MFC after:      2 weeks

RELENG_5_3 candidate.
2005-01-06 13:18:18 +00:00
Robert Watson d770857a8a Merge uipc_usrreq.c:1.145 from HEAD to RELENG_5:
date: 2004/12/23 01:19:27;  author: rwatson;  state: Exp;  lines: +0 -4
  Remove temporary debugging printf that was used to detect the presence
  of a race that had previously caused a panic in order to determine if
  the fix was for the right problem.  It was.

  MFC after:      2 weeks
2005-01-06 03:52:52 +00:00
Robert Watson 6bac99d78d Merge slattach.8:1.27 from HEAD to RELENG_5:
date: 2005/01/02 12:40:40;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove cross reference to uustat(1), which is no longer in the base
  tree.

  MFC after:      3 days
  Submitted by:   bkoenig at cs dot tu-berlin dot de
2005-01-06 03:50:55 +00:00
Robert Watson 15720c8389 Merge spx.h:1.18 from HEAD to RELENG_5:
date: 2005/01/02 15:06:47;  author: rwatson;  state: Exp;  lines: +2 -2
  Mark 'struct spx' and 'struct spxhdr' as __packed to prevent possible
  alignment problems.

  MFC after:      3 days

RELENG_5_3 candidate.
2005-01-06 03:48:33 +00:00
Robert Watson cb6af2f5c6 Merge ipx.h:1.19 from HEAD to RELENG_5:
date: 2005/01/02 02:30:27;  author: rwatson;  state: Exp;  lines: +1 -1
  Mark 'struct ipx', the IPX packet header, as __packed.  Otherwise,
  recent versions of gcc will insert an extra 16 bits of padding in
  the structure, corrupting all IPX packet output.

  MFC after:      3 days

RELENG_5_3 candidate.
2005-01-06 03:47:53 +00:00
Tom Rhodes 3d27f9ad58 MFC: Remove lomac.4 manual page from this branch too. 2005-01-06 03:11:26 +00:00
Xin LI a3b06c1218 MFC IPI panic fix done by Stephan Uphoff:
sys/i386/i386/apic_vector.s	1.101 -> 1.102
	sys/i386/i386/mp_machdep.c	1.241 -> 1.243
	sys/i386/include/apicvar.h	1.8 -> 1.9
	sys/i386/include/smp.h		1.78 -> 1.79

To quote the original commit message:
	Avoid more than two pending IPI interrupt vectors per local APIC
	as this may cause deadlocks.

	This should fix kern/72123.

	Discussed with: jhb
	Tested by: Nik Azim Azam, Andy Farkas, Flack Man, Aykut KARA
	           Izzet BESKARDES, Jens Binnewies, Karl Keusgen
	Approved by:    sam (mentor)

This commit is a combination of Stephan's original one and John's style
fix on mp_machdep.c.  I have tested the patch on various SMP boxes running
RELENG_5_3 (4*P3 Xeon, 2*P4 w/HTT, 2*P4 Xeon configurations) under heavy
load for a couple of weeks, so commit on behalf of Stephan when he is
on vacation.

RELENG_5_3 candidate after settle time.

Discussed with:	ups
Reviewed by:	jhb
2005-01-06 02:02:36 +00:00
Tom Rhodes 87dc2fe323 MFC:
revision 1.32
date: 2004/12/29 20:00:29;  author: trhodes;  state: Exp;  lines: +5 -6
Catch up with stat.h a bit:

o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
2005-01-05 19:20:57 +00:00
Gleb Smirnoff 9f27b4d039 MFC 1.24:
Document callout_pending() macro.
2005-01-05 10:12:33 +00:00
Mike Silbersack adb9d919e7 MFC rev 1.264; add a sysctl allowing old (inscure) style RST handling
to be used.
2005-01-05 08:43:32 +00:00
Kirill Ponomarev c03bcd82de MFC: Remove trailing spaces. 2005-01-05 08:31:19 +00:00
Olivier Houchard 8a467cc983 MFC rev 1.36:
In re_detach(), remove an extra call to ether_ifdetach().
This fixes a panic that occurs when unloading the kernel module.
2005-01-05 00:07:37 +00:00
Pawel Jakub Dawidek a52cc4a4d9 MFC: test-12 1.2
When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.
2005-01-03 20:18:16 +00:00
Pawel Jakub Dawidek 38c33e1474 MFC: test-1.sh 1.2
test-2.sh 1.2
	test-3.sh 1.2
	test-4.sh 1.2
	test-5.sh 1.2
	test-6.sh 1.2
	test-7.sh 1.2

Wait a bit after creating device.
2005-01-03 20:15:04 +00:00
Robert Watson 0cbe2ea5c2 Merge nfs.h:1.86 from HEAD to RELENG_5:
date: 2004/12/06 16:11:25;  author: rwatson;  state: Exp;  lines: +1 -1
  Correct a typo in a comment.
2005-01-03 18:03:32 +00:00
Robert Watson e6b0cf6955 Merge bootp_subr.c:1.62 from HEAD to RELENG_5:
date: 2004/12/05 22:50:09;  author: rwatson;  state: Exp;  lines: +1 -1
  Convert a GIANT_REQUIRED; into a NET_ASSERT_GIANT();, as sockets are
  now only conditionally protected by Giant based on debug.mpsafenet.
2005-01-03 18:02:04 +00:00
Robert Watson e0ecd75e77 Merge ddp_input.c:1.28 from HEAD to RELENG_5:
date: 2004/12/05 13:28:52;  author: rwatson;  state: Exp;  lines: +1 -1
  Correct a misspelling in a comment.
2005-01-03 18:01:04 +00:00
Robert Watson 4b16a92685 Merge ddp_input.c:1.27 from HEAD to RELENG_5:
date: 2004/12/05 13:27:30;  author: rwatson;  state: Exp;  lines: +4 -2
  Acquire socket receive buffer mutex before appending and then waking up
  a receive socket in DDP.  This reduces the number of mutex operations
  required to deliver to a socket by two, and is the model used in other
  protocols.
2005-01-03 17:59:39 +00:00
Robert Watson 783ec1bb13 Merge share/man/man9/Makefile:1.247 from HEAD to RELENG_5:
date: 2004/11/24 18:03:52;  author: rwatson;  state: Exp;  lines: +2 -1
  Link critical_enter.9 to critical.9 to make it easier to find.
2005-01-03 17:56:47 +00:00
Robert Watson ba127383dd Merge db_Command.c:1.58 from HEAD to RELENG_5:
date: 2004/11/23 23:11:47;  author: rwatson;  state: Exp;  lines: +6 -0
  When printing a stack trace for a thread, also print the pid and tid.
  When a series of traces is included in a bug report, this will make it
  easier to tie the trace information back to ps or threads output,
  each of which will show the pid or the tid, but usually not both.
2005-01-03 17:54:46 +00:00
Robert Watson d777583942 Merge db_thread.c:1.3 from HEAD to RELENG_5:
date: 2004/11/23 23:07:12;  author: rwatson;  state: Exp;  lines: +6 -1
  When printing information on the current thread, such as when entering
  DDB, also print the pid of the process if present.  Since much
  debugging still centers around processes, having the pid is quite
  helpful.
2005-01-03 17:53:52 +00:00
Robert Watson 0ada38d14e Merge kern_switch.c:1.103 and ktr.h:1.25 from HEAD to RELENG_5:
date: 2004/11/07 23:11:32;  author: rwatson;  state: Exp;  lines: +4 -0
  date: 2004/11/07 23:11:32;  author: rwatson;  state: Exp;  lines: +2 -1
  Add basic critical section tracing to KTR using event type KTR_CRITICAL.
  This generates a KTR event for each critical section entered and exited.

  It would be desirable to also log the filename and line number of the
  source entering or exiting the critical section, but this requires
  hacking up the critical section API, so I've not done that yet.
2005-01-03 17:33:16 +00:00
Robert Watson 5f52d0c368 Correct style nit in definition of KTR_BUSDMA: s/ /tab/ between #define
and macro name.
2005-01-03 17:14:46 +00:00
Robert Watson 3364b9c4bf Merge uma_core.c:1.110 from HEAD to RELENG_5:
date: 2004/11/06 11:43:30;  author: rwatson;  state: Exp;  lines: +23 -7
  Abstract the logic to look up the uma_bucket_zone given a desired
  number of entries into bucket_zone_lookup(), which helps make more
  clear the logic of consumers of bucket zones.

  Annotate the behavior of bucket_init() with a comment indicating
  how the various data structures, including the bucket lookup tables,
  are initialized.
2005-01-03 17:10:08 +00:00
Robert Watson dd5ab6cff4 Merge uma_core.c:1.109 from HEAD to RELENG_5:
date: 2004/11/06 11:24:40;  author: rwatson;  state: Exp;  lines: +5 -1
  Annotate what bucket_size[] array does; staticize since it's used only
  in uma_core.c.
2005-01-03 17:08:20 +00:00
Christian Brueffer 98f7efe796 MFC: rev. 1.271
Refer to Xorg, rather than XFree86.
2005-01-03 14:14:01 +00:00
Pawel Jakub Dawidek d625db0eff MFC:
Fix mbuf leak.

Submitted by:	Johnny Eriksson <[email protected]>
2005-01-03 13:18:49 +00:00
Pawel Jakub Dawidek d412a4e9df Correct default values. 2005-01-03 13:09:49 +00:00
Pawel Jakub Dawidek a9a414b5e2 MFC:
- Drop Giant before acquiring the topology lock.
- Add a missing mtx_unlock().
2005-01-03 13:04:58 +00:00
Pawel Jakub Dawidek 57b2d2d859 MFC:
- Fix force-stopping mirrors.
- Introduce 'idle' functionality, which works by marking components as
  clean after the given idle time.
- Use shutdown hooks to mark raid3-devices as clean after all file systems
  are unmounted.
- Use g_topology_try_lock() in the event thread to avoid deadlocks, because
  some classes hold the topology lock when calling g_(read|write)_data().
- Keep consumers open even if device is not open to avoid races which taste
  mechanism and to be able to always update metadata.
- Treat components which has I/O errors as broken, don't try to rebuild
  them.
- Introduce metadata backward compatibility code, which updates detected
  all metadata to the current version.
2005-01-03 12:55:28 +00:00
Pawel Jakub Dawidek d787af9c64 MFC:
Add function bioq_insert_head().
2005-01-03 12:51:07 +00:00
Pawel Jakub Dawidek 8541b06975 MFC:
Gmirror now uses shutdown hooks to stop itself in a clean way, that's why
we don't need stop method for rc.d/swap1 script anymore.
2005-01-03 12:41:39 +00:00
Pawel Jakub Dawidek f1899a9797 MFC:
- Fix force-stopping mirrors.
- Introduce 'idle' functionality, which works by marking components as
  clean after the given idle time.
- Use shutdown hooks to mark mirrors as clean after all file systems are
  unmounted.
- Use g_topology_try_lock() in the event thread to avoid deadlocks, because
  some classes hold the topology lock when calling g_(read|write)_data().
- Keep consumers open even if mirror is not open to avoid races which taste
  mechanism and to be able to always update metadata.
- Treat components which has I/O errors as broken, don't try to rebuild
  them.
- Introduce metadata backward compatibility code, which updates detected
  all metadata to the current version.
2005-01-03 12:38:00 +00:00
Pawel Jakub Dawidek dd559a4a6f MFC:
Command 'forget' need devices names, not provider names.
2005-01-03 12:20:56 +00:00
Pawel Jakub Dawidek dff3f96703 MFC:
Manual page cleanups.

Done by:	ceri
2005-01-03 12:19:04 +00:00
Pawel Jakub Dawidek 9b112168d0 MFC:
Manual pages cleanups.

Mostly done by:	ceri
2005-01-03 12:17:18 +00:00
Pawel Jakub Dawidek 80ac8678de MFC: geom.c 1.9
Detect if class name is '-h' or 'help' and if it is, show general help
message, i.e.:
	geom: usage: geom <class> <command> [options]

PR:		bin/71537
Submitted by:	bugghy <[email protected]>
2005-01-03 12:11:31 +00:00
Tom Hukins 07ae3eff44 MFC rev. 1.7: Sort driver names alphabetically. 2005-01-03 11:52:11 +00:00
Pawel Jakub Dawidek 7ee8aee045 Change [tab] after #define on [space]. This is not correct from style(9)
point of view, but the rest of #defines here use [space] and I want to stay
consistent.
2005-01-03 10:42:10 +00:00
Gleb Smirnoff 7954bc5d6e MFC 1.4:
- Plug a memory leak in ng_netflow_cache_init().
  - Initialize error to 0 in ng_netflow_flow_add() (a nop change).
  - Update cache statistics holding workqueue mutex.
2005-01-03 10:14:06 +00:00
Ceri Davies bc64f41f2c MFC r1.2:
Add a newline at the end of the file to silence warnings.
2005-01-02 12:45:52 +00:00
Kirill Ponomarev 317531aac0 MFC: rev 1.24
date: 2004/12/30 13:09:34;  author: krion;  state: Exp;  lines: +3 -1
  Add LOG_NTP facility.

  Submitted by:   Kurt Jaeger <pi at complx dot LF dot net>
  Approved by:    ru
  MFC after:      3 days
2005-01-02 08:50:36 +00:00
Mike Silbersack 7fdbfca1dc MFC of port randomization rate-based disabling:
in_pcb.c rev 1.157
in_pcb.h rev 1.79
ip_input.c rev 1.293
ip_var.h rev 1.93
2005-01-02 01:53:22 +00:00
Christian Brueffer 6e5d71263d MFC:
Autogenerate device listings for bktr(4).
2005-01-01 14:42:17 +00:00
Christian Brueffer d588ccc2d3 MFC: rev. 1.25
- call the driver 'bktr' instead of 'brooktree' throughout the document
- add a HARDWARE section
- add a more descriptive NAME section
- update for recently imported Pinnacle PCTV support
- add Branko Lankester, the original author of the PCTV patches,
  to the AUTHORS section
- bump .Dd
2005-01-01 14:39:41 +00:00
Christian Brueffer 116aaea842 MFC: rev. 1.27
SMC SMC2536W-AG verified as working.
2005-01-01 14:34:05 +00:00
Julian Elischer d98f7d445d MFC:
Rewrite ehci_abort_xfer() to use the method hinted at in the EHCI spec.
to remove a transaction from the async schedule. The previous method didn't
work well and led to the hardware writing to free'd buffers etc, as
it didn't always know that the transaction had been aborted.

Written after consultation with David Brownell who wrote the Linux
EHCI driver.

As part of this give the sqh structure a "previous" pointer.
2005-01-01 10:44:25 +00:00
Maxim Sobolev 3b5d0e4f55 Complete 2005 transition.
Happy New Year! :-)
2005-01-01 07:29:20 +00:00
Kirk McKusick a3a460d962 MFC from 1.127 2004/12/09 of the main tree:
Fixes a bug that caused UFS2 filesystems bigger than 2TB to
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.

Submitted by:   Henry Whincup <[email protected]>
2005-01-01 00:38:00 +00:00
Warner Losh 7f681870ca MFC: 2005 2004-12-31 19:13:38 +00:00
Julian Elischer 16ff0496a0 get the right NetBSD ID on this file. 2004-12-31 08:54:11 +00:00
Julian Elischer b3f8941be6 MFC:
Diff reduction to NetBSD.
Now only things that are different between us and NetBSD show up.
Means that these files are more of NetBSD style in some places but
since thay are NetBSD files, um, that's ok.

Obtained from:	NetBSD
2004-12-31 08:50:48 +00:00
Julian Elischer 03f8b8af2b MFC:
Formatting changes and a small correction when count of companions is wrong.
Diff reduction.
2004-12-31 08:45:18 +00:00
Julian Elischer eb6895aa49 MFC:
Slightly reorganise part of the ohci_softintr() function
to better keep track of the total amoutn transferred during a
transfer. Seems similar to some code in the NetBSD version.
I notice they have incorporated matches from him so I don't know which
direction it went.

Submitted by:   [email protected]
Obtained from:  patches to make the ueagle driver work
2004-12-31 08:40:04 +00:00
Julian Elischer 2cc06a93dc MFC:
Add some locking for -currnet/5.x

PR:             74305
Submitted by:   Anish Mistry <amistry at am-productions dot biz>
2004-12-31 08:36:17 +00:00
Julian Elischer 27a0b16e6f MFC:
Allow /sys/dev/bktr to support Pinnacle PCTV Rave cards

PR:             73669
Submitted by:   arne_woerner at yahoo dot com
2004-12-31 08:33:52 +00:00
Julian Elischer 1fab4302b7 MFC:
Whitespace diff reduction, formatting fixes and one actual
  arithmetic error that NetBSD have fixed.

Obtained from:	NetBSD
2004-12-31 08:01:48 +00:00
Julian Elischer 7e755a621a MFC:
Changes to cache endpoint descriptors for all the interfaces. this
information is not always available if we change interfaces.

Submitted by:   jamie at bishopston dot net  (jamie jones)
2004-12-31 07:53:46 +00:00
Julian Elischer e3eb379d2f MFC: Add support for USB Microsoft Intellimouse
Submitted by:	Matt Wright <[email protected]>
2004-12-31 07:31:15 +00:00
Garance A Drosehn fc0253aad6 MFC 1.62: When printing a data file received from some other host, check
to make sure the data file has been completely transfered before starting
to print it.
2004-12-31 04:15:52 +00:00
Eric Anholt c39e219b18 MFC r1.3: Add PCI ID for VIA K8T800Pro chipset. 2004-12-30 06:52:32 +00:00
Pyun YongHyeon 59d6b635b5 MFC 1.159
Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
  disk. This is main reason why sysinstall presents SCSI CDROM to
  available disks in Fdisk/Label menu. In addition, adding a blank
  SCSI CDROM to the menu generates floating point exception in sparc64.
  Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI
  CDROM as a disk is beyond me and that should be investigated.
  For temporary workaround, ignore SCSI CDROM device.

  PR:             sparc64/72962
  Tested by:      R. Tyler Ballance < tyler AT tamu DOT edu>
  MFC after:      1 week
2004-12-30 06:23:39 +00:00
Pyun YongHyeon 5306f65ed2 MFC 1.124
Plug memory leak.
2004-12-30 06:18:17 +00:00
Christian Brueffer 3b425cb4b1 MFC: rev. 1.7
Fix typos.
2004-12-30 01:52:21 +00:00
David E. O'Brien c61bb11851 MFC: rev. 1.395: enable sound modules. 2004-12-30 00:48:36 +00:00
Tim Kientzle 4c47a6abb0 MFC 1.29: Tune bidding for tar archives to improve
heuristic for deciding whether a hardlink entry with
non-zero size really has a body or not.
2004-12-29 23:17:33 +00:00
Tim Kientzle 1b208b5c51 MFC v1.58: Fix -W long option handling. 2004-12-29 22:58:58 +00:00
Christian Brueffer be54d44fce MFC: rev. 1.6 + 1.7
The ixgb(4) driver actually first appeared in 5.3 and the upcomming 4.11.
2004-12-29 16:37:19 +00:00
Maxim Sobolev e8e9b386de MFC: note added support for FC929X. 2004-12-29 15:51:06 +00:00
Maxim Sobolev 906b8d735c MFC: add support for FC929X. 2004-12-29 15:49:18 +00:00
Giorgos Keramidas 6928129668 Replace reference to an unknown newfs(8) option with newfs
option -U (enable softupdates).

PR:		docs/74952
Submitted by:	Hubert Tournier <[email protected]>
2004-12-29 09:24:44 +00:00
Maxime Henrion 5309180e5b Merge if_fxp.c:1.220 from HEAD to RELENG_5:
date: 2004/12/20 10:18:21;  author: mux;  state: Exp;  lines: +2 -2
  Only try to use the 82503 serial interface for the 82557 chipsets.  The
  datasheet says it is only valid for such chipsets and shouldn't be used
  with others.  This fixes some 82559 based cards which otherwise only
  work at 10Mbit.

  MFC after:      5 days
  Tested by:      krion
2004-12-28 22:14:11 +00:00
Pawel Jakub Dawidek c21c2d03ec MFC: Implement g_topology_try_lock(). 2004-12-28 21:56:21 +00:00
Ralf S. Engelschall 841348af91 MFC: src/etc/defaults/rc.conf:1.234
src/etc/rc.d/jail:1.20
     src/etc/rc.shutdown:1.30

Improve the RC framework for the clean booting/shutdown of Jails:

1. Feature: for flexibility reasons and as a prerequisite to clean
   shutdowns, allow the configuration of a stop/shutdown command
   via rc.conf variable "jail_<name>_exec_stop" in addition to the
   start/boot command (rc.conf variable "jail_<name>_exec_start"). For
   backward compatibility reasons, rc.conf variable "jail_<name>_exec"
   is still supported, too.

2. Debug: Add the used boot/shutdown commands to the debug output of
   the /etc/rc.d/jail script, too.

3. Security: Run the Jail start/boot command in a cleaned environment
   to not leak information from the host to the Jail during startup.

4. Feature: Run the Jail stop/shutdown command "jail_<name>_exec_stop" on
   "/etc/rc.d/jail stop <name>" to allow a graceful shutdown of the Jail
   before its processes are just killed.

5. Bugfix: When killing the remaining Jail processes give the processes
   time to actually perform their termination sequence. Without this the
   subsequent umount(8) operations usually fail because the resources
   are still in use. Additionally, if after trying to TERM-inate the
   processes there are still processes hanging around, finally just KILL
   them.

6. Bugfix: In rc.shutdown, if running inside a Jail, skip the /etc/rc.d/*
   scripts which are flagged with the KEYWORD "nojail" to allow the
   correct operation of rc.shutdown under jail_<name>_exec_stop="/bin/sh
   /etc/rc.shutdown". This is analogous to what /etc/rc does inside a Jail.

Now the following typical host-configuration for two Jails works as
expected and correctly boots and shutdowns the Jails:

-----------------------------------------------------------
#  /etc/rc.conf:
jail_enable="YES"
jail_list="foo bar"
jail_foo_rootdir="/j/foo"
jail_foo_hostname="foo.example.com"
jail_foo_ip="192.168.0.1"
jail_foo_devfs_enable="YES"
jail_foo_mount_enable="YES"
jail_foo_exec_start="/bin/sh /etc/rc"
jail_foo_exec_stop="/bin/sh /etc/rc.shutdown"
jail_bar_rootdir="/j/bar"
jail_bar_hostname="bar.example.com"
jail_bar_ip="192.168.0.2"
jail_bar_devfs_enable="YES"
jail_bar_mount_enable="YES"
jail_bar_exec_start="/path/to/kjailer -v"
jail_bar_exec_stop="/bin/sh -c 'killall kjailer && sleep 60'"
-----------------------------------------------------------
#  /etc/fstab.foo
/v/foo /j/foo/v/foo nullfs rw 0 0
-----------------------------------------------------------
#  /etc/fstab.bar
/v/bar /j/bar/v/bar nullfs rw 0 0
-----------------------------------------------------------
2004-12-28 10:43:33 +00:00
Christian Brueffer d19aacd3d7 MFC: rev. 1.21
Changes in comments:

- correct a sentence so it actually has some meaning
- sprinkle some full stops
2004-12-28 02:23:44 +00:00
Ruslan Ermilov 23f8afc8ec MFC: 1.54: Print MAC addresses of VLAN interfaces properly. 2004-12-27 14:30:54 +00:00
Maxim Konovalov d0499bc177 MFC rev. 1.19: allocate an additional white space in a username column. 2004-12-27 13:22:37 +00:00
Maxim Konovalov 8a0224e316 MFC rev. 1.9: no macros for sigemptyset(3) and friends,
sigismember(3) could return -1.
2004-12-27 13:18:19 +00:00
Maxim Konovalov 95df1b08c8 MFC rev. 1.94: add a missed "." . 2004-12-27 13:11:02 +00:00
Maxim Konovalov 44eb55133e MFC rev. 1.27 dump.h and rev. 1.16 itime.c: do not dump core
in -W if dumpdates was not readable and ddatev == NULL; remove
unused ddates_in.
2004-12-27 12:46:10 +00:00
Gleb Smirnoff 100a9d3cef MFC 1.33:
Restore standard behavior: log to console only when normal logging
  failed, not always.

  PR:             bin/75356
  Submitted by:   Mark Knight <markk knigma org>
  Pointy hat to:  glebius
2004-12-27 08:32:41 +00:00
Nate Lawson faaef4daf7 MFC: Unify debugging for third-party drivers under ACPI_OEM. 2004-12-27 05:54:13 +00:00
Nate Lawson 0faebc63d1 MFC 1.39: Only report a critical battery level once. 2004-12-27 05:45:38 +00:00
Wilko Bulte 4f22ba3edd LCA is 21066/21068
add EV7
2004-12-26 14:39:55 +00:00
Robert Watson 3138c95ef3 Merge tcp_sack.c:1.5 from HEAD to RELENG_5:
date: 2004/10/26 08:59:09;  author: rwatson;  state: Exp;  lines: +1 -0
  Add a matching tunable for net.inet.tcp.sack.enable sysctl.
2004-12-25 23:02:57 +00:00
Robert Watson 0f2ad3c898 Merge tcp_fsm.h:1.17 from HEAD to RELENG_5:
date: 2004/11/21 14:38:04;  author: rwatson;  state: Exp;  lines: +1 -1
  s/send/sent/ in comment describing TCPS_SYN_RECEIVED.
2004-12-25 23:01:24 +00:00
Robert Watson f6b1361c02 Merge in_pcb.c:1.155 from HEAD to RELENG_5:
date: 2004/09/29 04:01:13;  author: rwatson;  state: Exp;  lines: +1 -1
  Assign so_pcb to NULL rather than 0 as it's a pointer.

  Spotted by:     dwhite
2004-12-25 22:57:00 +00:00
Robert Watson bed0cae435 Merge if_ether.c:1.130 from HEAD to RELENG_5:
date: 2004/10/12 17:10:40;  author: rwatson;  state: Exp;  lines: +7 -1
  Modify the thrilling "%D is using my IP address %s!" message so that
  it isn't printed if the IP address in question is '0.0.0.0', which is
  used by nodes performing DHCP lookup, and so constitute a false
  positive as a report of misconfiguration.
2004-12-25 22:55:35 +00:00
Robert Watson 22d0f80d74 Merge tcp_timer.c:1.70 from HEAD to RELENG_5:
date: 2004/12/05 22:47:29;  author: rwatson;  state: Exp;  lines: +1 -0
  Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in
  the tcptw undergo non-atomic read-modify-writes.

  MFC after:      2 weeks
2004-12-25 22:49:15 +00:00
Robert Watson a8c91a166e Merge tcp_subr.c:1.212 from HEAD to RELENG_5:
date: 2004/12/05 22:27:53;  author: rwatson;  state: Exp;  lines: +12 -1
  Assert inpcb lock in:

    tcpip_fillheaders()
    tcp_discardcb()
    tcp_close()
    tcp_notify()
    tcp_new_isn()
    tcp_xmit_bandwidth_limit()

  Fix a locking comment in tcp_twstart(): the pcbinfo will be locked (and
  is asserted).

  MFC after:      2 weeks
2004-12-25 22:48:11 +00:00
Robert Watson cf49afc6a7 Merge tcp_input.c:1.258 from HEAD to RELENG_5, with the exception of
one block obsoleted by the decision not to hold the TCP pcbinfo lock
over a jump to check_delack:

  date: 2004/11/23 23:41:20;  author: rwatson;  state: Exp;  lines: +19 -12
  In tcp_reass(), assert the inpcb lock on the passed tcpcb, since the
  contents of the tcpcb are read and modified in volume.

  In tcp_input(), replace th comparison with 0 with a comparison with
  NULL.

  At the 'findpcb', 'dropafterack', and 'dropwithreset' labels in
  tcp_input(), assert 'headlocked'.  Try to improve consistency between
  various assertions regarding headlocked to be more informative.

  MFC after:      2 weeks
2004-12-25 22:46:37 +00:00
Robert Watson 8681082ba2 Merge tcp_input.c:1.257, tcp_subr.c:1.211, tcp_timer.c:1.69 from HEAD
to RELENG_5:

  date: 2004/11/23 17:21:30;  author: rwatson;  state: Exp;  lines: +4 -0
  date: 2004/11/23 17:21:30;  author: rwatson;  state: Exp;  lines: +2 -0
  date: 2004/11/23 17:21:30;  author: rwatson;  state: Exp;  lines: +9 -0

  tcp_timewait() performs multiple non-atomic reads on the tcptw
  structure, so assert the inpcb lock associated with the tcptw.
  Also assert the tcbinfo lock, as tcp_timewait() may call
  tcp_twclose() or tcp_2msl_rest(), which require it.  Since
  tcp_timewait() is already called with that lock from tcp_input(),
  this doesn't change current locking, merely documents reasons for
  it.

  In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest()
  is called, which requires that lock.

  In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop()
  is called, which requires that lock.

  Document the locking strategy for the time wait queues in tcp_timer.c,
  which consists of protecting the time wait queues in the same manner
  as the tcbinfo structure (using the tcbinfo lock).

  In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait
  queues are modified.

  In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait
  queues may be modified.

  In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait
  queues may be modified.

  MFC after:      2 weeks
2004-12-25 22:44:04 +00:00
Robert Watson 4d06428125 Merge tcp_timer.c:1.68 from HEAD to RELENG_5:
date: 2004/11/23 16:45:07;  author: rwatson;  state: Exp;  lines: +11 -15
  De-spl tcp_slowtimo; tcp_maxidle assignment is subject to possible
  but unlikely races that could be corrected by having tcp_keepcnt
  and tcp_keepintvl modifications go through handler functions via
  sysctl, but probably is not worth doing.  Updates to multiple
  sysctls within evaluation of a single addition are unlikely.

  Annotate that tcp_canceltimers() is currently unused.

  De-spl tcp_timer_delack().

  De-spl tcp_timer_2msl().

  MFC after:      2 weeks
2004-12-25 22:34:10 +00:00
Robert Watson 8a1aa34ca8 Merge tcp_subr.c:1.210 from HEAD to RELENG_5:
date: 2004/11/23 16:23:13;  author: rwatson;  state: Exp;  lines: +10 -0
  Assert the inpcb lock in tcp_twstart(), which does both read-modify-write
  on the tcpcb, but also calls into tcp_close() and tcp_twrespond().

  Annotate that tcp_twrecycleable() requires the inpcb lock because it does
  a series of non-atomic reads of the tcpcb, but is currently called
  without the inpcb lock by the caller.  This is a bug.

  Assert the inpcb lock in tcp_twclose() as it performs a read-modify-write
  of the timewait structure/inpcb, and calls in_pcbdetach() which requires
  the lock.

  Assert the inpcb lock in tcp_twrespond(), as it performs multiple
  non-atomic reads of the tcptw and inpcb structures, as well as calling
  mac_create_mbuf_from_inpcb(), tcpip_fillheaders(), which require the
  inpcb lock.

  MFC after:      2 weeks
2004-12-25 22:32:44 +00:00
Robert Watson 57dab8ec33 Merge tcp_subr.c:1.209 from HEAD to RELENG_5:
date: 2004/11/23 16:06:15;  author: rwatson;  state: Exp;  lines: +4 -0
  Assert inpcb lock in tcp_quench(), tcp_drop_syn_sent(), tcp_mtudisc(),
  and tcp_drop(), due to read-modify-write of TCP state variables.

  MFC after:      2 weeks
2004-12-25 22:31:11 +00:00
Robert Watson 2b04156b4f Merge tcp_subr.c:1.208 from HEAD to RELENG_5:
date: 2004/11/23 15:59:43;  author: rwatson;  state: Exp;  lines: +11 -4
  Assert the tcbinfo write lock in tcp_new_isn(), as the tcbinfo lock
  protects access to the ISN state variables.

  Acquire the tcbinfo write lock in tcp_isn_tick() to synchronize
  timer-driven isn bumping.

  Staticize internal ISN variables since they're not used outside of
  tcp_subr.c.

  MFC after:      2 weeks
2004-12-25 22:29:57 +00:00
Robert Watson 691daeb76a Merge portions of tcp_input.c:1.255 from HEAD to RELENG_5:
date: 2004/11/07 19:19:35;  author: rwatson;  state: Exp;  lines: +5 -6
  ...
  Free the mbuf at the end of tcp_input after releasing any held locks to
  reduce the time the locks are held.

  MFC after:      3 weeks
2004-12-25 22:27:56 +00:00
Giorgos Keramidas 1497ad6e94 MFC 1.18: Fix some typos. 2004-12-25 14:37:07 +00:00
Bjoern A. Zeeb 48b519336e MFC rev 1.93
Enable jumbo frames on Yukon variants of sk(4).

   In contrast to OpenBSD we enable jumbo frame support
   depending on MTU setting (like done for xmac).

   Obtained from:  OpenBSD if_sk.c r1.52 (YU_SMR_MFL_JUMBO flag)

Approved by:	pjd (mentor)
2004-12-25 09:53:08 +00:00
Ruslan Ermilov 0f9f707ef2 MFC: 1.471: Fixed CPUTYPE assignment type check to bother
only those who attempts to set it to a different value.
2004-12-25 07:52:41 +00:00
Christian Brueffer c072c000ac MFC: rev. 1.20
In the ethernet-nic-regex:

- add udav(4)

In the scsi-controller-regex:

- correct an entry
- move another one to the right place
- add a bunch of missing drivers
2004-12-24 23:39:24 +00:00
Christian Brueffer c6d9136b34 MFC:
(fast) ethernet -> (Fast) Ethernet
2004-12-24 22:24:04 +00:00
Wilko Bulte 7f08daf367 "3 hands" 2004-12-24 21:12:18 +00:00
Garance A Drosehn a0a4e7cac5 MFC 1.63: Call umask() before opening the lock-file for a queue, to make
sure the file will be created with the right access, if the call to open()
does create it.  Also fix the other call to umask() to turn off "write
others", just as a matter of general safety.

PR:		74418
2004-12-23 22:44:28 +00:00
Mike Silbersack d97450e1c9 MFC rev 1.259; accept RSTs when our window is closed. 2004-12-23 22:07:19 +00:00
Scott Long 685be98b33 MFC: Document the 21610SA and 2130SLP 2004-12-23 08:06:54 +00:00
Scott Long 8d9d4494b7 MFC: Document the 2230SLP 2004-12-23 08:00:58 +00:00
Scott Long c029c07631 MFC: Add support for the 2230S 2004-12-23 07:54:22 +00:00
Christian Brueffer 288bf97c54 MFC: rev. 1.33
Nuke ports-picobsd, it was thrown out a while ago.
2004-12-22 17:17:35 +00:00
Robert Watson da123b5165 Merge mac_portacl.4:1.6 and subsequent cleanup commits through
mac_portacl.4:1.9 from HEAD to RELENG_5:

  date: 2004/12/08 15:58:38;  author: trhodes;  state: Exp;  lines: +8 -0
  Document recently added security.mac.portacl.autoport_exempt tunable.

  Outraced the speed of doc request:      trhodes
2004-12-22 11:11:15 +00:00
Robert Watson 22a028ed2b Merge mac_portacl.c:1.7 from HEAD to RELENG_5:
date: 2004/12/08 11:46:44;  author: rwatson;  state: Exp;  lines: +23 -0
  Add a new sysctl/tunable to mac_portacl:

      security.mac.portacl.autoport_exempt

  This sysctl exempts to bind port '0' as long as IP_PORTRANGELOW hasn't
  been set on the socket.  This is quite useful as it allows applications
  to use automatic binding without adding overly broad rules for the
  binding of port 0.  This sysctl defaults to enabled.

  This is a slight variation on the patch submitted by the contributor.

  MFC after:      2 weeks
  Submitted by:   Michal Mertl <mime at traveller dot cz>
2004-12-22 09:39:08 +00:00
Robert Watson 99f0f50286 Merge mac_portacl.c:1.5 from HEAD to RELENG_5:
date: 2004/12/06 19:43:45;  author: rwatson;  state: Exp;  lines: +19 -26
  Switch from using an sx lock to a mutex for the mac_portacl rule chain:
  the sx lock was used previously because we might sleep allocating
  additional memory by using auto-extending sbufs.  However, we no longer
  do this, instead retaining the user-submitted rule string, so mutexes
  can be used instead.  Annotate the reason for not using the sbuf-related
  rule-to-string code with a comment.

  Switch to using TAILQ_CONCAT() instead of manual list copying, as it's
  O(1), reducing the rule replacement step under the mutex from O(2N) to
  O(2).

  Remove now uneeded vnode-related includes.

  MFC after:      2 weeks
2004-12-22 09:38:10 +00:00
Robert Watson 87e36e4080 Merge nfs_vfsops.c:1.164 from HEAD to RELENG_5:
date: 2004/12/05 22:53:17;  author: rwatson;  state: Exp;  lines: +6 -1
  Convert GIANT_REQUIRED; in nfs_mountroot() to NET_ASSERT_GIANT(),
  and annotate that nfs_mountroot assumes it is OK to step on the
  values in the global NFSv3 diskless structure as the mountroot
  function is called during a serialized part of the boot, before
  any other NFS client activity occurs.

  MFC after:      2 weeks
2004-12-22 09:36:04 +00:00
Robert Watson bdf92e29b0 Merge ip_output.c:1.236 from HEAD to RELENG_5:
date: 2004/12/05 22:08:37;  author: rwatson;  state: Exp;  lines: +14 -6
  Pass the inpcb reference into ip_getmoptions() rather than just the
  inp->inp_moptions pointer, so that ip_getmoptions() can perform
  necessary locking when doing non-atomic reads.

  Lock the inpcb by default to copy any data to local variables, then
  unlock before performing sooptcopyout().

  MFC after:      2 weeks
2004-12-22 09:34:49 +00:00
Robert Watson 787d7219b5 Merge in_pcb.h:1.78 from HEAD to RELENG_5:
date: 2004/12/05 22:07:14;  author: rwatson;  state: Exp;  lines: +1 -0
  Define INP_UNLOCK_ASSERT() to assert that an inpcb is unlocked.

  MFC after:      2 weeks
2004-12-22 09:32:35 +00:00
Robert Watson f362aa430d Merge ip_output.c:1.233 (and forced commit MFC reminder
ip_output.c:1.234) from HEAD to RELENG_5:

  date: 2004/12/05 19:11:09;  author: rwatson;  state: Exp;  lines: +13 -10
  Start working through inpcb locking for ip_ctloutput() by cleaning up
  modifications to the inpcb IP options mbuf:

  - Lock the inpcb before passing it into ip_pcbopts() in order to prevent
    simulatenous reads and read-modify-writes that could result in races.
  - Pass the inpcb reference into ip_pcbopts() instead of the option chain
    pointer in the inpcb.
  - Assert the inpcb lock in ip_pcbots.
  - Convert one or two uses of a pointer as a boolean or an integer
    comparison to a comparison with NULL for readability.
2004-12-22 09:31:07 +00:00
Robert Watson a3b1677b96 Merge tcp_input.c:1.260 from HEAD to RELENG_5:
date: 2004/11/28 11:01:31;  author: rwatson;  state: Exp;  lines: +3 -2
  Expand coverage of the receive socket buffer lock when handling urgent
  pointer updates: test available space while holding the socket buffer
  mutex, and continue to hold until until the pointer update has been
  performed.

  MFC after:      2 weeks
2004-12-22 09:12:19 +00:00
Robert Watson 8d13f37970 Merge ps.1:1.80 and ps.1:1.81 from HEAD to RELENG_5:
date: 2004/12/22 09:04:47;  author: rwatson;  state: Exp;  lines: +0 -1
  Remove single line containing the word "KLD" ommitted in ps.1:1.80.

  Pointed out by: ru (some time ago)

  date: 2004/11/29 12:00:24;  author: rwatson;  state: Exp;  lines: +4 -5
  Point at the mac(4) man page when describing the -Z option.
  Remove reference to /dev/lomac, which is no longer used by mac_lomac(4).

  MFC after:      3 days
2004-12-22 09:09:37 +00:00
Robert Watson d1946208d9 MFC if.c:1.212 from HEAD to RELENG_5:
date: 2004/11/23 23:31:33;  author: rwatson;  state: Exp;  lines: +10 -8
  Assign if_broadcastaddr to NULL not 0 in if_attach().

  Printf() a warning if if_attachdomain() is called more than once on an
    interface to generate some noise on mailing lists when this occurs.

  Fix up style in if_start(), where spaces crept in instead of tabs at
  some point.

  MFC after:      1 week
  MFC note:       Not the printf().
2004-12-22 09:02:16 +00:00
Robert Watson 16c1d1a271 MFC the netrate packet generation tool to RELENG_5, all revisions are
the same as in CVS HEAD except for Makefile's affected by the recent
NO_MAN change:

  Add netrate (netreceive, netsend), a tool for generating (and sinking)
  UDP packets of specified size at a fixed rate.  I've been using this for
  netperf-related testing.

  Add a version of netsend that uses the interval timer rather than
  explicit clock reads to set an overall duration to the send, and
  blasts rather than trying to clock output.  The goal of netblast,
  unlike netsend, is to send as many UDP packets as possible; the
  cost is that there's no ability to control the rate, and there's
  less accuracy in the timing as the interval timer granularity is
  relatively low.

Requested by:	Matthew George <mdg at secureworks dot net>
2004-12-22 08:52:06 +00:00
Daniel Hartmeier 36e60a15f0 MFC 1.25: Initialise init_addr in pf_map_addr() in the PF_POOL_ROUNDROBIN,
prevents a possible endless loop in pf_get_sport() with
          'static-port'

          ICMP state entries use the ICMP ID as port for the unique state
          key. When checking for a usable key, construct the key in the
          same way. Otherwise, a colliding key might be missed or a state
          insertion might be refused even though it could be inserted. The
          second case triggers the endless loop, possibly allowing a NATed
          LAN client to lock up the kernel.
2004-12-22 00:36:04 +00:00
Tim Kientzle 8bc6780295 MFC: Synchronize with -current
Fixes:
  * Failed writes are recognized
  * Correct spacing of dates in -tv format
  * Display large file sizes correctly
  * Eliminate a redundant "Unrecognized option"
    warning.
2004-12-22 00:07:17 +00:00
Tim Kientzle 4cf45adfa9 MFC: Synchronize libarchive with -current.
Among other fixes:
  * Corrected handling of write errors,
    use consistent error return values throughout.
  * Correct assembly/disassembly of major/minor device
    numbers so that very large minor numbers don't
    result in incorrect major numbers.
  * Allow tar format to read a non-existent file.
    (It will be treated as empty.)  This allows
    bsdtar -r/-u to work with empty files.
  * Update some comments/documentation, prune out
    some dead code, other minor changes.
2004-12-22 00:01:55 +00:00
Giorgos Keramidas c0bf0bec22 MFC 1.19:
Group equivalent flags together and delete the `aliases' section.
2004-12-21 22:29:35 +00:00
Giorgos Keramidas d14afc3969 MFC 1.16: Typo fix. 2004-12-21 22:27:08 +00:00
Giorgos Keramidas b8316aef4d MFC 1.70:
Update the description of SCSI_DELAY and annotate IDE_DELAY as
a PC98-only option.
2004-12-21 21:34:57 +00:00
Tim Kientzle b7da00c2fa MFC r1.5: Remove some stdio dependencies. 2004-12-21 19:52:34 +00:00
Simon L. B. Nielsen 059435110a MFC: 1.265+1.266:
- Auto generate device listings for the snd_maestro(4),
  snd_maestro3(4), pst(4), and vpo(4) device drivers.
2004-12-21 15:29:59 +00:00
Simon L. B. Nielsen 5018a6fcbc MFC: 1.48+1.49:
- Auto generate device listings for the snd_maestro(4),
  snd_maestro3(4), pst(4), and vpo(4) device drivers.
2004-12-21 15:18:46 +00:00
Simon L. B. Nielsen 2a4a1d9221 MFC 1.4:
- Add a HARDWARE section which lists supported devices.
2004-12-21 15:11:16 +00:00
Simon L. B. Nielsen fc8d60d4cc MFC 1.21:
- Add a HARDWARE section which lists supported devices.
2004-12-21 15:10:44 +00:00
Simon L. B. Nielsen 47fb07a95e MFC 1.5:
- Add a HARDWARE section which lists supported devices.
- "device sound" does not pull in sound device drivers (like "device
  pcm" used to do), so do not mention that option.
- Make the document title more like the title in the other sound
  device drivers.
2004-12-21 15:08:50 +00:00
Simon L. B. Nielsen 9204300d14 MFC:
- Add manual page for snd_maestro(4).
2004-12-21 15:06:33 +00:00
Simon L. B. Nielsen 56a58f22d0 MFC 1.10+1.11:
- Make a warning less cryptic.
- Update usage to reflect the current reality.
- Fix a bug where manual pages which had a "_" in their name did not
  get proper architecture setting.
2004-12-21 14:57:43 +00:00
cvs2svn 2b9c2a9c1e This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-12-21 12:49:25 +00:00
Yaroslav Tykhiy eddc372d73 MFC 1.198:
Never emit a message to stderr: use syslog instead.
When in inetd mode, this prevents bogus messages from
appearing on the control channel.  When running as a
daemon, we shouldn't write to the terminal we used to
have at all.
2004-12-21 12:44:00 +00:00
Pyun YongHyeon 8864ed5be2 MFC:
Add manual page for snd_audiocs(4).
2004-12-21 07:51:49 +00:00
Alan Cox a1d459e4fd MFC revision 1.265
Eliminate unnecessary calls to vm_page_busy().
2004-12-20 23:15:58 +00:00
Tom Rhodes 97f6e85a74 MFC: 1.34: Fix a style bug. 2004-12-20 20:27:21 +00:00
Ralf S. Engelschall 65dcbce559 MFC rev. 1.48:
Synchronize reference list to the ng_xxx(4) manpages of netgraph nodes
with the actually installed manpages by adding the missing ones. This
way they can be found more easily.
2004-12-20 19:19:03 +00:00
Christian Brueffer 3d84401ccf MFC:
Autogenerate device listings for ng_bt3c(4) and umass(4).
2004-12-20 18:22:09 +00:00
Christian Brueffer a0c19563f9 MFC: rev. 1.38
- add a HARDWARE section based on the hardware notes and the devices
  already listed in the manpage
- reword some DESCRIPTION sentences
- Xref ehci(4)
- bump .Dd
2004-12-20 18:13:58 +00:00
Christian Brueffer 38835335b7 MFC: rev. 1.8 + 1.9
- add a HARDWARE section
- several grammar and language fixes
- bump .Dd
2004-12-20 18:11:29 +00:00
Christian Brueffer 107965bbec MFC: rev. 1.4
Add missing word.
2004-12-20 18:04:32 +00:00
Christian Brueffer 6bfa369d1e MFC: rev. 1.11
Properly capitalize FireWire
2004-12-20 18:02:36 +00:00
David E. O'Brien da2ad80fba MFC: rev 1.21: use the 32-bit version of fuword/suword 2004-12-20 16:26:52 +00:00
Andrew Gallatin 7418e4a2a8 MFC: src/tools/tools/kttcp/kttcp.c 1.3
MFC: src/tools/tools/kttcp/sys/kttcp.c 1.4

  Make kttcp work in -stable (and -current)

  - Removed kttcp_sosend() and kttcp_soreceive() in favor of using
    sosend() / soreceive() with UIO_NOCOPY.  The locking changes in the
    socket layer make merging the kttcp_so* and the so* routines a real
    pain.  It was a lot easier to just use the integrated routines.

  - Eliminated KTTCP_MAX_XMIT restrictions on send and receive sizes
    because I encountered no problems with streams larger than MAX_INT.
    MAX_INT bytes is only good for a few seconds at 4Gb/sec ;)

  - Removed Giant from send / recv routines.

  - Fixed character device protos, cdevsw init, etc, to work in 5.x /
    6.x
2004-12-20 15:08:53 +00:00
Ruslan Ermilov 95bc634099 MFC: Sync. 2004-12-20 10:13:13 +00:00
Kirill Ponomarev 0b0b4475ce MFC: rev 1.48
Introduce new variables FETCHINDEX, MASTER_SITE_INDEX and add
description for MASTER_SITE_BACKUP.
2004-12-20 08:09:58 +00:00
Nate Lawson b157db49aa Bring ACPI man pages up to HEAD. 2004-12-19 22:16:15 +00:00
Nate Lawson 9d77e66042 MFC: Only export defined symbols. 2004-12-19 20:34:13 +00:00
Nate Lawson 43c4511b57 MFC: Use PCI values for ACPI power states as both are equivalent. 2004-12-19 20:33:49 +00:00
Mark Santcroos 57c4436f7b MFC acpi_acad.c:1.32
MFC acpi_cmbat.c:1.38
MFC OsdInterrupt.c:1.19
MFC OsdSchedule.c:1.30

  Catch up with AcpiOsSleep() interface change.
  Catch up with some #define's renaming.
  Implement AcpiOsGetTimer() as per ACPI 3.0.
2004-12-19 04:17:49 +00:00
Mark Santcroos fe3c393716 MFC 1.195: Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.
2004-12-19 04:11:44 +00:00
Tim J. Robbins 8593446f7d MFC rev. 1.15: fix computation of the 'n' argument to mbrtowc(), avoiding
infinite loops in regexec() with certain combinations of patterns and
strings in multibyte locales.

PR:		74020
2004-12-19 04:10:56 +00:00
Mark Santcroos 544f8b6e59 MFC of ACPI-CA 20041119 import. 2004-12-19 04:06:16 +00:00
cvs2svn c04194450e This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-12-18 16:31:22 +00:00
Gleb Smirnoff 898834b0d3 MFC 1.32:
Note that send(2) is no longer applicable to divert(4) sockets.
2004-12-18 09:26:37 +00:00
Ruslan Ermilov bb4850d0de MFC: Uncomment entries for FreeBSD 4.11, 5.4, and 6.0.
Thanks to:	jkoshy
2004-12-18 07:33:37 +00:00
Max Laier 16e8ff247d MFC ip_nat.c rev. 1.37:
Make ip_nat compile again. Should read #if->n<-def LARGE_NAT as in ipf 4.x

Insta-MFC approved by:	scottl
2004-12-18 03:49:56 +00:00
Colin Percival 75fef9294a MFC revision 1.328 (and typo fix 1.329):
Check that saddr->sa_family is a sensible value before using it.
2004-12-18 03:32:27 +00:00
Christian Brueffer 2c760ca03b MFC: rev. 1.14
Fix typo in a comment.
2004-12-18 02:26:06 +00:00
Christian Brueffer f25459ccd1 MFC: rev. 1.15 + 1.16
First update for the 5721/5750/5751 chips.
2004-12-18 02:24:43 +00:00
Christian Brueffer 012ee6f4a9 MFC: rev. 1.6
Remove clauses 3 and 4 of the license.
2004-12-18 02:23:15 +00:00
Christian Brueffer 26c015e065 MFC:
Specify the state of my birth, similar to other entries.
2004-12-18 00:59:22 +00:00
Alan Cox 998654adb9 MFC revision 1.40
Eliminate unnecessary calls to vm_page_busy().
2004-12-17 22:43:49 +00:00
Alan Cox 192fb0118b MFC revision 1.206
Eliminate unnecessary calls to vm_page_busy().

MFC revision 1.205
 Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().
2004-12-17 22:21:08 +00:00
Paul Saab 8e3ec3ced0 MFC: Support the 5721 2004-12-17 21:51:45 +00:00
Darren Reed b53a98b042 Move two variables that are unused if LARGE_NAT is defined inside an #ifdef
to keep them out of harms way when compiling.

PR:	72783
2004-12-17 15:59:16 +00:00
Ruslan Ermilov cf49fa73b6 MFC: Teach sockstat(1) about divert(4) sockets. 2004-12-17 10:01:01 +00:00
Ruslan Ermilov ca7fcbc052 MFC: 1.42: FreeBSD 4.11 and FreeBSD 6.0. 2004-12-17 09:36:00 +00:00
Darren Reed e263269b78 Allow ipnat redirect rules to work for non-TCP/UDP packets.
PR:             70038
Submitted by:   [email protected]
Reviewed by:    darrenr
Obtained from:  [email protected]
2004-12-17 02:29:34 +00:00
Christian Brueffer 8919eea6e0 MFC: rev. 1.14
- Xref fwip(4)
- bump .Dd
2004-12-17 02:06:04 +00:00
Christian Brueffer 4bff04a72e MFC: rev. 1.10
- Xref fwip(4)
- bump .Dd
2004-12-17 02:03:59 +00:00
Christian Brueffer 3e6394d146 MFC: rev. 1.4
- remove nonexistant "device fwohci"
- sort SYNOPSIS devices
- Xref fwe(4)
- bump .Dd
2004-12-17 02:01:50 +00:00
Christian Brueffer c98c3a3ef3 MFC: rev. 1.6
- remove nonexistant "device fwohci"
- sort SYNOPSIS devices
- capitalize Ethernet
- Xref fwip(4)
- bump .Dd
2004-12-17 02:01:09 +00:00
Christian Brueffer e3108dfd0b MFC: rev. 1.11
- Xref fwip(4) and eui64(5)
- correct a grammar nit
- bump .Dd
2004-12-17 01:59:42 +00:00
Christian Brueffer 3e6e164c10 MFC: rev. 1.16
fwip(4) supports polling.
2004-12-17 01:58:58 +00:00
Scott Mitchell f961cf6cf5 MFC: Diff-reduction before merging if_axe to RELENG_4.
Approved by:	imp (mentor)
2004-12-16 22:55:33 +00:00
David E. O'Brien 61c1432b56 MFC. 2004-12-16 22:20:02 +00:00
David E. O'Brien 5bf2df40c6 MFC: revs 1.42-1.47 (minus 1.45):
+ Define "I386_CPU" if CPUTYPE is 'i386'.
+ Embellish the AMD64 sections a little.  Including supporting 'nocona'.
+ Simplify by treating the standard x86 CPU names as the CPUTYPE vs.
  treating them as an alias.
+ Separate the x86 GCC CPU CFLAGS from the ICC CFLAGS.
+ Add support for Pentium M, Pentium 3M and Pentium 4M.
2004-12-16 22:17:44 +00:00
David E. O'Brien bb505da760 MFC rev 1.44: for variables that are only checked with defined(), don't provide
any fake value.
2004-12-16 22:14:43 +00:00
David E. O'Brien e21e02381f MFC: install magic.h, and don't depend on 'uniq'. 2004-12-16 22:13:06 +00:00
Darren Reed 4c6207b23a Using just m_pullup to get all of the interesting bits in packet into one
buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an
easy drop-in replacement.

PR:	70399
2004-12-16 21:02:16 +00:00
Maxim Konovalov 8ff80f18c4 MFC rev. 1.86 and rev. 1.87: fix the release date of 5.3-RELEASE,
add NetBSD 2.0.
2004-12-16 20:38:03 +00:00
Makoto Matsushita cf3f0d888b MFC 1.49: typo fix. 2004-12-16 03:41:44 +00:00
Brian Somers 48c2037cd8 MFC: Handle select() returning -1/EINTR
PR:		74972
2004-12-16 01:59:00 +00:00
Christian Brueffer adb159bfa6 MFC: rev. 1.5
Remove the "SUPPORTED DEVICES" section, which now resides
in altq(4).
2004-12-15 19:42:05 +00:00
Ruslan Ermilov d61802176c MFC: 1.33: Fixed compilation warnings with option VGA_NO_MODE_CHANGE. 2004-12-15 13:55:00 +00:00
Paul Saab 63d02c3634 MFC: Forgot to update this when merging support for the 5750/5751. 2004-12-15 03:38:06 +00:00
Christian Brueffer 511d9feb9d MFC:
URL of the data sheet has changed.
2004-12-14 20:20:23 +00:00
Christian Brueffer fd0bc9fce8 MFC: rev. 1.25
Various language tweaks.
2004-12-14 20:16:57 +00:00
Bjoern A. Zeeb e296728ad9 MFC:
if_sk.c    rev. 1.87 (partly) date: 2004/11/01 17:21:04;  author: obrien
        * Correct an off-by-one reading vpd ro data.
if_sk.c    rev. 1.90          date: 2004/11/15 19:37:21;  author: jmg
if_skreg.h rev. 1.24          date: 2004/11/15 19:37:21;  author: jmg
        fix the missing lock in sk_jfree (verified w/ an assert)
        also fix up handling and proding of the tx, _OACTIVE is now handled
        better...
if_sk.c    rev. 1.91          date: 2004/11/15 22:24:32;  author: jmg
        move the lock after the NULL check so we don't have a hard(er) to
        diagnose panic...
if_sk.c    rev. 1.92          date: 2004/11/17 21:35:22;  author: jmg
        only clear the IFF_OACTIVE flag when we have a chance of being able to
        queue a packet to the hardware... instead of when the hardware queue is
        empty..
        don't initalize cur_tx now that it doesn't need to be...

Approved by:	pjd (mentor)
2004-12-14 09:13:55 +00:00
Maksim Yevmenkin 4ed4e04b43 MFC:
Add workaround for {not so|too} smart phones that cannot handle SDP attribute
ID ranges that consist of exactly one attribute ID. libsdp(3) will check start
and end of the attribute ID range and if they are the same the range will be
collapsed to one atribute ID.

The problem was observed on Audiovox SMT5600 and Palm Treo 650.

Reviewed by:	re (kensmith, scottl)
2004-12-13 17:35:05 +00:00
Pyun YongHyeon cf869b1407 MFC snd_audiocs(4) to RELENG_5
Device driver for onboard CS4231 audio controller which is found
  on UltraSPARC workstations. The driver is based on OpenBSD's SBus
  cs4231 driver and heavily modified to incorporate into sound(4)
  infrastructure. Due to the lack of APCDMA documentation, the DMA
  code of SBus cs4231 came from OpenBSD's driver.
  The driver runs without Giant lock and supports both SBus and EBus
  based CS4231 audio controller. Special thanks to marius for providing
  feedbacks during the driver writing. His feedback made it possible
  to write hiccup free playback code under high system loads.
2004-12-13 11:12:50 +00:00
Daniel Hartmeier b372dd84df MFC: IPv6 packets can contain headers (like options) before the TCP/UDP/
ICMP6 header. pf finds the first TCP/UDP/ICMP6 header to filter by
     traversing the header chain. In the case where headers are skipped,
     the protocol checksum verification used the wrong length (included
     the skipped headers), leading to incorrectly mismatching checksums.
     Such IPv6 packets with headers were silently dropped.
2004-12-13 08:02:36 +00:00
Kelly Yancey 6e4947f823 Merge revision 1.247: Clear trace bit on new processes unless the
PROC_FORK flag was set on the parent.
2004-12-13 04:09:01 +00:00
Sam Leffler dca19fa045 MFC: hifn7751.c 1.29, hifn7751var.h 1.5
Move session state from on-card memory to host memory so we no longer are
  constrained to a small number of sessions by the small on-card memories found
  in newer devices.  This is really a stopgap solution as having session state
  in main memory incurs a (small but noticeable) performance penalty. The better
  solution is to manage session state so that it's cached on chip.
2004-12-13 00:57:10 +00:00
Marius Strobl 11ad83b2b0 MFC whois.c:
1.42: Add a -k flag for querying whois.krnic.net (the National Internet
      Development Agency of Korea) which hold details of IP address
      allocations within Korea.

MFC whois.1:
1.33: Add a -k flag for querying whois.krnic.net (the National Internet
      Development Agency of Korea) which hold details of IP address
      allocations within Korea.
1.34: Bump document date.

Short MFC interval to get this into RELENG_4 via RELENG_5 before the
freeze for FreeBSD 4.11.

MFC ok'ed by:	ceri
2004-12-12 23:52:00 +00:00
Alan Cox c722dbe8f2 MFC vm_page.c's revision 1.294 and vm_page.h's revision 1.134
Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab()
 that indicates that the caller does not want a page with its busy flag
 set.  In many places, the global page queues lock is acquired and released
 just to clear the busy flag on a just allocated page.  Both the allocation
 of the page and the clearing of the busy flag occur while the containing
 vm object is locked.  So, the busy flag might as well never be set.

MFC vm_page.c's revision 1.298
 This change (1) eliminates the calls to vm_page_busy() that
 immediately precede a call to vm_page_remove() or functions, such as
 vm_page_free() and vm_page_rename(), that call it and (2) relaxes the
 requirement in vm_page_remove() that the vm page's PG_BUSY flag is
 set.
2004-12-12 20:45:07 +00:00
Marcel Moolenaar f41b8f1690 Insta-MFC rev. 1.155: Fix the last of the instability and the cause of
the annoying "vm_fault: fault on nofault entry, addr: %lx" panic.
2004-12-12 19:41:20 +00:00
Archie Cobbs 9b41a267ef MFC: (1.52) Disable protocol field compression on inner frame when compressing. 2004-12-12 19:37:52 +00:00
Max Laier b9e66edf01 MFC: in.c, rev. 1.78-1.80 and if_ether.c, rev. 1.132
Change the way we automatically add prefix routes when adding a new
  address.  This makes it possible to have more than one address with the
  same prefix.  The first address added is used for the route. On deletion
  of an address with IFA_ROUTE set, we try to find a "fallback" address and
  hand over the route if possible.

Obtained from:  Open/NetBSD
Discussed on:	-net, -arch
A lot of help:	ru
2004-12-12 19:12:35 +00:00
Gregory Neil Shapiro 7f1f4e619b MFC: Enable _FFR_DEAL_WITH_ERROR_SSL to deal with OpenSSL error returns of 0.
PR:	bin/73105

     Revision  Changes    Path
     1.48      +1 -1      src/usr.sbin/sendmail/Makefile
2004-12-12 18:59:26 +00:00
Poul-Henning Kamp 50b37f1423 MFC: 1.263 +1 -0 src/sys/ufs/ffs/ffs_vfsops.c
vinvalbuf() when we fail to mount a prospective filesystem.
2004-12-12 15:59:05 +00:00
Roman Kurakin 04d92ca9ce MFC:
Add Tau-PCI-L(/R) model to list of supported hardware.
2004-12-12 12:21:51 +00:00
Gleb Smirnoff b01d67529a MFC 1.3:
- Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
  - Always check that index number passed from userland
    is <= NG_NETFLOW_MAXIFACES. [1]
  - Increase NG_NETFLOW_MAXIFACES up to 512. [2]
2004-12-12 10:38:52 +00:00
Alan Cox 2b77e2be67 MFC revision 1.206
Almost nine years ago, when support for 1TB files was introduced in
 revision 1.55, the address parameter to vnode_pager_addr() was changed
 from an unsigned 32-bit quantity to a signed 64-bit quantity.  However,
 an out-of-range check on the address was not updated.  Consequently,
 memory-mapped I/O on files greater than 2GB could cause a kernel panic.
 Since the address is now a signed 64-bit quantity, the problem resolution
 is simply to remove a cast.
2004-12-12 08:26:50 +00:00
Alan Cox b11266e6a2 MFC revision 1.26
Remove useless casts.
2004-12-12 07:35:25 +00:00
Alan Cox b7876ec029 MFC revision 1.39
Acquire the vm object lock before rather than after calling
 vm_page_sleep_if_busy().  (The motivation being to transition
 synchronization of the vm_page's PG_BUSY flag from the global page queues
 lock to the per-object lock.)
2004-12-12 06:54:23 +00:00
Alan Cox cbe3d2fe2c MFC revisions 1.262-1.264 and 1.266
During traversal of the active and inactive queues, try locking the page's
 containing object before accessing the page's flags or the object's
 reference count.
2004-12-12 06:23:03 +00:00
Alan Cox dac3a90dee MFC revision 1.332
Move the acquisition and release of the lock on the object at the head of
 the shadow chain outside of the loop in vm_object_madvise(), reducing the
 number of times that this lock is acquired and released.

MFC revision 1.336
 Eliminate an unnecessary atomic operation.  Articulate the rationale in
 a comment.
2004-12-12 03:42:58 +00:00
Alan Cox 9a92edde9a MFC revision 1.195
In vm_fault_unwire() eliminate the acquisition and release of Giant in the
 case of non-kernel pmaps.
2004-12-12 01:43:40 +00:00
Scott Mitchell a4f4d2b045 MFC: r1.8 - Add Intel EtherExpress PRO/100 LAN/Modem card. 2004-12-11 23:17:58 +00:00
Scott Mitchell b34285f109 MFC: r1.271 - Add Intel EtherExpress PRO/100 LAN/Modem card.
PR:		53027
Submitted by:	John Merryweather Cooper <coop9211 at uidaho dot edu>
Approved by:	imp (mentor)
2004-12-11 23:15:52 +00:00
Scott Mitchell 71f03a8083 MFC: r1.19 - clean up resources when attach fails.
PR:		kern/34306
Submitted by:	gibbs
Approved by:	gibbs, imp (mentor)
2004-12-11 23:12:59 +00:00
Roman Kurakin 4fcccc66d3 MFC:
Add support for Tau-PCI_L model - one V.35/RS-232 or
	RS-530(449) interface.

----------------------------------------------------------------------
2004-12-11 22:57:08 +00:00
Wilko Bulte 08b937fbc1 Alpha can use 1 or 2 Gbyte of physical RAM max. 2004-12-11 20:32:37 +00:00
Gleb Smirnoff d3b0641336 MFC:
Make route caching for gif(4) optional and disabled by default.
2004-12-11 19:57:16 +00:00
Alexander Nedotsukov 371a06f06a MFC: 1.21
Fix -t option processing.
Partially initialized tm structure was passed into mktime(3).

Approved by:	ru
2004-12-11 17:16:45 +00:00
Xin LI 69ba49088d MFC 1.7: Correct two bugs that may result in incorrect CBCP response for
administrator specified number.
2004-12-11 11:23:56 +00:00
Ralf S. Engelschall 8c6004c292 MFC etc/rc.d/ike 1.3, etc/rc.d/pf 1.4, etc/rc.d/pflog 1.3:
We don't have any providers of `beforenetlkm' in FreeBSD.
    Remove the dependency to it from our rc.d scripts.

This resolves the following rcorder(8) complains in 5.3-STABLE:

$ rcorder /etc/rc.d/* 2>&1 | grep rcorder
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/ike' has no providers.
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pflog' has no providers.
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pf' has no providers.
2004-12-10 19:11:26 +00:00
Scott Long bd43f14d90 MFC: Move aac_ioctl.h to /sys/sys so that it's visible to userland programs.
Approved by: re
2004-12-10 16:37:14 +00:00
Yaroslav Tykhiy 5b3a1c2637 MFC 1.24:
Fix off-by-one errors and potential buffer overruns
in handling file and link names that reach the allowed
maximum for old tar and ustar archive formats.
2004-12-10 15:13:46 +00:00
Ralf S. Engelschall 232ffe028b MFC rc.d/jail 1.18/1.19, defaults/rc.conf 1.232:
Implement per-jail fstab(5) files.
2004-12-10 14:18:52 +00:00
Christian S.J. Peron b6a1cbc0b6 MFC v1.5
Log:
  -Add a note that currently two syntax styles for label element declaration
   is supported.
  -Document the new more preferred syntax
  -Add examples for the new syntax
  -Add a note that the old syntax will be deprecated in the future.
2004-12-10 04:59:48 +00:00
Christian S.J. Peron 8de45d3f55 MFC v1.83
Log:
  Remove un-needed call to close(2). The fd that close is being
  called on is invalid and has no use.
2004-12-10 04:55:51 +00:00
Christian S.J. Peron 536255500b MFC v1.19
Log:
  Document the fact that kvm_getenvv(3) requires procfs to be mounted
  on /proc in order to operate correctly.
2004-12-10 04:54:27 +00:00
cvs2svn 1e6b616bdf This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-12-09 22:20:26 +00:00
Simon L. B. Nielsen ca4b6f43ff MFC:
Add a SYNOPSIS section for io(4), mem(4), or random(4), since they are
now optional devices.
2004-12-08 22:59:31 +00:00
Simon L. B. Nielsen ee2656504e MFC 1.7:
WITNESS_DDB is now called WITNESS_KDB.
2004-12-08 22:53:32 +00:00
Simon L. B. Nielsen c861ee1a1e MFC 1.26:
DDB_UNATTENDED is now called KDB_UNATTENDED.
2004-12-08 22:49:40 +00:00
Simon L. B. Nielsen fb1857b9db MFC:
Auto generate device listings for the snd_ich(4) driver.
2004-12-08 22:47:43 +00:00
Simon L. B. Nielsen 34850c33cf MFC:
Add manual page for snd_ich(4).
2004-12-08 22:38:55 +00:00
Lukas Ertl 7ca45cd0e6 MFC:
Implement 'setstate' to allow setting the state of drives and subdisks
  for debugging and emergency purposes.
2004-12-08 20:47:56 +00:00
Lukas Ertl b760bfbb64 MFC:
Implement checkparity/rebuildparity.
2004-12-08 20:46:01 +00:00
Lukas Ertl 026fd72528 MFC:
Implement 'setstate' to allow setting the state of drives and
  subdisks for debugging and emergency purposes.
2004-12-08 20:41:44 +00:00
Lukas Ertl 058f5842cb MFC:
Implement checkparity/rebuildparity.
2004-12-08 20:36:35 +00:00
Lukas Ertl 6312f4060d MFC:
Share gv_roughlength() between kernel and userland, as we will need it
  there later.
2004-12-08 20:31:36 +00:00
Lukas Ertl 55b9f31a8e MFC:
Move RAID5 offset calculation into a separate function to avoid
   code duplication.
2004-12-08 20:25:31 +00:00
Lukas Ertl c4a306aef0 MFC:
Share gv_roughlength() between kernel and userland, as we will need it
  there later.
2004-12-08 20:19:31 +00:00
Peter Edwards 4ee2a8b4bc MFC of 1.4:
don't cause overflow trap when dividing LONG_MIN by 1
2004-12-08 20:17:16 +00:00
Peter Edwards d37f651b57 MFC of 1.4:
don't cause an overflow trap when dividing LONG_MIN by 1
2004-12-08 20:15:49 +00:00
Nate Lawson fee85b67a1 MFC 1.196: Hold Giant around DEVICE_SUSPEND/RESUME. 2004-12-08 06:31:18 +00:00
Max Laier c08284575d MFC:
Teach periodic(8) security output to display information about blocked
  packet counts by pf(4).

  This adds a `daily_status_security_pfdenied_enable'' variable to
  periodic.conf, which defaults to `YES'' as the matching IPF(W) versions.

  Submitted by:   clive (thanks a lot!)

PR:	conf/73959
2004-12-08 00:37:50 +00:00
Ralf S. Engelschall 9e9bed8498 MFC 1.3:
Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".
2004-12-07 17:31:02 +00:00
Ralf S. Engelschall ca73362bb3 MFC 1.233:
Document how to allow to change interfaces name on boot time.
2004-12-07 14:59:46 +00:00
Kris Kennaway b92fda1713 MFC: Add more commonly-used locale directories 2004-12-07 02:54:17 +00:00
Peter Wemm a4f451cc0c MFC: switch from HZ=1024 to HZ=1000 for amd64. For various reasons, this
is a better number and fortunately the change is harmless.
2004-12-06 23:11:47 +00:00
Ken Smith 8103c88987 Change comment to note this is in a -stable branch instead of -current
now.
2004-12-06 19:34:08 +00:00
Ralf S. Engelschall d2269515dc MFC: Allow to change network interface names during
boot time with "ifconfig_<old>_name=<new>" in rc.conf

Merged revisions:
  network.subr:     1.157-1.160
  defaults/rc.conf: 1.227
  rc.d/netif:       1.12
2004-12-06 19:09:03 +00:00
Daniel Hartmeier 54c3fb358e MFC: fix a bug that leads to a crash when binat rules of the form
'binat from ... to ... -> (if)' are used, where the interface
     is dynamic.
2004-12-06 18:17:23 +00:00
Ceri Davies 02f7d52c1a MFC revision 1.20:
Add amd64 to the list of supported platforms.
2004-12-06 18:14:51 +00:00
Ceri Davies 1c318e459b MFC r1.13:
Clarify that devd will only parse files whose names end in
	.conf.
2004-12-06 18:10:02 +00:00
Paul Saab 036a308912 MFC: rev 1.106
Fixes a bug in SACK causing us to send data beyond the receive window.
2004-12-06 17:13:20 +00:00
Xin LI 0c2c93aca8 MFC glibc-style strftime(3) -(no padding), _(use space as padding),
and 0(zero padding) padding specifiers.

Bump __FreeBSD_version so the ports team would be able to distinguish
between 5.3-STABLE before and after this change.
2004-12-06 16:13:17 +00:00
cvs2svn 6be06e7cb3 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-12-06 13:15:24 +00:00
David E. O'Brien 2ad78170c8 Update statements about -O2. 2004-12-06 09:57:45 +00:00
David E. O'Brien 6b90140ad0 MFC: rev 1.11: enable amr(4) - scottl fixed when used with >4GB RAM. 2004-12-06 05:46:11 +00:00
Scott Long 3a1428426d MFC: Fix amr(4) to support more than 4GB of RAM. While this MFC may seem
hasty, the patches have been under test for quite some time.
2004-12-05 23:59:11 +00:00
Gleb Smirnoff 7855d91284 MFC 1.35:
Netgraph flow control: change interface status when node receive
  LINK_IS_UP/LINK_IS_DOWN messages.
2004-12-05 20:06:01 +00:00
Gleb Smirnoff 67f82e130a MFC ng_one2many.c:1.19, ng_one2many.h:1.7
Introduce new failure detection algorithm, called NG_ONE2MANY_FAIL_NOTIFY.
  It means, that node listens to flow control messages from downstreams
  and removes link from list of active links whenever a LINK_IS_DOWN message
  is received. If LINK_IS_UP message is received, then links is put
  back into list of active links.
2004-12-05 19:34:13 +00:00
Gleb Smirnoff 82ffa4494c Sync with HEAD, MFC the following:
1.24: style fixes, remove spl(9) calls
  1.25: send flow control messages
        use ng_timeout()
  1.26: s/ng_timeout/ng_callout/g
2004-12-05 19:25:10 +00:00
Gleb Smirnoff 95e9b3672c MFC 1.31-1.32:
- Try to open /var/run/logpriv.
  - When send() returns ENOBUFS keep trying until success, unless
    we are using /var/run/logpriv.
2004-12-05 18:26:07 +00:00
Gleb Smirnoff ca779c06fe Sync with HEAD, MFC the following:
1.53: Document how to set file mode in -l.
  1.54: Document path to privileged socket.
  1.55: Add newsyslog(8) to the "See Also" section.
  1.56 - 1.57: Grammar and mdoc fixes.
2004-12-05 15:33:30 +00:00
Gleb Smirnoff dbb1ec2ffd Sync with HEAD, MFC the following:
1.132: Use stailqueue for sockets. Remove limit. Add possibility
	 to specify file mode for sockets created with -l.
  1.133: Open an additional socket /var/run/logpriv, with 0600 perms.
  1.134: Double receive buffer size on sockets.
  1.135 - 1.138: Whitespace and grammar.
2004-12-05 15:29:40 +00:00
Gleb Smirnoff ae12931247 MFC 1.25:
Define _PATH_LOG_PRIV
2004-12-05 15:25:44 +00:00
Bjoern A. Zeeb f6d9d809a7 MFC revision 1.21
With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in from
   NetBSD got activated. NetBSD has an additional change in
   their mii.c rev 1.26 which got missed with that merger:

   : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well,
   : not just the media mask.  This prevents PHYs/TBIs that only support
   : Gigabit media from slipping through the cracks.

  With this GE only ones like from the SK-9844 are detected again.

  PR:             i386/63313, i386/71733, kern/73725
  Tested by:      matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov>
  Obtained from:  NetBSD mii.c rev 1.26

Approved by:	rwatson (mentor)
2004-12-05 03:11:12 +00:00
Scott Long ef0d528827 MFC: Don't consider boundary constraints when deciding whether to bounce.
This fixes certain classes of mysterious hangs in the device probe during
boot.
2004-12-04 05:59:36 +00:00
Max Khon e3fb951b3d MFC: Use M_ZERO to not panic in mtx_init when INVARIANTS enabled.
Submitted by:	simokawa
2004-12-03 22:21:20 +00:00
Christian Brueffer ee3371e070 MFC: rev. 1.296
MLINK crypto.4 to cryptodev.4
2004-12-03 01:52:27 +00:00
Christian Brueffer b29ef4148b MFC: rev. 1.13
- add vge(4)
- bump document date
2004-12-03 01:01:43 +00:00
Garrett Wollman e32ade611e MFV tzdata2004g. 2004-12-02 23:04:38 +00:00
Yaroslav Tykhiy c308ab60a1 MFC: Try using packet mode by default, but provide a user
with a knob to disable it at build time--flag 0x80 for
	BOOT_MBR_FLAGS and BOOT_BOOT1_FLAGS.  In fact, disabling
	packet mode completely, even a test for it, should be
	necessary only for old and brain-damaged machines FreeBSD 5
	will hardly run on.

	mbr/Makefile	1.14
	mbr/mbr.s	1.7
	boot2/Makefile	1.57
	boot2/boot1.S	1.30

Encouraged by:	Valentin Nechayev
2004-12-02 19:01:45 +00:00
Roman Kurakin d86f27cef9 MFC -j 1.5 -j 1.6
Log:
	Fix typo.

	Submitted by:   Janusz Muc'ka (Defacto) <gdef at cvd dot pl>
2004-12-02 17:12:06 +00:00
Yaroslav Tykhiy 372feacc09 MFC: Fixes and improvements to verbose logging of user activity.
ftpd.c:	rev. 1.184, 1.192, 1.195
2004-12-02 15:52:28 +00:00
Xin LI 928076096d MFC 1.41:
Try to close a potential, but serious race in our VM subsystem
that may result in panic with damaged page bucket hash table or
file system corruption.

The revision 1.41 tighten the check of vm_contigalloc1() and
vm_contigalloc2().

Please note that this MFC does not merged 1.39 and 1.40's changes.

Approved by:	alc
2004-12-02 08:49:54 +00:00
Colin Percival 693c2b61ef FreeBSD-SA-04:17.procfs:
MFC revision 1.54 of src/sys/fs/procfs/procfs_status.c
MFC revision 1.86 of src/sys/compat/linprocfs/linprocfs.c

Approved by:	so (nectar)
2004-12-01 21:34:43 +00:00
Gleb Smirnoff e68b9758d4 Mechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/.
Restore ng_timeout() and ng_untimeout() as they were in ng_base.c:1.84, so that
during RELENG_5 both interfaces are supported.

Reviewed by:	scottl
Approved by:	julian (mentor), implicitly
2004-12-01 13:02:13 +00:00
Gleb Smirnoff c0c0030091 MFC:
Utilize m_uiotombuf() instead of home-grown implementation.
2004-12-01 11:52:17 +00:00
Hidetoshi Shimokawa e6a17792bd MFC: Fix malloc type in free(). 2004-12-01 06:55:47 +00:00
Pyun YongHyeon b4b412e8d2 MFC if_fxp.c, 1.219 to RELENG_5:
Make interrupt coalescing work on big endian systems.
  Also change struct ucode.length to be in number of elements (u_int32_t)
  to help endian handling.
2004-12-01 05:51:25 +00:00
SUZUKI Shinsuke 8ae6e6d6bc MFC: support TCP-MD5(IPv4) in KAME-IPSEC, too.
1.207	src/sys/netinet/tcp_subr.c
	1.24	src/sys/netinet6/ah_core.c
	1.69	src/sys/netkey/key.c
	1.11	src/sys/netkey/key.h
	1.11	src/sys/netkey/keydb.h
2004-12-01 05:37:29 +00:00
Ian Dowse 99afcc5503 MFC: 1.55; add device IDs for Intel ICH6. 2004-12-01 03:08:14 +00:00
Ian Dowse eb65d88ebe MFC: 1.155; use __inline instead of __inline__. 2004-12-01 03:06:52 +00:00
Ian Dowse 12bf689ac1 MFC: 1.71, 1.72; ignore timeouts when preemptively clearing a stall. 2004-12-01 03:04:13 +00:00
Ian Dowse a7fb821643 MFC: fix the worst of the timeout race conditions:
usb_port.h	1.72
 uhci.c		1.159
 ehci.c		1.20
 ohci.c		1.147
2004-12-01 03:02:52 +00:00
Ian Dowse 1a982266c1 MFC: 1.65; report the error when a port is disabled. 2004-12-01 02:53:56 +00:00
Ian Dowse da02f7880d MFC: Various bug fixes and cleanups from NetBSD:
uhub.c		1.64
 ehcireg.h	1.6
 usb_subr.c	1.73
 usbdivar.h	1.42
 ehci.c		1.16, 1.17
2004-12-01 02:52:45 +00:00
Ian Dowse 3a6492ebb5 MFC: EHCI suspend/resume support from OpenBSD. 2004-12-01 02:46:45 +00:00
Ian Dowse c12b96246e MFC: 1.156; handle all interrupt types in polled mode. 2004-12-01 02:44:44 +00:00
Garrett Wollman 99cc0ad782 MFC: add a `-m' flag to specify the month without specifying the year. 2004-11-30 16:47:27 +00:00
Denis Peplin f9364ff0e1 Update to 1.69.2.15 2004-11-30 14:13:33 +00:00
Peter Wemm fc0feb9f0f MFC: Turn libobjc.so on for amd64. GNUstep needs it, for example. The
original reason libobjc.so was disabled has almost been lost in time.

PR: 71674
Submitted by:  Pete French <[email protected]>
2004-11-29 23:51:28 +00:00
Peter Wemm 2316fe7a24 Teach vinum that amd64 has slices. I'm lost for words.
Submitted by: Javier Ramirez <[email protected]>
PR: 72333
2004-11-29 23:40:17 +00:00
Nate Lawson cf530a8cd7 MFC 1.169 - 1.171: Run shutdown code on the BSP. This is only active
for i386 and amd64 until jhb@ MFCs the alpha cpuid code.
2004-11-29 19:11:36 +00:00
Robert Watson 5bd86e2de2 Merge randomdev_soft.c:1.5, 1.6, 1.7 from HEAD to RELENG_5:
----------------------------
  revision 1.7
  date: 2004/11/03 10:02:50;  author: rwatson;  state: Exp;  lines: +11 -14
  (1) Move from O(n) list copies to O(1) list concatenation, which is
      supported for STAILQ via STAILQ_CONCAT().

  (2) Maintain a count of the number of entries in the thread-local entropy
      fifo so that we can keep the other fifo counts in synch.

  MFC after:      3 weeks
  MFC with:       randomdev_soft.c revisions 1.5 and 1.6
  Suggested by:   jhb (1)
  ----------------------------
  revision 1.6
  date: 2004/10/12 14:57:14;  author: rwatson;  state: Exp;  lines: +6 -0
  Assert that the entropy source category provided by a caller submitting
  entropy is valid, as an invalid source will cause dereferencing of an
  array of queues to an incorrect memory location.
  ----------------------------
  revision 1.5
  date: 2004/10/09 22:04:13;  author: rwatson;  state: Exp;  lines: +41 -50
  Modify entropy harvesting locking strategy:

  - Trade off granularity to reduce overhead, since the current model
    doesn't appear to reduce contention substantially: move to a single
    harvest mutex protecting harvesting queues, rather than one mutex
    per source plus a mutex for the free list.

  - Reduce mutex operations in a harvesting event to 2 from 4, and
    maintain lockless read to avoid mutex operations if the queue is
    full.

  - When reaping harvested entries from the queue, move all entries from
    the queue at once, and when done with them, insert them all into a
    thread-local queue for processing; then insert them all into the
    empty fifo at once.  This reduces O(4n) mutex operations to O(2)
    mutex operations per wakeup.

  In the future, we may want to look at re-introducing granularity,
  although perhaps at the granularity of the source rather than the
  source class; both the new and old strategies would cause contention
  between different instances of the same source (i.e., multiple
  network interfaces).

  Reviewed by:    markm

Also merge subr_witness.c:1.182 from HEAD to RELENG_5:

  date: 2004/10/11 08:26:18;  author: rwatson;  state: Exp;  lines: +1 -2
  Add entropy harvest mutex to hard-coded spin lock witness lock order,
  remove previous entropy harvesting mutex names as they are no longer
  present.  Commit to this file was ommitted when randomdev_soft.c:1.5
  was made.

  Feet shot:      Robert Huff <roberthuff at rcn dot com>
2004-11-29 00:39:02 +00:00
Robert Watson 5a2bbee1d3 Merge tcp_input.c:1.256 from HEAD to RELENG_5:
date: 2004/11/22 13:16:27;  author: rwatson;  state: Exp;  lines: +0 -3
  Remove "Unlocked read" annotations associated with previously unlocked
  use of socket buffer fields in the TCP input code.  These references
  are now protected by use of the receive socket buffer lock.

  MFC after:      1 week
2004-11-29 00:29:40 +00:00
Christian Brueffer d5af655a9d MFC: rev. 1.76
Correct URL of the programming manual.
2004-11-28 23:35:08 +00:00
Christian Brueffer 9a02ea51ab MFC: rev. 1.294
MLINK vge.4 to if_vge.4
2004-11-28 23:31:54 +00:00
Christian Brueffer 4b133f5727 MFC:
Xref polling.4 and bump .Dd
2004-11-28 23:29:46 +00:00
Christian Brueffer 0815f92d88 MFC: rev. 1.5
sf(4) supports altq
2004-11-28 23:23:00 +00:00
Christian Brueffer ea2c21b2a9 MFC: rev. 1.75
Add altq support.

Patch by mlaier.

Approved by:	mlaier
2004-11-28 23:20:31 +00:00
Alan Cox feb91aa142 MFC revisions 1.193 and 1.195
Remove dead code.

 Don't clear flags we just checked were not set.
2004-11-28 20:52:16 +00:00
Ken Smith dab8cc04a6 Partial MFC of v1.60 I think. Switch it so 5-stable package fetches
look in packages-5-stable instead of packages-5-current.

Requested by:	kris
2004-11-28 19:14:36 +00:00
Xin LI 5430e4bf2f MFC rm.1,v 1.32-1.33; rm.c 1.51: -I option which asks for confirmation
once if recursively removing directories or if more than 3 files are
listed in the command line.
2004-11-28 14:19:20 +00:00
Bjoern A. Zeeb e1a7ca9f96 MFC knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Approved by:	rwatson (mentor)
2004-11-28 14:10:20 +00:00
Bjoern A. Zeeb c27c338349 MFC rev. 1.101
Document NO_NIS variable.

Approved by:	rwatson (mentor)
2004-11-28 13:47:12 +00:00
Alan Cox 2df0307dc9 MFC
Push Giant deep into vm_forkproc(), acquiring it only if the process has
 mapped System V shared memory segments (see shmfork_myhook()).
2004-11-28 05:08:02 +00:00
Max Laier bdd57f5532 MFC, if_ed.c rev 1.236
ALTQ-patch for ed(4).

  Requested and tested by:	pav
2004-11-28 00:39:32 +00:00
Alan Cox 9f6173439b MFC revision 1.198
Remove unnecessary check for curthread == NULL.

MFC revision 1.197
 System maps are prohibited from mapping vnode-backed objects.  Take
 advantage of this restriction to avoid acquiring and releasing Giant when
 wiring pages within a system map.

MFC revisions 1.193 and 1.194
 Further reduce the use of Giant by vm_fault(): Giant is held only when
 manipulating a vnode, e.g., calling vput().  This reduces contention for
 Giant during many copy-on-write faults, resulting in some additional
 speedup on SMPs.
2004-11-28 00:36:57 +00:00
Peter Wemm beb34d1b9d MFC: i386-on-amd64 binary support for TLS. Oops, I thought I'd already
added this.
2004-11-27 20:24:31 +00:00
Peter Wemm 2ea62e8e4d MFC: i386-on-amd64 binary glue. 2004-11-27 20:19:57 +00:00
Simon L. B. Nielsen 1d57ed88dc MFC 1.46+1.47:
- Document the DISABLE_VULNERABILITIES knob.
- Don't say this manual page is too long, it's not that long.
- s/man page/manual page/g
- Bump document date.
2004-11-27 15:05:27 +00:00
Peter Wemm 2146d083fe MFC: put build32.sh to death. Leave a pointer in the README file for a
while that directs people to the world hooks.
2004-11-26 19:33:01 +00:00
Peter Wemm 50fd22ed2f MFC: i386-on-amd64 compat glue 2004-11-26 19:30:06 +00:00
Peter Wemm 5e2cffc9e9 MFC: i386-on-amd64 TLS compat glue 2004-11-26 19:28:10 +00:00
Simon L. B. Nielsen b900bd285b MFC 1.22+1.23:
- Add Dell PERC 4e/Di and Dell PERC 4e/Si to the list of supported
  devices.
- Bump document date.
2004-11-26 18:31:57 +00:00
Gleb Smirnoff 85e2ddeb75 Note that several netgraph modules need to be rebuilt.
There were no such entry in HEAD, that's my fault.

Wording by:	rwatson
2004-11-26 11:19:12 +00:00
Gleb Smirnoff d8979f9db3 MFC new ng_{un,}timeout(), which uses callout() interface instead
of timeout(). Update all nodes using this interface.

Approved by:	julian (mentor)
2004-11-26 10:29:18 +00:00
Simon L. B. Nielsen 0c3828c84c MFC 1.231:
Only write the rc.conf header when a new rc.conf is written.

Approved by:	trhodes
2004-11-25 22:54:04 +00:00
Christian Brueffer 29e239e7ca Correct mismerged .Dd from rev. 1.30 2004-11-25 22:50:44 +00:00
Simon L. B. Nielsen 23b81ba000 Remove duplicate paragraph accidentally introduced in 1.29.2.1.
PR:		docs/74390
Submitted by:	Ulrich Spoerlein <[email protected]>
2004-11-25 22:42:28 +00:00
Yaroslav Tykhiy 99bfe859a3 MFC:
ftpd.c	 1.185	'\n' needs not to appear in reply() strings.

ftpd.c	 1.186	Fix perror_reply() vs. reply() usage.
ftpcmd.y 1.62	---"---
2004-11-25 10:25:30 +00:00
Yaroslav Tykhiy f71da0f3c0 MFC 1.18-1.19: Mention in the BUGS section that EVFILT_NETDEV events
on vlan(4) will be noticed only if the parent uses miibus(4).
2004-11-25 10:17:12 +00:00
Yaroslav Tykhiy bf86ac055a MFC 1.40: Document more struct stat fields. 2004-11-25 10:11:23 +00:00
Yaroslav Tykhiy 6f787c9d36 MFC 1.37: Document S_* macros. Bump .Dd. 2004-11-25 10:09:01 +00:00
Yaroslav Tykhiy cd19104391 MFC: markup (to reduce diff to HEAD.) 2004-11-25 10:06:01 +00:00
Yaroslav Tykhiy 68cfe45763 MFC 1.178: Follow RFC 959 regarding 21x status codes. 2004-11-25 09:53:14 +00:00
Pyun YongHyeon 54aaec5f98 MFC auxio(4) to RELENG_5:
Port NetBSD auxio driver. The driver was modified to use led(4) and can
  be used to announce various system activity.
  The auxio device provides auxiliary I/O functions and is found on various
  SBus/EBus UltraSPARC models. At present, only front panel LED is
  controlled by this driver.
2004-11-25 07:25:58 +00:00
Alan Cox 4c57cd7c8f MFC revision 1.197
Acquire and release Giant around a call to VOP_BMAP().  This is a
 prerequisite to any further reduction in Giant's use by vm_fault().
2004-11-24 19:48:07 +00:00
Christian Brueffer 35225f827c MFC: rev. 1.15
sf(4) supports polling now
2004-11-24 18:52:18 +00:00
Christian Brueffer 35172570e8 MFC:
Add device polling support

Approved by:	ru
2004-11-24 18:48:38 +00:00
John Baldwin 10b24f89ff MFC: Optimize atomic_store_rel() and atomic_load_acq() on UP kernels to
use simple load and store operations without any barriers.
2004-11-24 18:10:02 +00:00
Max Laier dd815e32ea MFC, pf_if.c rev. 1.7:
Improved interface handling. This fixes the use of renamed interfaces
  (ifconfig xl0 name foo) as well as some special interfaces such as the
  6to4 tunnel.

  Reported by:    Ed Schouten <ed (at) il ! fontys , nl>
  Tested by:      freebsd-pf
  PR:             kern/72444
2004-11-24 16:57:32 +00:00
John Baldwin 6c9d60c08d MFC: Add a witness_warn() to uiomove(). 2004-11-24 16:56:32 +00:00
John Baldwin 9dbb2a7c26 MFC: Don't adjust the random device kthread's priority to PUSER when
sleeping.
2004-11-24 16:06:02 +00:00
Robert Watson 7cf4dc3596 Merge if_em.c:1.53, if_em.c:1.54, if_em.h:1.29 from HEAD to RELENG_5:
date: 2004/11/14 20:20:28;  author: rwatson;  state: Exp;  lines: +19 -4
  Further refine the if_em vlan fix in if_em.c:1.53:

  - Because em_encap() can now fail in a way that leaves us without an
    mbuf chain, potentially set *m_headp to NULL if that happens, so that
    the caller can do the right thing.  This case can occur when we try
    to prepend the vlan header mbuf but can't allocate additional memory.

  - Modify the caller of em_encap() to detect a NULL m_head and not try
    to queue the mbuf if that happens.

  - When em_encap() fails, make sure to call bus_dmamap_destroy() to
    clean up.

  date: 2004/11/12 11:03:07;  author: rwatson;  state: Exp;  lines: +1 -0
  date: 2004/11/12 11:03:07;  author: rwatson;  state: Exp;  lines: +43 -6
  Correct a bug in the if_em driver relating to the use of vlans with
  promiscuous mode introduced in 1.45, which programs the em card not
  to strip or prepend tags when in promiscuous mode without also
  modifying behavior to manually prepend a vlan header in the event
  that the card isn't doing it on transmit.  Due to a feature of card
  operation, if the global VLAN prepend/strip register isn't set,
  setting the VLAN tag flag on individual packet descriptors will
  cause the packet to be transmitted using ISL encapsulation rather
  than 802.1Q VLAN encapsulation.

  This fix causes em_encap() to prepend the header by tracking whether
  the card is configured to temporarily disable prepending/stripping
  due to promiscuous mode.  As a result, entering promiscuous mode on
  the parent em interface no longer causes vlans to appear to "wedge"
  or transmit ISL-encapsulated frames, which typically will not be
  configured/spoken by the other endpoints on the VLAN trunk.  This
  bug may also exist in other drivers, and the additional vlan
  encapsulation logic should be abstracted and centralized in
  if_vlan.c if so.

  RELENG_5_3 candidate.

  MFC after:      1 week
  Tested by:      pjd, rwatson
  Reported by:    astesin at ukrtelecom dot net
  Reported by:    Mike Tancsa <mike at sentex dot net>
  Reported by:    Iasen Kostov <tbyte at OTEL dot net>

MFC after:	1 week
2004-11-23 22:28:40 +00:00
John Baldwin 574889ca1a MFC: Fix setting of ithread name and simplify setting of the IT_ENTROPY
flag.
2004-11-23 21:46:14 +00:00
John Baldwin 8c6b4ebcae MFC: Store threads on sleep queues in FIFO order rather than priority order
so that changing thread priorities are properly handled.
2004-11-23 21:41:19 +00:00
John Baldwin d3ed64707e MFC: Enhancements to the ddb "experience":
- Add paging support to the various MD stack trace handlers.
- Allow the number of lines per page to be adjusted via the $lines
  variable in ddb.  Setting this variable to 0 effectively disables
  paging.
- Fix the sparc64 userland stack trace to honor the total count argument
  so it won't loop forever in some cases.
2004-11-23 21:08:15 +00:00
Gleb Smirnoff 37592e1f3c MFC 1.110:
- Since divert protocol is not connection oriented, remove SS_ISCONNECTED flag
  from divert sockets.
- Remove div_disconnect() method, since it shouldn't be called now.
- Remove div_abort() method. It was never called directly, since protocol
  doesn't have listen queue. It was called only from div_disconnect(),
  which is removed now.

MFC part of 1.109:

- in the beginning of div_output() replace KASSERT with assignment, as
  it was in rev. 1.83.
2004-11-23 15:30:02 +00:00
Pyun YongHyeon 8e8514452a MFC t4dwave.c, 1.46 to RELENG_5:
Limit DMA address space to 1GB since the trident audio cards can't
  handle DMA addresses located above 1GB. The LBA(loop begin address)
  register which holds DMA base address is 32bits register. But the
  MSB 2bits are used for other purposes. This effectivly limits the
  DMA address space up to 1GB.
2004-11-23 08:43:09 +00:00
Pyun YongHyeon 04d56c23c9 MFC to RELENG_5:
ess.c, 1.33
mss.c, 1.92
sb16.c, 1.89
sb8.c, 1.78
au88x0.c, 1.9
aureal.c, 1.30
csapcm.c, 1.32
ds1.c, 1.41
emu10k1.c, 1.53
es137x.c, 1.52
fm801.c, 1.25
ich.c, 1.47
maestro3.c, 1.26
solo.c, 1.33
t4dwave.c, 1.45
via8233.c, 1.18
via82c686.c, 1.32

  Audio drivers failed to detect failure condition and attempted to
  assign DMA address to the wrong address. It can cause system lockup
  or other mysterious errors. Since most sound cards requires low DMA
  address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the
  audio driver is loaded after long running of operations.
2004-11-23 08:37:49 +00:00
Pyun YongHyeon 54e440e4b4 MFC buffer.c, 1.24 to RELENG_5:
Plug possible memory leak in sound DMA buffer handling. It also
    changes return code to ENOMEM in case of allocation failure.
2004-11-23 07:13:33 +00:00
Robert Watson 778a0c4a03 Merge udp_usrreq.c:1.169 from HEAD to RELENG_5:
date: 2004/11/04 07:14:03;  author: phk;  state: Exp;  lines: +2 -0
  Hide udp_in6 behind #ifdef INET6

Spotted by:	kensmith

CVg:
2004-11-22 20:31:29 +00:00
Hiroki Sato b6ea2c3192 New errata: FreeBSD-SA-04:16. 2004-11-22 17:20:42 +00:00
Robert Watson e68988cec4 Merge udp_usrreq.c:1.168 from HEAD to RELENG_5:
date: 2004/11/04 01:25:23;  author: rwatson;  state: Exp;  lines: +24 -57
  Until this change, the UDP input code used global variables udp_in,
  udp_in6, and udp_ip6 to pass socket address state between udp_input(),
  udp_append(), and soappendaddr_locked().  While fine in the default
  configuration, when running with multiple netisrs or direct ithread
  dispatch, this can result in races wherein user processes using
  recvmsg() get back the wrong source IP/port.  To correct this and
  related races:

  - Eliminate udp_ip6, which is believed to be generated but then never
    used.  Eliminate ip_2_ip6_hdr() as it is now unneeded.

  - Eliminate setting, testing, and existence of 'init' status fields
    for the IPv6 structures.  While with multiple UDP delivery this
    could lead to amortization of IPv4 -> IPv6 conversion when
    delivering an IPv4 UDP packet to an IPv6 socket, it added
    substantial complexity and side effects.

  - Move global structures into the stack, declaring udp_in in
    udp_input(), and udp_in6 in udp_append() to be used if a conversion
    is required.  Pass &udp_in into udp_append().

  - Re-annotate comments to reflect updates.

  With this change, UDP appears to operate correctly in the presence of
  substantial inbound processing parallelism.  This solution avoids
  introducing additional synchronization, but does increase the
  potential stack depth.

  Discovered by:  kris (Bug Magnet)
  MFC after:      3 weeks

Note that this bug does not effect the default configuration, only systems
running with net.isr.enable=1, or with modified network stacks to increase
parallelism.
2004-11-22 15:17:07 +00:00
Scott Long 0d60c015ff MFC: tell KTR about busdma. The sequence is now slightly out of order to
make room for the GEOM ktr switch hasn't been merged yet.
2004-11-22 02:21:42 +00:00
Jens Schweikhardt fb4c73e9ee MFC: test file existence before attempting chflags
PR:		kern/73016
Submitted by:	John E. Hein <[email protected]>
2004-11-21 10:34:59 +00:00
Scott Long 3cc067777c MFC up to rev 1.67:
- Add KTR tracing
 - Small performance tweaks
 - Create sub-pools for bounce pages with similar attributes
 - Don't erroneosuly account for boundary crossing when using bounce pages.
2004-11-21 06:42:26 +00:00
Scott Long 0bc233fc95 MFC: Bring in all changes up to rev 1.63:
- Add KTR tracing
 - Small performance tweaks
 - Create sub-pools for bounce pages with similar attributes
 - Don't erroneosuly account for boundary crossing when using bounce pages.
2004-11-21 06:39:00 +00:00
Scott Long 99f40b21a7 MFC: Don't use the BUS_DMA_ALLOCNOW flag for parent and static tags. 2004-11-21 04:05:52 +00:00
Peter Wemm d614cdda49 Insta-MFC rev 1.457 (amd64 hybrid libs only). Fix kerberos5 build. 2004-11-20 23:42:15 +00:00
Alan Cox c6771fbaab MFC revisions 1.30 and 1.31
- Eliminate an unused but initialized variable.
 - Introduce a Boolean variable wakeup_needed to avoid repeated,
   unnecessary calls to wakeup() by vm_page_zero_idle_wakeup().
2004-11-20 20:52:35 +00:00
Alan Cox f182cdccff MFC revision 1.514
Implement per-CPU SYSMAPs, i.e., CADDR* and CMAP*, to reduce lock
 contention within pmap_zero_page() and pmap_copy_page().
2004-11-20 20:30:02 +00:00
Marcel Moolenaar 55ee94604c MFC rev 1.5:
Apply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530
connects to the keyboard and mouse and needs some special treatment.
Until this is fully understood, implemented and tested, simply avoid
probing the second Z8530. This is also what the zs(4) driver does.
2004-11-20 20:12:20 +00:00
Bjoern A. Zeeb 5b6cc236f4 MFC rev. 1.88:
Set ramsize depending on a value from eprom instead of using
  hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM.

Approved by:	rwatson (mentor)
2004-11-20 17:41:43 +00:00
Max Khon 47acdd0497 MFC rev 1.32:
Check that ee's standard input and output is a terminal.
Do not ignore all the signals in range [1..24].

PR:		65892
2004-11-20 13:31:03 +00:00
Robert Watson 361d8c0bae Merge fd.4:1.7 from HEAD to RELENG_5:
date: 2004/10/24 19:44:23;  author: rwatson;  state: Exp;  lines: +15 -2
  Mention fdescfs(5) and why it might be useful.

  MFC after:     1 week
  Suggested by:  Stephen Montgomery-Smith <stephen at math dot missouri dot edu>
2004-11-20 11:08:57 +00:00
Marcel Moolenaar c17618f142 MFC rev 1.8:
Remove the BR tag. When the machine doesn't have the DIG64 HCDP
table with console settings, we now only need to know at which
address the UART lives. Leaving the baudrate unspecified results
in us using the baudrate at which the UART operates.
2004-11-20 04:17:29 +00:00
Marcel Moolenaar 97afec06be MFC rev 1.11+1.12:
Implement UART_IOCTL_BAUD.
2004-11-20 04:14:30 +00:00
Marcel Moolenaar dc9bac8681 MFC uart_bus.h:1.8, uart_core.c:1.11
Add UART_IOCTL_BAUD to allow us to query the hardware about the current
baudrate setting.
2004-11-20 04:07:08 +00:00
Marcel Moolenaar 3edeac8a5c MFC rev. 1.3:
Make sure the baudrate specified with the BR tag is somewhat sane.
2004-11-20 03:51:21 +00:00
Christian Brueffer 768e58a06f MFC: rev. 1.37
- list D-Link DFE-528TX as supported
- correct whitespace in a few entries
- remove some doubt from the D-Link DFE-538TX entry
- bump .Dd
2004-11-20 02:29:55 +00:00
Christian Brueffer cf5ae8f2f3 MFC: rev. 1.24
s/3COM/3Com/
2004-11-20 02:29:09 +00:00
Christian Brueffer 22c607ef44 MFC: rev. 1.11
List the LevelOne GNC-0105T (8169S) as supported and bump .Dd
2004-11-20 02:28:29 +00:00
Robert Watson a7b384ae4b Merge uipc_syscalls:1.204 from HEAD to RELENG_5:
date: 2004/10/24 23:45:01;  author: rwatson;  state: Exp;  lines: +87 -23
  Move from using the socket reference count to the file reference
  count to prevent sockets from being garbage collected during
  socket-specific system calls.  This is the same approach used in
  most VFS-specific system calls, as well as generic file descriptor
  system calls such as read() and write().

  To do this, add a utility function getsock(), which is logically
  identical to getvnode() used for the same purpose in VFS.  Unlike
  fgetsock(), it returns with the file reference count elevated, but
  no bump of the socket reference count.  Replace matching calls to
  fputsock() with fdrop().

  This change is made to all socket system calls other than
  sendfile() and accept(), but the approach should be applicable to
  those system calls also.

  This shaves about four mutex operations off of each of these
  system calls, including send() and recv() variants, adding about
  1% to pps on minimal UDP packets for UP using netblast, and 4% on
  SMP.

  Reviewed by:    pjd
2004-11-20 02:09:48 +00:00
Giorgos Keramidas 1839a49a06 MFC 1.23: Correctly document the return value of strerror() and
strerror_r() and the contents of the returned buffer for unknown
error codes.
2004-11-20 00:03:28 +00:00
Robert Watson 5955368961 Merge nfs_serv.c:1.151 from HEAD to RELENG_5:
date: 2004/11/11 21:30:52;  author: rwatson;  state: Exp;  lines: +52 -38
  Correct a bug in nfsrv_create() where a call to nfsrv_access() might
  be made holding the NFS server mutex.  To clean this up, introduce a
  version of the function, nfsrv_access_withgiant(), that expects the
  NFS server mutex to already have been dropped and Giant acquired.
  Wrap nfsrv_access() around this.  This permits callers to more
  efficiently check access if they're in a code block performing VFS
  operations, and can be substitited for the nfsrv_access() call that
  triggered this bug.

  PR:             73807, 73208
  MFC after:      1 week

RELENG_5_3 candidate.

MFC after:	10 days
2004-11-19 12:03:22 +00:00
Marcel Moolenaar 6183c2613b MFC: gpt.8:1.9+1.10, migrate.c:1.13
Add an -f option (for force) to the migrate command. Normally an MBR
with unknown partitions is not migrated. By specifying the -f option
migration will happen and unknown partitions will be lost.
2004-11-19 04:03:28 +00:00
Marcel Moolenaar 73841d34e4 MFC: create.c:1.10, gpt.8:1.8+1.10
Add an -f option (for force) to the create command. The -f option
allows the user to force the creation of a GPT even when there's a
MBR on the device. The MBR is simply wiped and any partitions
described by it are lost. Without the -f option one cannot create
a GPT when there's a MBR.
2004-11-19 03:33:28 +00:00
Xin LI 276f4f4122 MFC 1.5:
Correct a potential DoS vulnerability, as described at

http://www.securityfocus.com/archive/1/379450
2004-11-18 15:21:41 +00:00
Colin Percival d6aeaf1fb0 FreeBSD-SA-04:16.fetch:
MFC revision 1.75 of src/usr.bin/fetch/fetch.c
2004-11-18 12:02:29 +00:00
Nate Lawson 59da0bf98d MFC rev 1.46: Enable quirks for throttling and C3. 2004-11-18 03:41:18 +00:00
Ruslan Ermilov 50b8032c8d MFC: 1.229: Fixed transition from SHARED=symlinks to SHARED=copies. 2004-11-17 23:50:28 +00:00
Alan Cox eeb59ece32 MFC revision 1.77
Enable debug.mpsafevm by default on amd64 and i386.
2004-11-17 19:04:11 +00:00
Nate Lawson d8802b50f8 MFC rev 1.9: Misc cleanups, enable brightness notify. 2004-11-17 07:31:40 +00:00
Nate Lawson 0dea2c750d MFC rev 1.51 (jhb): Print message for missing _PRT only when verbose. 2004-11-17 07:30:34 +00:00
Ken Smith 004a479085 MFC v1.115: Flush the register windows before we start changing the context.
Submitted by:	Andrew Belashov <bel (at) orel.ru> (slightly modified)
Reviewed by:	jake
2004-11-17 05:17:08 +00:00
Alan Cox 50d2222589 MFC revision 1.293
Correct two errors in PG_BUSY management by vm_page_cowfault().  Both
 errors are in rarely executed paths.
 1. Each time the retry_alloc path is taken, the PG_BUSY must be set again.
    Otherwise vm_page_remove() panics.
 2. There is no need to set PG_BUSY on the newly allocated page before
    freeing it.  The page already has PG_BUSY set by vm_page_alloc().
    Setting it again could cause an assertion failure.
2004-11-17 04:49:27 +00:00
Ken Smith bc06cdf02f MFC: v1.55 and v1.56 - add newsyslog(8) to SEE ALSO and bump document
date.

Consulted with:	ru for wisdom on what to set date to.
2004-11-17 04:36:50 +00:00
Marcel Moolenaar ce02e60749 MFC create.c:1.9, migrate.c:1.12:
Fix a braino: the partition size in the PMBR is in sectors, not bytes
and 'mediasz' is in bytes. As it so happens, we define 'last' as the
sector number of the last sector on the medium which also is the size
of the PMBR partition. Therefore, use 'last' instead of 'mediasz'.
2004-11-17 04:27:17 +00:00
Giorgos Keramidas 9a230567b1 MFC 1.26: Correct the name of the --line-buffered option. 2004-11-16 10:47:15 +00:00
Ralf S. Engelschall f4dda05c2e MFC 1.226-1.230:
fix generated /etc/exports: escape all '
characters and fix typo (s/synatx/syntax/)
2004-11-16 09:45:26 +00:00
Ralf S. Engelschall b3192e53f2 MFC: Add identifiers for the HP Laserjet 2300d USB
printer and the HP ScanJet 4670v USB scanner.
2004-11-16 09:03:50 +00:00
Gleb Smirnoff 447a85af1a MFC 1.217:
Since sb_timeo type was increased to int, use INT_MAX instead of SHRT_MAX.
2004-11-16 08:15:07 +00:00
Gleb Smirnoff 0362b7047a MFC 1.54:
Use cluster if data >= MINCLSIZE.
2004-11-16 08:12:32 +00:00
John Baldwin e8945df2d1 MFC: Remove address masking so that large kernels can be loaded. 2004-11-15 21:29:50 +00:00
Simon L. B. Nielsen 6db3ef4245 MFC 1.8: Fix typo. 2004-11-15 21:03:14 +00:00
Peter Wemm 68e54b8e1f Insta-MFC rev 1.456: Add the build tools for kerberos5 for WITH_LIB32 on
amd64.
2004-11-15 06:01:11 +00:00
Christian Brueffer dfa675ceb2 MFC: rev. 1.4
Several language fixes
2004-11-14 17:22:20 +00:00
Christian Brueffer df1fa699bb MFC: rev. 1.23
Avoid second person usage.
2004-11-14 17:20:02 +00:00
Maxim Konovalov fc170a3cb4 MFC revs. 1.47 - 1.49: document net.inet.tcp.sack.initburst sysctl. 2004-11-14 16:31:06 +00:00
Maxim Sobolev a32c7718bb Due to popular demand MFC mkuzip(8) utility. 2004-11-14 16:11:17 +00:00
Scott Long e86bc3066a MFC rev 1.76: Use an alignment of 1 instead of ETHER_ALIGN for busdma. 2004-11-14 03:48:34 +00:00
Yoshihiro Takahashi ebc34090e0 MFC: Fix build error with ED_DEBUG. 2004-11-13 13:06:37 +00:00
Yoshihiro Takahashi 67b41bb0e1 MFC: Fixed fd related tools on pc98. 2004-11-13 13:03:38 +00:00
Yoshihiro Takahashi d26a80bcd5 MFC: Add FL_MFM flag to the fd_native_types structure. 2004-11-13 13:02:49 +00:00
Yoshihiro Takahashi 6385222110 MFC: Set bi_basemem and bi_extmem variables. 2004-11-13 13:02:19 +00:00
Yaroslav Tykhiy 4c27078405 MFC rev. 1.171, 1.172: PAM-related fixes. 2004-11-13 12:56:41 +00:00
Yaroslav Tykhiy 13ba32ad3f MFC rev. 1.169, 1.174, 1.175: Fixes related to logxfer(). 2004-11-13 12:39:30 +00:00
Yaroslav Tykhiy 33827169c5 MFC rev. 1.166-1.168: Assorted fixes around the call to sendfile(2). 2004-11-13 12:28:50 +00:00
Yaroslav Tykhiy 12a857a424 MFC rev. 1.12: Fix the description of "timeout" and "attempts"
resolver options to avoid user confusion from now on.
2004-11-13 12:04:02 +00:00
Yaroslav Tykhiy 9123ad6028 MFC: Explain what ``an invalid offset'' means. 2004-11-13 11:55:41 +00:00
Yaroslav Tykhiy ba21235e36 MFC rev. 1.24-1.26: Document the cases of the ``offset'' argument
falling beyond the beginning or end of the file.  Improve markup.
2004-11-13 11:48:56 +00:00
Peter Wemm da991b3a0d Refine 5.x version of WITH_LIB32 so that it doesn't explode if you have
COMPAT4X or COMPAT5X etc in make.conf.   I didn't hit this in -current
because there are no integral compat libs there.
2004-11-12 23:21:42 +00:00
Hiroki Sato dba1679017 New errata:
em(4) bug when VLAN support and promiscuous mode are enabled.
2004-11-12 13:30:38 +00:00
Hiroki Sato 770b90f23f Update errata:
geom_vinum does not need start_vinum="YES".

Discussed with:	le
2004-11-12 03:17:03 +00:00
Philip Paeps df3b27404b MFC 1.13:
Fix support for the Asus-compatible
  gadgets in Samsung P30/P35 laptops.
2004-11-11 14:58:55 +00:00
Christian Brueffer c8c5157f0f MFC: 1.17 + 1,18
- D-Link DFE-580TX is supported
- bump document date
2004-11-11 11:10:36 +00:00
Gregory Neil Shapiro 7a7d1ad456 MFC: Create a separate directory for dynamic zones which is owned by the bind
user (for creation of the zone journal file).  This is separate from the
     master/ directory for security.  Give an example dynamic zone in the
     sample named.conf.

     Approved by:    dougb
     Noticed by:     Eivind Olsen <eivind at aminor.no>

     Revision  Changes    Path
     1.6       +2 -0      src/etc/mtree/BIND.chroot.dist
     1.20      +14 -0     src/etc/namedb/named.conf
2004-11-11 04:08:16 +00:00
Max Laier 2a16d5fd6b MFC, if_xl.c rev. 1.182:
Another missing ! in front of IFQ_DRV_IS_EMPTY, this time in an even more
  sensitive, but less excercised location (the watchdog). While here use the
  *_start_locked function directly to avoid drop, grab, drop lock.
2004-11-11 01:50:05 +00:00
Peter Wemm 3a411b02f4 MFC: add optional WITH_LIB32 hooks for amd64. Note that the tls/%fs/%gs
support code hasn't been merged.
2004-11-10 23:39:31 +00:00
Gleb Smirnoff 2579069f6b MFC:
Install NetFlow includes

Approved by:	julian (mentor)
2004-11-10 22:21:00 +00:00
Ruslan Ermilov 7356cdd5f3 MFC: 1.161: Install precious shared libraries with -S. 2004-11-10 20:37:06 +00:00
Ruslan Ermilov 62001ab957 MFC: Documentation fixes. 2004-11-10 20:30:39 +00:00
Ruslan Ermilov 5385ae7d02 MFC: 1.20: Fixed exiting from pager. 2004-11-10 20:30:06 +00:00
Gleb Smirnoff 2d04c97067 MFC:
A man page for NetFlow node.

Approved by:	julian (mentor)
2004-11-10 19:37:03 +00:00
Gleb Smirnoff dfb63fe9a4 MFC:
userland control utility for ng_netflow

Approved by:	julian (mentor)
2004-11-10 19:31:37 +00:00
Gleb Smirnoff 1354e85df2 MFC:
install NetFlow includes

Approved by:	julian (mentor)
2004-11-10 19:26:35 +00:00
Gleb Smirnoff d81e09f4eb MFC:
Attach ng_netflow to build.

Approved by:	julian (mentor)
2004-11-10 19:11:13 +00:00
Gleb Smirnoff 9547916582 Merge NetFlow node.
Approved by:	julian (mentor)
2004-11-10 18:39:41 +00:00
Ken Smith 172a4588a8 Try to clear up a little confusion about what standard-supfile and
stable-supfile are meant to provide.

Note this is not an MFC and a similar change was not made to HEAD
because the confusion revolves around the specific branches involved.
2004-11-10 18:32:47 +00:00
Gleb Smirnoff 4841e1d103 MFC rev 1.3:
Make documentation up to date with recent changes.

Approved by:	julian (mentor)
2004-11-10 17:57:42 +00:00
Gleb Smirnoff d880b49149 MFC new ng_device node:
ng_device.c:1.11 - 1.15
  ng_device.h: 1.3 - 1.4

Approved by:	julian (mentor)
2004-11-10 17:42:56 +00:00
Johan Karlsson 769f7f3a87 MFC rev 1.181:
style: Move the { back to the else line to match the }.
2004-11-10 15:29:25 +00:00
Yoshihiro Takahashi 88ed1530ee MFC: Fix BIOS default geometry. 2004-11-10 12:42:45 +00:00
Yoshihiro Takahashi 9c2f80ad58 MFi386: revision 1.1168.2.1 2004-11-10 12:25:44 +00:00
Denis Peplin 022cf99b74 Sync with English 1.69.2.12
Obtained from:	The FreeBSD Russian Documentation Project
2004-11-10 11:10:06 +00:00
Gleb Smirnoff 767c04f323 MFC 1.244:
More MLINKS for rtalloc.9
2004-11-10 09:11:15 +00:00
Yoshihiro Takahashi c8bb2c058e MFC: Remove a duplicate code. 2004-11-10 09:09:16 +00:00
Gleb Smirnoff 038d0fdd57 MFC 1.22:
- sort struct rtentry fields in man page in some order as they are in struct
- remove RTF_PRCLONING
- add rt_mtx field
- rename rt_metrics -> rt_metrics_lite
- mention that only 3 metrics are really used in rt_metrics_lite
2004-11-10 09:04:18 +00:00
Yoshihiro Takahashi a7b033b1ca MFC: Drop elf64 support on pc98 and fix style. 2004-11-10 09:02:56 +00:00
Gleb Smirnoff 560803ca30 MFC 1.15-1.19:
- note that RTF_PRCLONING is obsoleted
- explain locking differencies between rtalloc(), rtalloc_ign(), rtalloc1()
  and rtfree(), RTFREE().
- Document RT_[UN]LOCK, RT_ADDREF, RT_REMREF.
- Describe how RT_FREE actually works.
2004-11-10 09:00:04 +00:00
Yoshihiro Takahashi 21729724a6 MFC: Clear BSS. 2004-11-10 08:58:15 +00:00
Yoshihiro Takahashi d49e6f4325 MFC: Add support for preloading ELF relocatable object format modules. 2004-11-10 08:55:57 +00:00
Yoshihiro Takahashi 594e4b21ac MFC: Disable ed1 - ed12. 2004-11-10 08:49:23 +00:00
Yoshihiro Takahashi 8cd5fd411d MFC: Add more PnP serial cards support. 2004-11-10 08:47:45 +00:00
Yoshihiro Takahashi 869f9dec9b opt_agp.h is needed on i386 only. 2004-11-10 08:47:09 +00:00
Hiroki Sato e4185a6340 Fix a lot of wording nits.
Submitted by:	Chris Pepper (pepper at reppep dot com)
PR:		docs/73756
2004-11-10 04:46:40 +00:00
Hiroki Sato 6b95353bdc New errata:
Add an explicit explanation of the "Spinlock called when not
	threaded" problem.
2004-11-10 01:24:30 +00:00
Maxim Konovalov 1372648b95 MFC rev. 1.164, 1.165: do not unconditionally fork() after accept(). 2004-11-09 18:24:12 +00:00
Maxim Konovalov e4ffc75ed6 MFC rev. 1.17: fix includes. 2004-11-09 18:15:10 +00:00
Maxim Konovalov aa7c4f993a MFC rev. 1.106: store timestamp in network byte order, remove
an assumption sizeof(struct timeval) == 8.
2004-11-09 18:11:46 +00:00
Yaroslav Tykhiy cbbbd1759d MFC: Fix a typo: sc = ns*nt, not nc*nt. 2004-11-09 18:06:06 +00:00
Yaroslav Tykhiy 368b9c18e9 MFC: Hint users that vlan needs miibus now.
Add a more verbose description for `device vlan'.
2004-11-09 17:58:42 +00:00
Yaroslav Tykhiy 63c9f0e681 MFC rev. 1.15-1.16: Document that vlan(4) requires miibus(4) now,
bump .Dd accordingly.
2004-11-09 17:51:25 +00:00
David Xu 397346a0a0 MFC rev 1.207: Respect TDF_SINTR, don't suspend uninterruptible thread. 2004-11-09 11:18:29 +00:00
Hiroki Sato 11e94dc20d New errata:
5.3R Release Notes did not mention a need to recompile
	of net/mpd.
2004-11-09 09:26:47 +00:00
Hiroki Sato 72b52a2313 New errata:
The source-based upgrade procedure explained in the 5.3R Migration
	Guide did not mention removing /usr/sbin/{nslookup,nsupdate}.
2004-11-09 08:53:36 +00:00
Hiroki Sato 15bbe48615 New errata:
gvinum does not work correctly for RAID5 volumes on an UP machine.
	This problem has been fixed on RELENG_5.
2004-11-09 08:33:43 +00:00
Marcel Moolenaar 37941e4d7a MFC rev 1.304:
Build kgmon(8) on ia64.
2004-11-09 03:50:13 +00:00
Marcel Moolenaar a318e4f81e MFC Makefile:1.6, kgmon.c:1.14
Improve 64-bit cleanliness: make sure to use long format specifiers for
long arguments. This is WARNS=2 clean now.
2004-11-09 03:47:41 +00:00
Marcel Moolenaar 613c7ae2e5 MFC Makefile.inc:1.13, _mcount.S:1.1
Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled.
2004-11-09 03:44:24 +00:00
Marcel Moolenaar a74622674d MFC support.S:1.22
Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled.

MFC exception.S:1.54, locore.S:1.36, support.S:1.23, syscall.S:1.13
s/ENTRY/ENTRY_NOPROFILE/g for particular functions that do not follow
the C calling convention or are otherwise not regular functions. This
allows us to boot a profiling kernel.
2004-11-09 03:40:51 +00:00
Marcel Moolenaar 05d243c7fd MFC alpha/include/profile.h:1.7, amd64/include/profile.h:1.42,
i386/include/profile.h:1.38, ia64/include/profile.h:1.11,
    sparc64/include/profile.h:1.7, libkern/mcount.c:1.23:
Move the kernel-specific logic to adjust frompc from MI to MD. This
introduces macros MCOUNT_FROMPC_USER and MCOUNT_FROMPC_INTR.
Required for GPROF on ia64.
2004-11-09 03:32:44 +00:00
Marcel Moolenaar 18484b4812 MFC rev 1.11:
Properly define the MCOUNT macro for GPROF.
2004-11-09 03:23:40 +00:00
Marcel Moolenaar baa06a0c43 MFC rev 1.45:
Declare btext and etext for GPROF.
2004-11-09 03:21:10 +00:00
Marcel Moolenaar 8218e5cc72 MFC rev 1.12:
Have the linker provide btext. It's used for profiling.
2004-11-09 03:17:24 +00:00
Alexander Kabaev b683efc6bb MFC: Unbreak c++filt and reconnect it to the build. 2004-11-09 03:17:07 +00:00
Marcel Moolenaar bc105d250f MFC rev 1.8:
Have the linker provide the btext symbol when referenced. This is needed
for profiling kernels. Apparently, nobody has ever tried to build one on
alpha...
2004-11-09 03:16:01 +00:00
Marcel Moolenaar 0308a9fe45 MFC rev 1.41:
Provide extern declarations for btext and etext when GPROF is defined.
These are referenced in subr_prof.c when building a profiling kernel.
2004-11-09 03:10:26 +00:00
Peter Wemm 93e7bbdebf MFC: add missing cpu idle hook for smp machines. This was supposed to
go into 5.3 but got dropped somewhere.
2004-11-09 02:02:31 +00:00
Ceri Davies 97e6102800 MFC r1.36:
Use a safe temporary file for saving out the PR if send-pr is
  interrupted.
2004-11-09 00:22:24 +00:00
Wilko Bulte 89f886b1d5 Never be afraid to try something new. Remember, amateurs built the ark.
Professionals built the Titanic.
2004-11-08 22:08:12 +00:00
Ruslan Ermilov 77fe31b471 MFC: 1.858: Document some knobs.
1.859: Correct a typo in a comment.
     1.866: Pass WORLD_FLAGS down to distributeworld.
     1.867: Put hint.atkbd.0.flags="0x1" in cdrom:/boot/device.hints.
2004-11-08 21:43:51 +00:00
Ruslan Ermilov 4f6d382224 MFC: 1.48: Don't give the exact number of bootable ISO images. 2004-11-08 21:40:54 +00:00
Scott Long 112a64db42 MFC rev 1.48: Use an alignment of 1 instead of PAGE_SIZE for the rx and tx
mbufs.  Don't create a map for the descriptor buffers.
2004-11-08 20:06:14 +00:00
Ruslan Ermilov 0ccf8b6317 MFC:
- moved the MAKEOBJDIRPREFIX check from Makefile.inc1 to Makefile,
- improved "make universe",
- fixed "make world DESTDIR=/mnt".
2004-11-08 19:38:31 +00:00
Ceri Davies 07f3cbff8c MFC r1.159:
Be more clear that "bridged" is a synonym for "layer2".
2004-11-08 19:07:03 +00:00
Ceri Davies 0026ed3a23 MFC r1.25:
Allow the -f argument to work.

  PR:		bin/73229
  Submitted by:	Irina Liakh <spell at itl dot ua>
2004-11-08 18:55:48 +00:00
Ceri Davies 309011a11a MFC r1.19:
Add necessary whitespace to correct cross references.

  PR:		docs/73193
  Submitted by:	Jilles Tjoelker <jilles at stack.nl>
2004-11-08 18:50:58 +00:00
Max Laier 73347ccb85 MFC pf_if.c, 1.6:
Reactivate skipping over bogus IPCP addresses on ppp interfaces. Be more
  careful with the skip condition this time. Addresses are only not taken
  into account if:
        - The interface is POINTTOPOINT
        - There is no route installed for the address
        - The user specified noalias (:0)
  and   - We are looking at an IPv4 address.

  This should be enough paranoia to not cause any false positives.

  PR:             misc/69954
  Discussed with: yongari

Another forgotten MFC :-( ... 5.4R then ...
2004-11-08 12:52:21 +00:00
Pawel Jakub Dawidek 8392042c75 MFC: Don't treat # as a comment in interpreter specification line.
This is magic and no other operating system do so (i.e. Solaris, Tru64,
	Linux, AIX, HP-UX, Irix, MacOS X, NetBSD).

Discussed on:	current@
Reported by:	S³awek ¯ak <[email protected]>
2004-11-08 12:17:12 +00:00
Don Lewis bb41be8807 MFC dir.c:1.30, fsck.h:1.33, fsutil.c:1.25, inode.c:1.37, main.c:1.42,
pass1.c:1.43, pass2.c:1.26, pass3.c:1.15, pass4.c:1.15, pass5.c:1.40

> truckman    2004-10-08 20:44:48 UTC
>
>   FreeBSD src repository
>
>   Modified files:
>     sbin/fsck_ffs        dir.c fsck.h fsutil.c inode.c main.c
>                          pass1.c pass2.c pass3.c pass4.c pass5.c
>   Log:
>   Eliminate linked list used to track inodes with an initial link
>   count of zero and instead encode this information in the inode state.
>   Pass 4 performed a linear search of this list for each inode in
>   the file system, which performs poorly if the list is long.
>
>   Reviewed by:    sam & keramida (an earlier version of the patch), mckusick
>   MFC after:      1 month
>
>   Revision  Changes    Path
>   1.30      +2 -3      src/sbin/fsck_ffs/dir.c
>   1.33      +15 -15    src/sbin/fsck_ffs/fsck.h
>   1.25      +1 -3      src/sbin/fsck_ffs/fsutil.c
>   1.37      +2 -0      src/sbin/fsck_ffs/inode.c
>   1.42      +0 -8      src/sbin/fsck_ffs/main.c
>   1.43      +5 -16     src/sbin/fsck_ffs/pass1.c
>   1.26      +5 -1      src/sbin/fsck_ffs/pass2.c
>   1.15      +3 -3      src/sbin/fsck_ffs/pass3.c
>   1.15      +8 -11     src/sbin/fsck_ffs/pass4.c
>   1.40      +2 -0      src/sbin/fsck_ffs/pass5.c
2004-11-08 08:10:36 +00:00
Don Lewis 88b861c62d Forced commit - previous commit was MFC of Makefile:1.16
> scottl      2004-09-01 08:26:39 UTC
>
>   FreeBSD src repository
>
>   Modified files:
>     sbin/fsck_ffs        Makefile
>   Log:
>   Move back to WARNS=2
>
>   Revision  Changes    Path
>   1.16      +1 -1      src/sbin/fsck_ffs/Makefile
2004-11-08 07:56:38 +00:00
Don Lewis 46db229999 MFC dir.c:1.29, fsck.h:1.32, inode.c:1.36, pass1.c:1.42, pass2.c:1.25
> scottl      2004-09-01 05:48:06 UTC
>
>   FreeBSD src repository
>
>   Modified files:
>     sbin/fsck_ffs        dir.c fsck.h inode.c pass1.c pass2.c
>   Log:
>   Create DIP_SET() and IBLK_SET() macros to fix lvalue warnings.
>
>   Inspired by: kan
>
>   Revision  Changes    Path
>   1.29      +14 -14    src/sbin/fsck_ffs/dir.c
>   1.32      +15 -0     src/sbin/fsck_ffs/fsck.h
>   1.36      +18 -14    src/sbin/fsck_ffs/inode.c
>   1.42      +3 -3      src/sbin/fsck_ffs/pass1.c
>   1.25      +9 -9      src/sbin/fsck_ffs/pass2.c
2004-11-08 07:50:55 +00:00
Paul Saab 30e230391a MFC:
- Estimate the amount of data in flight in sack recovery and use it
  to control the packets injected while in sack recovery (for both
  retransmissions and new data).
- Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c.
- Add a new sysctl (net.inet.tcp.sack.initburst) that controls the
  number of sack retransmissions done upon initiation of sack recovery.

Submitted by:   Mohan Srinivasan <[email protected]>
2004-11-08 03:22:51 +00:00
Max Laier 8be3dd9dff MFC pf.c, 1.21:
Fix a panic discovered with some apache2 configure test (that seemed to
  trigger a socket creation race some some kind). Checking for non-NULL
  socket and credential is not a bad idea anyway. Unfortunatly too late for
  the release.

  Reported & tested by:   Gilbert Cao

I completly forgot about this when the release was pushed back. Depending on
the new maintance policies for RELENG_5_3 it might be a candidate. Let's
just not forget ... I hope the MFC reminder works here ...

MFC after:	2 weeks
2004-11-08 00:38:18 +00:00
Marcel Moolenaar e14976a94d MFC rev. 1.143:
Build gpt(8) on all platforms.
2004-11-07 23:53:51 +00:00
Marcel Moolenaar e5f392c20e MFC rev. 1.7 (gpt.8) & 1.11 (migrate.c)
Remove the -k option to migrate. The option causes gpt(8) to preserve
the MBR after it is migrated to a GPT. While this was useful during
the early days when GPT support was under development, it's something
that users can use without knowing what they're getting themselves
into. The possible harm outweights the marginal usefulness it now has.

[MFC notice: due to the harm that the option can do it is believed that
 this feature reduction is appropriate on a stable branch]
2004-11-07 23:41:26 +00:00
Marcel Moolenaar 7fb8b99713 MFC rev. 1.9+1.10
Catch up with the BSD label changes. The partition offsets are relative
to the partition now. While here, make sure we skip unused partition
entries.
2004-11-07 23:36:46 +00:00
Marcel Moolenaar 7018cf3ac6 MFC rev. 1.9+1.10 (add.c) & 1.7+1.8 (create.c) & 1.4+1.5 (destroy.c) &
1.9 (gpt.c) & 1.6 (gpt.h) & 1.8 (migrate.c) & 1.6+1.7 (recover.c) &
    1.2+1.3 (remove.c) & 1.11 (show.c)

Add byte swapping and UUID encoding/decoding to allow gpt to be compiled
on big-endian machines.

Obtained from: Dan Markarian <markarian at apple dot com>
2004-11-07 23:33:04 +00:00
Marcel Moolenaar 10cfc3edbf MFC rev. 1.3:
Fix bogon. Create the BSD label in the FreeBSD slice.
2004-11-07 23:30:07 +00:00
Marcel Moolenaar 7eb25abd89 MFC rev. 1.10:
Put the ispfw.ko module on the EFI boot partition when creating a
bootable ISO. HP machines (like the rx2600) that (also) have isp(4)
may have a non-standard firmware on the controller. Our isp(4) driver
is not able to work with those and even panics. This makes installing
FreeBSD rather impossible. By adding the ispfw.ko module, we give the
user a chance to upload a certified firmware onto the card and so make
it possible to either use the isp(4) successfully or otherwise avoid
the panic.

Missed for 5.3 by: marcel
2004-11-07 22:49:16 +00:00
Nate Lawson ea02d80526 MFC: Print flags for nexus child devices. 2004-11-07 22:35:36 +00:00
Nate Lawson 87aa65ac9b MFC: Remove now-unused variable. 2004-11-07 22:34:08 +00:00
Nate Lawson 88914149fd MFC: Remove hacks to set device flags now that they're no longer needed
and clean up some printfs for npx.
2004-11-07 22:33:06 +00:00
Marcel Moolenaar e046fc4113 MFC rev. 1.52 (chunk.c) & 1.9 (open_disk.c)
Don't barf when we encounter an UUID for GPT partitions. Instead, add
the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the
sname set to the UUID. This prevents sysinstall from bombing out. This
also makes sure the GPT partition shows up in sysinstall so as to avoid
accidental "clobberage".

PR:     bin/72896
2004-11-07 22:20:53 +00:00
Marcel Moolenaar cceeae62f6 MFC rev. 1.3:
If the argument to the -r flag starts with a ':' or a '|', don't try to
make sure it is a device.  GDB special cases these prefixes and treats
:#### as a tcp port on localhost and executes what ever follows '|'.

This allows kgdb to debug via dconschat.

Credits to: brooks
2004-11-07 21:37:58 +00:00
Marcel Moolenaar 9ac9e2b868 MFC rev. 1.3:
Abstract the handling of dirty stacked registers in ia64_read_reg() and
ia64_write_reg() and call these whenever we read or write registers from
and to memory. This way we correctly read registers from addresses in
the register cache and thus fixes backtraces when the saved registers
(such as rp and ar.pfs) are in dirty stacked registers.
2004-11-07 21:22:10 +00:00
Nate Lawson 100b9ef42b MFC: Bring most of ACPI up to HEAD. 2004-11-07 20:24:06 +00:00
Nate Lawson 31e9490551 MFC rev 1.62: Add support for the 'K' sysctl identifier for ACPI thermal
temperature conversions.
2004-11-07 20:21:03 +00:00
Jens Schweikhardt a104c54dc0 MFC: Fix a bogus string concatenation. Shell != C. 2004-11-07 18:17:54 +00:00
Lukas Ertl fb6dcd9929 MFC:
Give each plex a separate queue where held back bios are put on.
  This lowers the CPU usage of the worker thread and prevents a
  possible live lock on non-SMP machines.
2004-11-07 17:26:22 +00:00
Hiroki Sato 54e0f192cd Bump various entities for 5.3-STABLE and trim the release notes.
Approved by:	re (implicitly)
2004-11-07 15:44:26 +00:00
cvs2svn 843fdd53c6 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-11-06 03:28:27 +00:00
Hiroki Sato 75accf1160 Update errata: describe the USB keyboard problem in detail.
Based on the patch by:	brooks
Approved by:	re (implicitly)
2004-11-05 21:21:29 +00:00
Scott Long 765db26b2c Update the BSD family tree for OpenBSD 3.6 and the new 5.3 date
Approved by: re
2004-11-04 19:10:51 +00:00
Hiroki Sato 52af8edfea New errata: bsdtar(1) does not detect the end of a media.
Reported by:	oliver
Approved by:	re (implicitly)
2004-11-04 15:09:27 +00:00
Ken Smith 350542c0bc MFC of Rev. 1.103:
> revision 1.103
> date: 2004/11/03 18:26:06;  author: kensmith;  state: Exp;  lines: +7 -0
> Update the list of package names/descriptions.

Approved by:	re (scottl)
2004-11-04 05:04:53 +00:00
Robert Watson 5f9647750f Merge uipc_socket.c:1.216 from HEAD to RELENG_5:
date: 2004/11/02 17:15:13;  author: rwatson;  state: Exp;  lines: +1 -0
  Acquire the accept mutex in soabort() before calling sotryfree(), as
  that is now required.

  RELENG_5_3 candidate.

  Foot provided by:       Dikshie <dikshie at ppk dot itb dot ac dot id>

Approved by:	re (kensmith)
2004-11-03 21:11:34 +00:00
Hiroki Sato 26eeca6e02 New errata:
the SMP option disabled in the GENERIC kernel.

Approved by:	re (implicitly)
2004-11-03 10:10:09 +00:00
Simon L. B. Nielsen ee5f8da5f6 Add an "old-style" entry for the hptmv(4) until it gets a manual page.
Approved by:	re (scottl)
2004-11-02 23:22:11 +00:00
Hiroki Sato c2b2d3e235 Fix missing parts in the previous commit.
Submitted by:	rushani
Approved by:	re (implicitly)
2004-10-31 18:35:58 +00:00
Hiroki Sato f44348c2bc - Fix a lot of typos and grammatical errors[1].
- Update the following items:

  * remove "s/tag=RELENG_5/tag=RELENG_5_3/ in cvsup/standard-cvsup" and
    "sk(4) panic on shutdown" because they are already fixed.

  * update "sk(4) locking up"[2] and "gvinum at boot time"[3].

- Add new items:

  ULE scheduler disabled[4], libpthread CPU usage statistics[5], and
  ataraid support for CMD649 and SiI0680 controllers[6].

Reported by:	Pawel Worach (pawel.worach at telia.com)[1],
		Adrian Wontroba (aw1 at stade.co.uk)[1],
		Joel Dahl (joel at automatvapen.se)[1],
		Bjoern A. Zeeb (bzeeb-lists at lists.zabbadoz.net)[2],
		le[3],
		Ryan Sommers (ryans at gamersimpact.com)[4],
		Dan Nelson (dnelson at allantgroup.com)[5], and
		Emanuel Strobl (Emanuel.Strobl at gmx.net)[6]
Approved by:	re (implicitly)
2004-10-31 17:41:31 +00:00
Julian Elischer a916d8c413 MFC:
Revision  Changes    Path
 1.58      +1 -0      src/lib/libpthread/thread/thr_create.c
 1.14      +1 -1      src/lib/libpthread/thread/thr_find_thread.c
 1.115     +27 -10    src/lib/libpthread/thread/thr_kern.c
 1.119     +15 -11    src/lib/libpthread/thread/thr_private.h
 1.81      +1 -2      src/lib/libpthread/thread/thr_sig.c

fix race conditions

Approved by: re (scottl)
2004-10-31 04:21:43 +00:00
Robert Watson 68636da006 Merge if.c:.211 and if_var.h:1.88 from HEAD to RELENG_5:
date: 2004/10/30 09:39:13;  author: rwatson;  state: Exp;  lines: +25 -0
  Move if_handoff() from an inline in if_var.h to a function to if.c
  in orden to harden the ABI for 5.x; this will permit us to modify
  the locking in the ifnet packet dispatch without requiring drivers
  to be recompiled.

  MFC after:      3 days
  Discussed at:   EuroBSDCon Developer's Summit

Approved by:	re (kensmith)
2004-10-30 21:58:55 +00:00
Robert Watson 29cd649772 Merge if_var.h:1.87 from HEAD to RELENG_5:
date: 2004/10/30 08:45:13;  author: rwatson;  state: Exp;  lines: +5 -0
  Add additional "spare" fields to 'struct ifnet' in order to improve
  the resistance of the network driver ABI to changes that will be
  required as we optimize locking.

  MFC after:      3 days
  Discussed at:   Developer Summit

Approved by:	re (kensmith)
2004-10-30 21:54:57 +00:00
Robert Watson 8d4503bf47 Merge kern_mac.c:1.114 from HEAD to RELENG_5:
date: 2004/10/30 14:20:59;  author: rwatson;  state: Exp;  lines: +21 -0
  Disable use of synchronization early in the boot by the MAC Framework;
  for modules linked into the kernel or loaded very early, panics will
  result otherwise, as the CV code it calls will panic due to its use
  of a mutex before it is initialized.

Approved by:	re (kensmith)
2004-10-30 21:06:07 +00:00
Hiroki Sato 94f2a6d431 New errata:
cvsup/standard-supfile s/tag=RELENG_5/tag=RELENG_5_3/,
	em(4), re(4), sk(4) performance degradation under heavy load,
	burncd(8) strange behavior,
	debug.mpsafenet should be set to 0 when user/group rule modificators
	in pf(4) and ipfw(4) are used,
	vinum panic on boot and geom_vinum,
	"netstat -m" on SMP systems, and
	installation to systems with USB keyboard only.

Approved by:	re (implicitly)
2004-10-30 17:25:09 +00:00
Robert Watson f56b5bcc6b Merge tcp_output.c:1.104 from HEAD to RELENG_5:
date: 2004/10/30 12:02:50;  author: rwatson;  state: Exp;  lines: +2 -2
  Correct a bug in TCP SACK that could result in wedging of the TCP stack
  under high load: only set function state to loop and continuing sending
  if there is no data left to send.

  RELENG_5_3 candidate.

  Feet provided:  Peter Losher <Peter underscore Losher at isc dot org>
  Diagnosed by:   Aniel Hartmeier <daniel at benzedrine dot cx>
  Submitted by:   mohan <mohans at yahoo-inc dot com>

Approved by:	re (kensmith)
2004-10-30 15:38:56 +00:00
Peter Wemm b9885c2a44 MFC: rev 1.45: increase MAXDSIZ from 8MB to 32MB.
Approved by:  re (kensmith)
2004-10-30 00:09:54 +00:00
Peter Wemm 466a9faee6 MFC: rev 1.13 fix brk(3) on amd64
Approved by:  re (kensmith)
2004-10-30 00:07:46 +00:00
Maxim Konovalov 8b88f09802 MFC rev. 1.139: fix a typo in a comparison.
Prodded by:	bms
Approved by:	re (kensmith)
2004-10-28 20:02:47 +00:00
Warner Losh 544cd60ba8 MFC:
revision 1.16
	date: 2004/10/05 07:18:11;  author: imp;  state: Exp;  lines: +4 -4
	Yet another case of resources:
	+        * 9:   0x3f0-0x3f3,0x3f4-0x3f5,0x3f7

	This requires only one change to support.  Rather than keying on the
	size of the resource being 2, instead key off the end & 7 being 3.
	This covers the same cases that the size of 2 would catch, but also
	covers the new above case.

	In addition, I think it is clearer to use the end in preference to the
	size and start for case #8 as well.  Turns two tests into one, and
	catches no other cases.

	Make minor commentary changes to deal with new case #9.

	# This change is specifically minimal to allow easy MFC.  A more
	# extensive change will go into current once I've had a chance to test
	# it on a lot of hardware...

Approved by: re@ (kensmith)
Forgotten by: imp@
2004-10-28 19:37:07 +00:00
Bruce M Simpson 4d64185499 MFC of rev 1.99:
Fix a panic during shutdown on SMP machines, by forcing interrupts to
be disabled, and avoiding recursive acquisition of the driver mutex.

CVS tag slip pending by kensmith@.

Approved by:	re@
Tested by:	seb at struchtrup dot com
PR:		kern/62889
2004-10-28 17:51:33 +00:00
Giorgos Keramidas 377b9681e1 MFC: etc/defaults/rc.conf 1.226
share/man/man5/rc.conf.5	1.229, 1.230

: Introduce root_rw_mount as a new variable in defaults/rc.conf to
: unbreak /etc/rc.d/root for diskless systems that get their root
: filesystem from a read-only NFS mount.
:
: PR:             conf/72927
: Submitted by:   Ralf Wenk <[email protected]>
: Reviewed by:    brooks

Approved by:	re (kensmith)
2004-10-28 13:59:44 +00:00
Ken Smith 57f019e2b9 MFC of Rev 1.251. From commit log:
> revision 1.251
> date: 2004/10/23 11:20:26;  author: davidxu;  state: Exp;  lines: +1 -1
> Remove P_STOPPED_TRACE bit if debugger dies without a chance to
> detach debugged process.

Work by:	davidxu
Approved by:	re (kensmith approved davidxu but he asked me to commit)
2004-10-28 02:46:28 +00:00
Bruce M Simpson cfbd679d16 MFC rev 1.131:
Check that rt_mask(rt) is non-NULL before dereferencing it, in the
RTM_ADD case, thus avoiding a panic.

PR:		kern/42030
Submitted by:	Iasen Kostov
Approved by:	re@
2004-10-26 17:27:45 +00:00
Scott Long 3fc0d4e42b Mark the ULE scheduler as broken. Too many bug reports are getting filed
against 5.3 by people who are inadvertently running it and/or do not
understand the consequences and risks associated with it.

Approved by: re
2004-10-26 02:18:08 +00:00
Ken Smith 30637b03e3 Sneak in mention of the change to GENERIC config files.
Requested by:	Gavin Atkinson
		<gavin.atkinson (at) ury (dot) york (dot) ac (dot) uk>
Approved by:	re (implicitly)
2004-10-25 16:03:56 +00:00
Hiroki Sato ae79d38c3b Catch up with the English version.
Submitted by:	delphij
Approved by:	re (implicitly)
2004-10-24 18:45:17 +00:00
Scott Long 2b3023a1aa Note 5.3-RELEASE in UPDATING
Approved by: re
2004-10-24 18:28:08 +00:00
Hiroki Sato d1a3a084a1 Update release notes: tzdata2004e.
Approved by:	re (implicitly)
2004-10-24 17:59:57 +00:00
Scott Long 1ea5d89dec MFC: Hook the hptmv driver to the build.
Approved by: re
2004-10-24 17:42:08 +00:00
Justin T. Gibbs 66865e272d MFC: Skip probe attempts for ISA PnP devices.
Approved by: re
2004-10-24 17:03:07 +00:00
Hiroki Sato d462bcb0b0 Add a Japanese override of dev-auto.sgml.
Based on work by:	Ryusuke Suzuki (ryusuke at nucl.sci.hokudai.ac.jp)
Approved by:	re (implicitly)
2004-10-24 14:46:48 +00:00
cvs2svn 3b5766c1e9 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-10-24 14:31:28 +00:00
Hiroki Sato 13ce6784b6 Use URL_ABSOLUTE=yes for making release documentation.
Approved by:	re (implicitly)
2004-10-24 12:43:26 +00:00
Hiroki Sato 12def23617 Unbreak the build.
Submitted by:	delphij
Approved by:	re (implicitly)
2004-10-24 12:19:05 +00:00
Hiroki Sato 97e50b8eb3 Fix &release.*; for 5.3R.
Approved by:	re (implicitly)
2004-10-24 12:10:37 +00:00
Scott Long 7d16f594a4 MFC: Update the family tree.
Approved by: re
2004-10-24 10:12:03 +00:00
Scott Long feff01c450 Update for 5.3-STABLE
Approved by: re
2004-10-24 10:02:24 +00:00
Scott Long 8abb022c65 5-current packages should track post 5.3, not post 5.2.
Approved by: re
2004-10-24 09:42:10 +00:00
Scott Long 22fe283c9b Update the mdoc to reflect 5.3
Approved by: re
2004-10-24 09:35:53 +00:00
Søren Schmidt 1944f04ade MFC:
Do not retry on requests that has lost thier device during reinit.

        Should fix hangs on IBM's etc with the fake slave problem.

Approved by: re@ (scottl)
2004-10-24 09:27:37 +00:00
cvs2svn f144173128 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-10-24 09:23:08 +00:00
Scott Long dfa942f7d1 MFC: Update for 5-STABLE
Approved by: re
2004-10-24 09:09:25 +00:00
Ken Smith 133f35b42b To be safe for installs as well as providing the faster kernel for the
majority of users shift GENERIC back to UP instead of SMP.  Provide
a config file people with MP boxes can use.

Discussed by:	re@
Approved by:	re (scottl)
2004-10-23 19:58:27 +00:00
Scott Long 220b71c8db MFC: use gnome2-lite for x86, add ltmdm.
Approved by: re
2004-10-23 19:56:29 +00:00
Scott Long cac3dff018 MFC: Add Id's for the 21610SA Adapter.
Approved by: re
2004-10-23 19:08:14 +00:00
Lukas Ertl 5d99ebd06d MFC rev. 1.27:
Return the unit number of a channel instead of a hardcoded '1' from
  the ATA pccard locking function.  This makes pccard devices like
  Compact Flash cards work again.

  PR:             kern/72805
  Submitted by:   James E. Flemer <[email protected]>

Approved by:  re@ (scottl)
2004-10-23 19:05:17 +00:00
Lukas Ertl da10cd1f37 MFC rev. 1.71:
Drop the NDIS lock before returning from ndis_start().

  PR:             i386/72795
  Submitted by:   Frank Mayhar <[email protected]>

Approved by:  re@ (scottl)
2004-10-23 18:58:53 +00:00
Ken Smith 71ccebef56 MFC the update to the Time Zone files. From the logs of commit to HEAD:
> wollman     2004-10-18 00:03:52 UTC
>   Modified files:
>     share/zoneinfo       asia europe leapseconds northamerica
>                          southamerica zone.tab
>   Log:
>   MFV tzdata2004e
>
>   Users in Brazil and Argentina should run tzsetup(8).
>   Obtained from:  Arthur David Olson
>   MFC after       re approval
>
>   Revision  Changes    Path
>   1.25      +74 -23    src/share/zoneinfo/asia
>   1.28      +25 -20    src/share/zoneinfo/europe
>   1.11      +11 -9     src/share/zoneinfo/leapseconds
>   1.24      +61 -35    src/share/zoneinfo/northamerica
>   1.23      +184 -27   src/share/zoneinfo/southamerica
>   1.17      +13 -6     src/share/zoneinfo/zone.tab
>
> wollman     2004-10-18 17:03:53 UTC
>   Modified files:
>     etc/mtree            BSD.usr.dist
>   Log:
>   New directory added for Argentinian timezones.
>
>   Submitted by:   ache
>
>   Revision  Changes    Path
>   1.309     +2 -0      src/etc/mtree/BSD.usr.dist

Work done by:	wollman
Approved by:	re (scottl)
2004-10-23 02:58:01 +00:00
John-Mark Gurney e6c957f21c MFC: if_de.c v1.159:
>  fix (for me) the problems where if_de gets really slow after time
>  (usually taking 20 seconds to transmit a packet).. no longer fall back
>  to only transmitting one packet (instead of the entire queue) after we
>  have processed the entire send queue...  I have no idea why we didn't
>  start seeing this problem ~6 years ago when this code was introduced...

Approved by:	re (scottl)
2004-10-22 21:21:28 +00:00
Marcel Moolenaar c96836e793 MFC: rev 1.65:
Don't put devel/gdb6 on disc1 for non-i386 platforms. We have gdb6 in
the base-system. Adding the port for ia64 on disc1 is especially bogus,
because the port doesn't even build on ia64. It also doesn't support
libthread_db.

MFC: rev 1.68:
Seperate ia64 from the pack. The disc1 is overflowing to such extend
that most packages can not be included. It's much easier to list those
that we do want on disc1 for ia64. We only need to list 11 of them.

Approved by: re (scottl)
2004-10-22 20:05:47 +00:00
Scott Long 53ea0ae9d7 MFC: Wake up the pager from critical_exit if the process being switched to
needs to be swapped in.

Approved by: re
2004-10-22 18:48:42 +00:00
Robert Watson ab336d5e91 Merge if.c:1.210, if_var.h:1.85 from HEAD to RELENG_5:
Define IFF_LOCKGIANT() and IFF_UNLOCKGIANT() macros, which conditionally
  acquire Giant if the passed interface has IFF_NEEDSGIANT set on it.
  Modify calls into (ifp)->if_ioctl() in if.c to use these macros in order
  to ensure that Giant is held.

  MFC after:      3 days
  Bumped into by: jmg

Approved by:	re (kensmith)
2004-10-22 09:32:45 +00:00
Poul-Henning Kamp e5bd81c8ef MFC:
Close a possible race which could prevent geom classes from being unloaded
on SMP machines due to traffic counters getting out of whack.

Approved by:	re::scottl
2004-10-21 17:49:45 +00:00
Colin Percival 778e127b60 Fix a buffer overflow. This is the same bug as is corrected in rev.
1.7, but the correction is different: Rather than making sure the
string we're constructing doesn't grow too large, we realloc() to make
sure the buffer is large enough.

This violates the IEEE Std 1003.1-2004 standard, but retains backwards
compatability.

Approved by:	re (scottl)
2004-10-21 17:02:38 +00:00
Robert Watson e738f13fbd Merge kern_descrip.c:1.246, uipc_socket.c:1.214, uipc_usrreq.c:1.141,
raw_cb.c:1.30, raw_usrreq.c:1.35, ddp_pcb.c:1.45, atm_socket.c:1.21,
ng_btsocket_hci_raw.c:1.16, ng_btsocket_l2cap.c:1.14,
ng_btsocket_l2cap_raw.c:1.13, ng_btsocket_rfcomm.c:1.13, in_pcb.c:1.156,
tcp_subr.c:1.205, in6_pcb.c:1.61, ipx_pcb.c:1.29, ipx_usrreq.c:1.41,
natm.c:1.35, socketvar.h:1.135 from HEAD to RELENG_5:

  Push acquisition of the accept mutex out of sofree() into the caller
  (sorele()/sotryfree()):

  - This permits the caller to acquire the accept mutex before the socket
    mutex, avoiding sofree() having to drop the socket mutex and re-order,
    which could lead to races permitting more than one thread to enter
    sofree() after a socket is ready to be free'd.

  - This also covers clearing of the so_pcb weak socket reference from
    the protocol to the socket, preventing races in clearing and
    evaluation of the reference such that sofree() might be called more
    than once on the same socket.

  This appears to close a race I was able to easily trigger by repeatedly
  opening and resetting TCP connections to a host, in which the
  tcp_close() code called as a result of the RST raced with the close()
  of the accepted socket in the user process resulting in simultaneous
  attempts to de-allocate the same socket.  The new locking increases
  the overhead for operations that may potentially free the socket, so we
  will want to revise the synchronization strategy here as we normalize
  the reference counting model for sockets.  The use of the accept mutex
  in freeing of sockets that are not listen sockets is primarily
  motivated by the potential need to remove the socket from the
  incomplete connection queue on its parent (listen) socket, so cleaning
  up the reference model here may allow us to substantially weaken the
  synchronization requirements.

  RELENG_5_3 candidate.

  MFC after:      3 days
  Reviewed by:    dwhite
  Discussed with: gnn, dwhite, green
  Reported by:    Marc UBM Bocklet <ubm at u-boot-man dot de>
  Reported by:    Vlad <marchenko at gmail dot com>

MFC after:	1 day
Approved by:	re (scottl)
2004-10-20 12:42:56 +00:00
Mark Murray 0b3b1731b2 Ensure that the loadable module version of the mem device contains
the same as for the builtin case.

Approved by:	re(scottl)
2004-10-20 11:05:27 +00:00
Robert Watson bff01ac41e Merge nfs_server.c:1.149 from HEAD to RELENG_5:
date: 2004/10/18 11:23:11;  author: rwatson;  state: Exp;  lines: +61 -13
  Correct several instances where calls to vfs_getvfs() resulting in
  failure in the NFS server would result in a leaked instance of the NFS
  server subsystem lock.  Liberally sprinkle assertions in all target
  labels for error unwinding to assert the desired locking state.

  RELENG_5_3 candidate.

  MFC after:      3 days
  Reported by:    Wilkinson, Alex <alex dot wilkinson at dsto dot defence
                  dot govdot au>

MFC after:	1 day
Approved by:	re (scottl)
2004-10-20 10:21:16 +00:00
Scott Long 146445e444 Update __FreeBSD_version to differentiate RELENG_5_3 from RELENG_5
Approved by: re
2004-10-16 19:29:22 +00:00
Scott Long 54a5857e20 Welcome to 5.3-STABLE. Even though the final release is not going to be cut
for a few more days, this branch is not -STABLE

Approved by: re
2004-10-16 19:26:13 +00:00
Søren Schmidt 9f37b70b3f MFC:
latest locking updates/fixes.

Approved by: re@ (scottl)
2004-10-16 08:43:06 +00:00
Pawel Jakub Dawidek 20553be303 Do not remove swap partitions by default as it cause some problems.
Instead, add 'swapoff' variable to rc.conf (turned off by default),
so users who use gmirror and swap-on-mirror configuration still can
turn it on and avoid problems with dirty mirror components on next
boot.

Idea from:	NetBSD
Approved by:	re (scottl)
2004-10-16 08:13:19 +00:00
Scott Long 19a139fcd0 MFC:
When harvesting entropy from an ethernet mbuf, do so before freeing the
  mbuf.

Submitted by: rwatson
Approved by: re
2004-10-16 07:04:49 +00:00
Alexander Kabaev 7d8d75eaf7 MFC r1.15:
Use a taskqueue rather than an swi to handle deferred notifications.
Obtained from:  same change for umct(4) driver.

Approved by:	re(scottl)
2004-10-16 03:38:41 +00:00
Alexander Kabaev 263f139a1f MFC r1.1.1.2.
Import a patch from GCC PR c/16999 to stop quoting already quoted ident
strings.

Approved by:	re(scottl)
2004-10-16 03:34:49 +00:00
Stephan Uphoff 98609fcf7f MFC: rev 1.12
Directly modifying the priority of a thread that may be on the runqueue
can break the sorting order of the ksegp run queue.

Approved by:    re (kensmith)
2004-10-16 02:17:54 +00:00
Stephan Uphoff fce542146e MFC: rev 1.99, rev 1.101
Prevent preemption in slot_fill.
Implement preemption between threads in the same ksegp in out of slot
situations to prevent priority inversion.
Fix maybe_preempt_in_ksegrp for !SMP.

Approved by:    re (kensmith)
2004-10-16 02:17:02 +00:00
Stephan Uphoff 42b4c9a38a MFC: rev 1.150
Force MUTEX_WAKE_ALL.
A race condition in single thread wakeup may break priority
inheritance.

Approved by:    re (kensmith)
2004-10-16 02:14:59 +00:00
Brian Feldman 185be6a972 MFC uma_dbg.c r1.16, uma_core.c r1.106-1.107: critical stability/leak fixes
(for MBUF clusters) implemented by UMA.

Approved by:	re
2004-10-16 01:41:34 +00:00
Christian Brueffer 055c411970 MFC: rev. 1.27, 1.28
- we use /etc/pam.d/login nowadays
- bump document date

Approved by:	re (kensmith)
2004-10-16 00:54:51 +00:00
Brian Feldman 79ccfda5c9 MFC r1.149-r1.151: add IFF_NEEDSGIANT when IS_GIANT and add ALTQ support.
Approved by:	re
2004-10-16 00:53:44 +00:00
Simon L. B. Nielsen 29a3a29747 - PAM configuration is now in /etc/pam.d/su.
- Bump document date.

Approved by:	re (kensmith)
2004-10-15 22:31:56 +00:00
Tony Ackerman e4f50cc9a8 MFC
Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C)
Removed support for Intel 82541ER
Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k.
Added fix for vlan tagged frames not being properly bridged.
Corrected TBI workaround.
Corrected incorrect LED operation issues
Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
This might fix some of the trouble around em(4) filling up its buffers.
Don't count RNBC (internal buffer full) towards the RX error count since it's
not really an error.

Approved by:	re[scott long]
2004-10-15 22:12:59 +00:00
John-Mark Gurney 05479a2356 MFC: kern_event.c v1.8[34]:
>  fix a bug where signal events didn't set the flags for attach/detach..
>  PR:             72234

Approved by:	re (scottl)
2004-10-15 21:58:35 +00:00
John-Mark Gurney 32fff7bf29 MFC: uipc_mbuf.c v1.136:
>  improve the mbuf m_print function..  Only pull length from pkthdr if there
>  is one, detect mbuf loops and stop, add an extra arg so you can only print
>  the first x bytes of the data per mbuf (print all if arg is -1), print
>  flags using %b (bitmask)...

musycc.c v1.34:
>  Add -1 to this non-existent use of m_print in the source tree so LINT
>  compiles again :-)

Approved by:	re (scottl)
2004-10-15 21:45:13 +00:00
Giorgos Keramidas dd87d9ed57 MFC 1.3:
Add the necessary magic to make the thousands separator work for
floating-point formats in the Greek locale.

Approved by:	re (kensmith)
2004-10-15 19:46:44 +00:00
Nate Lawson 9462332e2e MFC: Set device flags before probing.
Approved by:	re (kensmith)
2004-10-15 16:03:19 +00:00
Nate Lawson 8f2c005f6c MFC: Print flags options for acpi devices.
* Note, previous commit message should have been:
Set device description for devices that attach via isa_pnp_probe().

Approved by:	re (kensmith)
2004-10-15 16:02:43 +00:00
Ken Smith c90829029e MFC of v1.18, from that log entry:
> date: 2004/09/14 21:58:30;  author: tegge;  state: Exp;  lines: +1 -1
> Correct polarity of packet mode bit.
>
> Problem discovered when 'boot0cfg -B -v -o packet -s 2 ad4' turned off
> packet mode while reporting it as being enabled.

Reviewed by:	tegge
Approved by:	re (scottl)
2004-10-15 15:59:26 +00:00
cvs2svn aa951cbffb This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-10-15 06:43:49 +00:00
Pawel Jakub Dawidek 7baefd1c1d - There don't have to be a lock file.
- Be more userfriendly and allow to specify gbde device name in those forms:
	device
	device.bde
	/dev/device
	/dev/device.bde
- Fix stop routine:
	+ There don't have to be file system mounted on gbde device,
	  so ignore errors from umount(8).
	+ Only detach existing gbde devices.

Approved by:	re (kensmith)
2004-10-15 06:14:43 +00:00
Pawel Jakub Dawidek 638b61200f - Set maximum request size to MAXPHYS (128kB), instead of DFLPHYS (64kB).
- Set minimum request size to sectorsize, instead of 512 bytes.

Approved by:	re (kensmith)
2004-10-15 06:13:10 +00:00
Pawel Jakub Dawidek b0a2e65f0c Deny invalid I/O requests which comes from userland here, because later
we'll get a panic.

Approved by:	re (kensmith)
2004-10-15 06:12:29 +00:00
Pawel Jakub Dawidek e9aabbae95 - There is no need to skip providers with 0 sectorsize in taste routine
anymore.
- Avoid race while synchronizing components.
- Decrease timeout to 4 seconds.
- Just use MAXPHYS as maximum I/O request size, instead of using my own
  #define for this purpose.

Approved by:	re (kensmith)
2004-10-15 06:11:28 +00:00
Pawel Jakub Dawidek 752ec5cffa - Just use MAXPHYS as maximum I/O request size, instead of using my own
#define for this purpose.
- Before root file system is mounted, wait for mirrors in degraded state.
- Be sure to always return 0 for negative access requests.

Approved by:	re (kensmith)
2004-10-15 06:10:12 +00:00
Pawel Jakub Dawidek cd21f49289 Only allow for unloading when there are no geoms in LABEL GEOM class.
We have to use our own destroy_geom method, because default one, which
is a part of geom_slice is broken.

Approved by:	re (kensmith)
2004-10-15 06:08:14 +00:00
Nate Lawson 0cd9c85b15 MFC: print flags values in device announcement.
Approved by:	re (kensmith)
2004-10-15 05:20:20 +00:00
Nate Lawson 6a16abfad2 MFC: Add acpi attachments for the PNP devices.
Approved by:	re (kensmith)
2004-10-15 05:14:10 +00:00
Warner Losh 5e3b4d5e06 MFC 1.42:
hw.acpi.host_start_mem and revert back to old default.

Approved by: re@ (scottl)
2004-10-14 23:52:21 +00:00
Warner Losh 36b768ef90 MFC 1.115
Refert to using 0x800000 as start address.  hw.pci.host_start_mem
  tunable overrides

Approved by: re@ (scottl)
2004-10-14 23:47:00 +00:00
Andre Oppermann 9dc161731f MFC 1.15: Correctly unregister netisr's.
Approved by:	re (scottl)
2004-10-14 19:19:24 +00:00
Maxime Henrion bdaf0e69b1 Merge if_dc.c:1.152 from HEAD to RELENG_5:
date: 2004/10/01 15:23:31;  author: mux;  state: Exp;  lines: +4 -4
  Read the MAC address in the EEPROM in the correct byte order.  This
  is a no-op on little endian architectures, but fixes getting the MAC
  address for some dc(4) cards on big endian architectures.

Approved by:	re (scottl)
2004-10-14 18:37:01 +00:00
Brooks Davis b9323a6215 MFC rev 1.33:
A power failure left the temporary /var/.diskless directory
  on my system, and since then my /var was always created as
  MFS which was very surprising.  Fix this for /tmp and /var.

Approved by:    re (kensmith)
2004-10-14 14:38:49 +00:00
Robert Watson 3cb254ea13 Merge udp_usrreq.c:1.167 from HEAD to RELENG_5:
date: 2004/10/12 20:03:56;  author: rwatson;  state: Exp;  lines: +3 -3
  Don't release the udbinfo lock until after the last use of  UDP inpcb
  in udp_input(), since the udbinfo lock is used to prevent removal of
  the inpcb while in use (i.e., as a form of reference count) in the
  in-bound path.

  RELENG_5 candidate.

Approved by:	re (scottl)
2004-10-14 11:49:25 +00:00
Robert Watson 2c3c9533c8 Merge i4b_ipr.c:1.30 and i4b_isppp.c:1.27 from HEAD to RELENG_5:
date: 2004/10/12 09:25:52;  author: rwatson;  state: Exp;  lines: +2 -0
  date: 2004/10/12 09:25:52;  author: rwatson;  state: Exp;  lines: +2 -0
  Mark i4b IPR and SPPP drivers as NET_NEEDS_GIANT(), as they both
  interface with the network stack but are not yet sufficiently
  synchronized to run without the Giant lock.  It migh be possible
  to mark the interfaces as IFF_NEEDSGIANT, but I'm unable to test
  that configuration and am unfamiliar with the architecture of
  i4b.

Approved by:	re (scottl)
2004-10-14 11:48:05 +00:00
Robert Watson 95b65b8064 Merge raw_ip.c:1.145 from HEAD to RELENG_5:
date: 2004/10/12 16:47:25;  author: rwatson;  state: Exp;  lines: +41 -20
  When the access control on creating raw sockets was modified so that
  processes in jail could create raw sockets, additional access control
  checks were added to raw IP sockets to limit the ways in which those
  sockets could be used.  Specifically, only the socket option IP_HDRINCL
  was permitted in rip_ctloutput().  Other socket options were protected
  by a call to suser().  This change was required to prevent processes
  in a Jail from modifying system properties such as multicast routing
  and firewall rule sets.

  However, it also introduced a regression: processes that create a raw
  socket with root privilege, but then downgraded credential (i.e., a
  daemon giving up root, or a setuid process switching back to the real
  uid) could no longer issue other unprivileged generic IP socket option
  operations, such as IP_TOS, IP_TTL, and the multicast group membership
  options, which prevented multicast routing daemons (and some other
  tools) from operating correctly.

  This change pushes the access control decision down to the granularity
  of individual socket options, rather than all socket options, on raw
  IP sockets.  When rip_ctloutput() doesn't implement an option, it will
  now pass the request directly to in_control() without an access
  control check.  This should restore the functionality of the generic
  IP socket options for raw sockets in the above-described scenarios,
  which may be confirmed with the ipsockopt regression test.

  RELENG_5 candidate.

  Reviewed by:    csjp

Approved by:	re (scottl)
2004-10-14 11:45:26 +00:00
Robert Watson 83c262f9e5 Merge uipc_socket.c:1.213 from HEAD to RELENG_5:
date: 2004/10/11 08:11:26;  author: rwatson;  state: Exp;  lines: +19 -5
  Rework sofree() logic to take into account a possible race with accept().
  Sockets in the listen queues have reference counts of 0, so if the
  protocol decides to disconnect the pcb and try to free the socket, this
  triggered a race with accept() wherein accept() would bump the reference
  count before sofree() had removed the socket from the listen queues,
  resulting in a panic in sofree() when it discovered it was freeing a
  referenced socket.  This might happen if a RST came in prior to accept()
  on a TCP connection.

  The fix is two-fold: to expand the coverage of the accept mutex earlier
  in sofree() to prevent accept() from grabbing the socket after the "is it
  really safe to free" tests, and to expand the logic of the "is it really
  safe to free" tests to check that the refcount is still 0 (i.e., we
  didn't race).

  RELENG_5 candidate.

  Much discussion with and work by:       green
  Reported by:    Marc UBM Bocklet <ubm at u-boot-man dot de>
  Reported by:    Vlad <marchenko at gmail dot com>

Note that this fix is not yet confirmed by submitters to correct the
specific symptom they are seeing, but does correct a known problem.

Approved by:	re (scottl)
2004-10-14 11:43:16 +00:00
Tom Rhodes 8aee1e03d2 MFC: Bring in the startup files to permit loading of mac_bsdextended(4)
rules on system initialization.

Remove requirement on FreeBSD keyword.

Approved by:	re (kensmith)
2004-10-14 04:36:15 +00:00
Brian Feldman f6ebdf929c MFC r1.78: further rule verification (against corrupt rules added by root).
Approved by:	re
2004-10-13 22:07:05 +00:00
Christian Brueffer 8f10d45525 MFC: rev. 1.18
- D-Link DFE-500TX verified to work
- remove the 'Asante' entry which isn't very helpful

Approved by:	re (kensmith)
2004-10-13 21:54:14 +00:00
Max Laier 71b4941454 MFC build fix:
Fix compiler warnings, when __stdcall is #defined, by adding explicit
  casts. These normally only manifest if the ndis compat module is
  statically compiled into a kernel image by way of 'options NDISAPI'.

  Submitted by:	Dmitri Nikulin
  Approved by:	wpaul
  PR:		kern/71449

Approved by:	re (kensmith)
2004-10-13 19:23:33 +00:00
Xin LI 7f7385c91c MFC revision 1.41
date: 2004/09/08 11:25:41;  author: tjr;  state: Exp;  lines: +18 -3
Merge from NetBSD:
Fix a problem in previous: we can't blindly assume that we have
wincnt entries available at the offset the file has been found. If the dos
directory entry is not preceded by appropriate number of long name
entries (happens e.g. when the filesystem is corrupted, or when
the filename complies to DOS rules and doesn't use any long name entry),
we would overwrite random directory entries.

There are still some problems, the whole thing has to be revisited and solved
right.

Approved by:	re (scottl)
Approved by:	murray (mentor)
2004-10-13 16:28:40 +00:00
Xin LI ce5cbe3110 MFC revision 1.36
date: 2004/09/08 10:57:09;  author: tjr;  state: Exp;  lines: +5 -0
Merge from NetBSD:
Fix a panic that occurred when trying to traverse a corrupt msdosfs
filesystem.  With this particular corruption, the code in pcbmap()
would compute an offset into an array that was way out of bounds,
so check the bounds before trying to access and return an error if
the offset would be out of bounds.

Approved by:	re (scottl)
Approved by:	murray (mentor)
2004-10-13 16:27:27 +00:00
Takanori Watanabe c72cf713dc MFC: uhid.c:1.74
Don't use matchlvl attach arg. It seems to be not initialized
in FreeBSD probe mechanism.

Approved by: re(scottl)
2004-10-13 00:51:01 +00:00
John-Mark Gurney df9cff8adf MFC:
if_re.c v1.35, if_rlreg.h v1.48:
>  fix jumbo frames as much as they can be fixed for re.  We now cap the MTU
>  to 7422 since it appears that the 8169S can't transmit anything larger..
>  The 8169S can receive full jumbo frames, but we don't have an mru to let
>  the upper layers know this...
>
>  add fixup so that this driver should work on alignment constrained
>  platforms
>  (!i386 && !amd64)

re.4 v1.9 & v1.10:
>  document the limit on jumbo frame size..                                     and bump document date

Approved by:	re (scottl)
2004-10-12 21:51:20 +00:00
Robert Watson 1f9bc317de Merge tcp_output.c:1.103 from HEAD to RELENG_5:
date: 2004/10/09 16:48:51;  author: rwatson;  state: Exp;  lines: +14 -2
  Acquire the send socket buffer lock around tcp_output() activities
  reaching into the socket buffer.  This prevents a number of potential
  races, including dereferencing of sb_mb while unlocked leading to
  a NULL pointer deref (how I found it).  Potentially this might also
  explain other "odd" TCP behavior on SMP boxes (although  haven't
  seen it reported).

Approved by:	re (kensmith)
2004-10-12 17:36:45 +00:00
Robert Watson aebb1d386e Merge socketvar.h:1.134 from HEAD to RELENG_5:
date: 2004/10/09 16:42:57;  author: rwatson;  state: Exp;  lines: +1 -0
  Add SOCKBUF_UNLOCK_ASSERT(), which asserts that the current thread does
  not hold the mutex for a socket buffer.

This change is a dependency to merge tcp_output.c:1.103.

Approved by:	re (kensmith)
2004-10-12 17:34:13 +00:00
Julian Elischer 64eaf74c00 MFC: remove duplicate slot release.
Approved by:	re (scottl)
2004-10-12 05:33:33 +00:00
Christian Brueffer f280b9cff1 MFC: rev. 1.14
vge(4) supports polling

Approved by:	re (rwatson)
2004-10-12 00:08:02 +00:00
Matt Jacob 81db75342c MFC fixes for working with PAE kernels.
Approved by:	re
2004-10-11 23:59:03 +00:00
Julian Elischer 38629e467a MFC:
Capture calls to execve() to make sure that the
	signal mask is set correctly on the thread that is going to
	continue in the new process. Required for Posix compliance.
	This is not perfect and better fixes may happen after 5.3
	is released.

Approved by: re (scottl)
2004-10-11 20:04:59 +00:00
Brian Feldman 202a0686f4 This means that traffic may be dropped unconditionally for a short period
of time.

Approved by:	re
2004-10-11 18:42:12 +00:00
Denis Peplin 8458030113 Fix typo.
Approved by: re (hrs)
2004-10-11 13:09:51 +00:00
Denis Peplin 537561cd79 Merge from English version 1.761.2.11
Approved by: re (hrs)
2004-10-11 12:59:07 +00:00
Brian Feldman e7e4a1c2e4 MFC r1.46: Do not recurse the routing code.
Approved by:	re
2004-10-11 03:46:38 +00:00
Brian Feldman e4d22827fe MFC r1.11: fail closed when lock acquisition would block.
Approved by:	re
2004-10-11 03:45:57 +00:00
Brian Feldman a56aeb1e8c MFC r1.137: reorder code to respect lock non-recursion.
Approved by:	re
2004-10-11 03:45:21 +00:00
Peter Edwards aec9a222f0 MFC of 1.296:
Fix off-by-one error in fd_native_types that results in a panic
    on boot for machines with 2.88M floppies.

Reviewed by: phk
Approved by: re (scottl@)
2004-10-10 23:49:38 +00:00
Alan Cox c559df2d8b MFC revisions 1.5 and 1.6:
- Update to reflect recent changes such as the fields for O(log n) address
   space allocation.
 - Document the flags field.

Approved by: re (scottl)
2004-10-10 19:53:16 +00:00
Alan Cox 267b92e122 MFC multiple pmap changes
amd64 and i386
 - Remove unnecessary checks for curthread == NULL and pmap == NULL.
 - Release the page queues lock earlier in pmap_protect() and pmap_remove()
   in order to reduce contention.
 - Remove an outdated assertion from _pmap_allocpte().
 - Simplify the reference counting of page table pages.  Specifically, use
   the page table page's wired count rather than its hold count to contain
   the reference count.
 - Prevent the unexpected deallocation of a page table page while
   performing pmap_copy().
 - Eliminate the unnecessary masking of the page offset bits from the
   physical address that is stored in the vm_page.
 - Undo revision 1.251.  This change was a performance pessimizing work-
   around that is no longer required.  Now, if the preexisting PTE is
   invalid, pmap_enter() does not call pmap_invalidate_page() to update
   the TLB(s).
 - Make pte_load_store() an atomic operation in all cases, not just i386
   PAE.
 - Restructure pmap_enter() to prevent the loss of a page modified (PG_M)
   bit in a race between processors.  (This restructuring assumes the newly
   atomic pte_load_store() for correct operation.)

amd64 only
 - It is now an error to call pmap_unuse_pt without the paddr of the pde
   that contained the pte.
 - Remove an unused declaration.

i386 only
 - Modify pmap_pte() to support its use on non-current, non-kernel pmaps
   without holding Giant.

Approved by: re (scottl)
2004-10-10 19:08:00 +00:00
Peter Wemm 4633ee43ac MFi386: Fix breakpoint handling.
Approved by:  re
2004-10-10 18:54:30 +00:00
Mike Makonnen 65279a2aa9 RCS file: /home/ncvs/src/UPDATING,v
----------------------------
revision 1.372
date: 2004/10/07 14:51:23;  author: mtm;  state: Exp;  lines: +0 -0
Make a note in UPDATING about the recent change regarding
the FreeBSD keyword.
=============================================================================

o Add additional information on how to cope with this change.
o Fix the date for the previous libthr change to correctly reflect
  the date it was MFCed on.

Approved by: re/assumed because of approval for the actual src change
2004-10-10 16:16:31 +00:00
Søren Schmidt 5479451b43 MFC:
Pull ATA up to -current levels minus PC98 geometry changes:

Fix the serverworks modesetting code, of mask offset was wrong.
Always set half'n'half mode on ICH* chips.
Fix the PC98 lockups on boot.
Add SHARP to the pool of drives that doesn not need byteswapping.
Add support for the ICH6 in legacy mode.
Dont sleep with lock held.

Approved by:	re@ (scottl)
2004-10-10 15:01:47 +00:00
Scott Long 38345c1381 MFC: Disable MTU feedback on fragmented IPv6 packets.
Submitted by: dwhite
Approved by: re
2004-10-10 13:59:39 +00:00
Mike Makonnen d172341696 RCS file: /home/ncvs/src/etc/rc,v
----------------------------
revision 1.335
date: 2004/10/08 14:23:49;  author: mtm;  state: Exp;  lines: +0 -1
Remove an unused variable.

Submitted by: Pawel Worach <[email protected]>
----------------------------
revision 1.334
date: 2004/10/07 13:55:25;  author: mtm;  state: Exp;  lines: +1 -1
Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/nsswitch,v
----------------------------
revision 1.4
date: 2004/09/16 17:03:12;  author: keramida;  state: Exp;  lines: +1 -1
Fix requirement of `network' to `NETWORK' because the former isn't
provided by any rc.d script.

Approved by:	mtm
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/pflog,v
----------------------------
revision 1.3
date: 2004/09/16 17:04:20;  author: keramida;  state: Exp;  lines: +1 -1
We don't have any providers of `beforenetlkm' in FreeBSD.  Remove the
dependency to it from our rc.d scripts.

Approved by:	mtm
=============================================================================

Approved by: re/scottl
2004-10-10 09:50:54 +00:00
Warner Losh 1dbd1d711a MFC: 1.41
Top 32MB rather than top 2G to better match old hardware.

Approved by: re@
2004-10-10 04:47:05 +00:00
Warner Losh 8da0d088ff MFC 1.113, 1.114
Restrict unrestricted memory resources by default.

Approved by: re@
2004-10-10 04:38:52 +00:00
Nate Lawson bf6fa6f9e7 MFC: Only disable the timer for the ASUS P5A and -B.
Approved by:	re (scottl)
2004-10-10 03:15:45 +00:00
Christian S.J. Peron 5d1e011ac8 Log:
Add a note to the man page warning users about possible lock order
  reversals+system lock ups if they are using ucred based rules
  while running with debug.mpsafenet=1.

  I am working on merging a shared locking mechanism into ipfw which
  should take care of this problem, but it still requires a bit more                                                                                        testing and review.

Approved by:	re@ (hrs)
2004-10-10 00:57:23 +00:00
Doug Barton d64cde7e8c MFC improvements to the /etc/namedb symlink issue, NO_BIND_MTREE knob,
and updated make.conf(5).

Approved by:	re (scottl)
2004-10-09 18:38:58 +00:00
David Schultz 9d0490b436 MFC src/sys/nfsclient/nfs_bio.c, v1.136
| nfsclient/nfs_bio.c has a PHOLD() without a PRELE().  Neither should
| be necessary here.  Also, use killproc() instead of psignal().

Approved by:	re (scottl)
2004-10-09 17:11:22 +00:00
David Schultz e2fff36150 MFC src/sys/fs/procfs/procfs_dbregs.c, v1.25 src/sys/fs/procfs/procfs_fpregs.c, v 1.31 src/sys/fs/procfs/procfs_regs.c, v1.30
| Don't PHOLD() the target process in procfs, since this is already done
| in pseudofs.  Moreover, PHOLD() may block between the p_candebug()
| access check and the actual operation.

Approved by:	re (scottl)
2004-10-09 17:11:08 +00:00
David Schultz 1c35693966 MFC src/sys/i386/linux/linux_ptrace.c, v1.14
| Fix the following race:
|
|   1. Process p1 is currently being swapped in.
|   2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...)
|   3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1),
|      p2 blocks in faultin() while p1 finishes being swapped in.
|      This means p2 won't get back the lock on p1 until after p1's
|      threads are runnable.
|   4. After p1 is swapped in, the first thread in p1 exits.
|   5. p2 now uses its dangling reference to p1's first thread.

Approved by:	re (scottl)
2004-10-09 17:10:48 +00:00
Mike Makonnen 902f60828b MFC:
RCS file: /home/ncvs/src/UPDATING,v
----------------------------
revision 1.370
date: 2004/10/07 05:45:39;  author: mtm;  state: Exp;  lines: +5 -0
Note libthr ABI breakage.
=============================================================================

Approved by: re/assumed because of libthr abi change already approved
2004-10-09 15:58:51 +00:00
Mike Makonnen 199531033f ----------------------------
revision 1.41
date: 2004/09/16 13:55:46;  author: mtm;  state: Exp;  lines: +21 -0
Implement cancellation points in libc interfaces, as specified by POSIX.
=============================================================================

Approved by: re/scottl
2004-10-09 15:37:42 +00:00
Max Laier 89a256681a MFC:
Add a minimal altq.4 manpage to tell about the kernel options and where
  to find more information. Also move the "SUPPORTED DEVICES" section from
  altq.9 to altq.4, where is belongs.

  Requested by:   green

AND

  Rename the QUEUEING section of pf.conf(5) to QUEUEING/ALTQ to make it
  easier to find the appropiate section when redirected from ALTQ(4).

Approved by:	re (scottl)
2004-10-09 15:29:14 +00:00
Mike Makonnen 4e8e4b2f0c Regen for the thr_exit() syscall change.
Approved by: re/scottl
2004-10-09 15:25:41 +00:00
Max Laier 23db2fa1df MFC:
Fix sis, bfe and ndis in the same way dc was fixed:
    Do not tell the hardware to send when there were no packets enqueued.

  Found and reviewed by: green

Approved by:	re (scottl)
2004-10-09 15:20:18 +00:00
Mike Makonnen 8bc61b56c6 ----------------------------
revision 1.32
date: 2004/09/22 18:51:16;  author: mtm;  state: Exp;  lines: +1 -14
Remove vestiges of libthr's signal mangling past. This fixes that last
known problem with mysql on libthr: not being able to kill mysqld.
----------------------------
revision 1.31
date: 2004/09/22 16:53:23;  author: mtm;  state: Exp;  lines: +6 -27
The SUSv3 function say that the affected functions MAY FAIL, if the
specified mutex is invalid. In spec parlance 'MAY FAIL' means it's
up to the implementor. So, remove the check for NULL pointers for two
reasons:
	1. A mutex may be invalid without necessarily being NULL.
	2. If the pointer to the mutex is NULL core-dumping in the
	   vicinity of the problem is much much much better than failing
	   in some other part of the code (especially when the application
	   doesn't check the return value of the function that you oh so
	   helpfully set to EINVAL).
=============================================================================

Approved by: re/scottl
2004-10-09 15:13:50 +00:00
Mike Makonnen 101596b827 MFC:
----------------------------
revision 1.15
date: 2004/10/08 14:48:02;  author: mtm;  state: Exp;  lines: +1 -4
Remove a reference to a non-existent syscall: _thr_exit(). The
actual name is thr_exit(). How this ever worked is beyond me.
----------------------------
revision 1.14
date: 2004/10/06 14:20:57;  author: mtm;  state: Exp;  lines: +2 -3
Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.

Discussed with: davidxu, deischen, marcel
MFC after: 3 days
=============================================================================

Approved by: re/scottl
2004-10-09 15:12:33 +00:00
Robert Watson ec63867897 Merge ip_mroute.c:1.109 to RELENG_5:
date: 2004/10/07 14:13:35;  author: rwatson;  state: Exp;  lines: +7 -4
  When running with debug.mpsafenet=0, initialize IP multicast routing
  callouts as non-CALLOUT_MPSAFE.  Otherwise, they may trigger an
  assertion regarding Giant if they enter other parts of the stack from
  the callout.

  MFC after:      3 days
  Reported by:    Dikshie < dikshie at ppk dot itb dot ac dot id >

Approved by:	re (scottl)
2004-10-09 15:12:04 +00:00
Mike Makonnen 8cf0e32cc8 MFC:
lib/Makefile:
----------------------------
revision 1.1
date: 2004/08/19 23:41:12;  author: davidxu;  state: Exp;
Add AMD64 support code.
=============================================================================

RCS file: /home/ncvs/src/lib/libthr/arch/i386/i386/_setcurthread.c,v
----------------------------
revision 1.15
date: 2004/08/19 23:49:04;  author: davidxu;  state: Exp;  lines: +10 -3
Adjust code to support AMD64, on AMD64, thread needs to set fsbase by
itself before it can execute any other code, so new thread should be
created with all signals are masked until after fsbase is set.
=============================================================================

RCS file: /home/ncvs/src/lib/Makefile,v
----------------------------
revision 1.190
date: 2004/08/19 23:51:42;  author: davidxu;  state: Exp;  lines: +1 -2
build libthr on amd64.
=============================================================================

Approved by: re/scottl
2004-10-09 15:07:20 +00:00
Julian Elischer 91ffc81a50 MFC (kind of):
part of a small change by davidxu that didn't exactly correspond to
a perfect MFC as it was a change to code that was removed from -current and
put back, where it was never removed from 5.x in the first place.

Approved by:	re (scottl)
2004-10-09 10:36:32 +00:00
David Xu e55314ae08 MFC 1.9:
Allocate red zone and stack space together and then split red zone from
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.

Approved by: re (scottl)
2004-10-09 10:21:19 +00:00
Julian Elischer 27e841da15 MFC:
Slight rearrangement of some code to get some locking
  more correct

  Revision  Changes    Path
  1.204     +27 -15    src/sys/kern/kern_kse.c

Approved by:	re (scottl)
2004-10-09 10:19:05 +00:00
Julian Elischer 42a57be305 MFC:
Fix whitespace botch that only showed up in the commit message diff :-/

  Revision  Changes    Path
  1.134     +1 -1      src/sys/kern/sched_ule.c

Approved by:	re (scottl)
2004-10-09 10:04:13 +00:00
cvs2svn e6cea8cec4 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-10-09 07:31:04 +00:00
Julian Elischer b95b5a2615 MFC:
When preempting a thread, put it back on the HEAD of its run queue.
  (Only really implemented in 4bsd)

  Revision  Changes    Path
  1.97      +8 -6      src/sys/kern/kern_switch.c
  1.67      +28 -26    src/sys/kern/sched_4bsd.c
  1.133     +14 -6     src/sys/kern/sched_ule.c
  1.408     +2 -0      src/sys/sys/proc.h
  1.5       +1 -1      src/sys/sys/runq.h

Approved by:	re (scottl)
2004-10-09 05:25:22 +00:00
Julian Elischer bafd6c1297 MFC:
Fix breakpoint handling for i386.
  Also fixes small problems with examining some registers and
  some specific gdb transfer problems.

PR:             i386/71715
Submitted by:   Stephan Uphoff <[email protected]>

Approved by:	re (scottl)
2004-10-09 05:20:18 +00:00
Julian Elischer 407a8b0126 MFC:
Always start out with an initialised ksegrp structure.

  Revision  Changes    Path
  1.200     +3 -3      src/sys/kern/kern_thread.c

Approved by:	re (scottl)
2004-10-09 04:49:58 +00:00
Julian Elischer b36b34021c MFC:
Use some macros to track available scheduler slots to allow
  easier debugging.

  Revision  Changes    Path
  1.96      +8 -3      src/sys/kern/kern_switch.c
  1.66      +26 -4     src/sys/kern/sched_4bsd.c
  1.131     +30 -16    src/sys/kern/sched_ule.c
  1.132     +2 -0      src/sys/kern/sched_ule.c

Approved by:	re (scottl)
2004-10-09 04:47:37 +00:00
Julian Elischer 61914022cf MFC:
Break out to a separate function, the code to revert a multithreaded
  process back to officially being a non-threaded program.

  Revision  Changes    Path
  1.203     +1 -2      src/sys/kern/kern_kse.c
  1.201     +26 -14    src/sys/kern/kern_thread.c
  1.407     +1 -0      src/sys/sys/proc.h

Approved by:	re (scottl)
2004-10-09 04:42:41 +00:00
Julian Elischer 8bf9eef549 MFC:
1.254     +46 -12    src/sys/kern/kern_exec.c
 1.203     +60 -23    src/sys/kern/kern_thread.c
 1.409     +5 -3      src/sys/sys/proc.h

 In original kern_execve() code, at the start of the function, it forces
 all other threads to suicide, problem is execve() could be failed, and
 a failed execve() would change threaded process to unthreaded, this side
 effect is unexpected.
 The new code introduces a new single threading mode SINGLE_BOUNDARY, in
 the mode, all threads should suspend themself at user boundary except
 the singler. we can not use SINGLE_NO_EXIT because we want to start from
 a clean state if execve() is successful, suspending other threads at unknown
 point and later resuming them from there and forcing them to exit at user
 boundary may cause the process to start from a dirty state. If execve() is
 successful, current thread upgrades to SINGLE_EXIT mode and forces other
 threads to suicide at user boundary, otherwise, other threads will be resumed
 and their interrupted syscall will be restarted.

Submitted by:	davidxu
Approved by:	re (scottl)
2004-10-09 04:33:02 +00:00
Julian Elischer d50283a682 MFC 1.202:
Slight cleanup in the single threading code.

 needed to make the next MFC apply cleanly..

Approved by:	re (scottl)
2004-10-09 04:21:34 +00:00
Julian Elischer 935dc23b53 MFC 1.28:
Close a race between thr_create and sysctl -w, the thr_scope_sys could
    be changed when thr_create is running, and we tested it for several times.

Submitted by:	davidxu
Approved by:	re (scottl)
2004-10-09 04:13:58 +00:00
Scott Long 43dd15c596 MFC: Increase NKPT to allow for up to 16GB on i386/PAE and amd64.
Approved by: re
2004-10-09 03:00:17 +00:00
Scott Long 8c6692c2d8 MFC locking fixed from HEAD
Approved by: re
2004-10-08 23:56:36 +00:00
Alan Cox 3b64e3a9ce MFC
Add a SOCKBUF_LOCK() to a rarely executed path in do_sendfile().

Approved by: re (scottl)
2004-10-08 23:37:19 +00:00
Simon L. B. Nielsen 3a747a825e Quote sound device names which contain numbers.
Note that this change does not apply to -CURRENT, because config(8)
there has been modified not to require the quoting.

Noticed by:	Martin Faxer <[email protected]>
mdoc(7) advise:	ru
Approved by:	re (hrs)
2004-10-08 20:29:35 +00:00
John Baldwin 975988841c MFC: Add a critical section to close a priority inversion race found by
ups@.

Approved by:	re (scottl)
2004-10-08 19:47:23 +00:00
Nate Lawson e0b3822434 MFC rev 1.8: Override all SSDTs with an empty table when overriding the DSDT.
Approved by:	re (scottl)
2004-10-08 18:09:36 +00:00
Nate Lawson 6c9c9885d4 MFC rev 1.40: Update the man page for overriding your AML.
Approved by:	re (scottl)
2004-10-08 18:08:13 +00:00
Nate Lawson 4bc0bb0d9c MFC: Update comments and man page for acpidump. No functional changes.
Approved by:	re (scottl)
2004-10-08 18:04:08 +00:00
Hiroki Sato f3b79d12bc Trim errata for RELENG_5.
Approved by:	re (implicitly)
2004-10-08 16:07:56 +00:00
Max Laier 35bb263cd0 MFC:
Make pflogd cope with module unload (and the sudden disappearing of
  pflog0). Instead of eating all the available CPU we now shutdown
  gracefully.

  Submitted by:   yongari

Approved by:	re (scottl)
2004-10-08 15:53:34 +00:00
Hiroki Sato e5e8534624 New release notes:
SA-04:15, and BIND update (8.3.1->9.3.0).

Update release notes:
	update a list of network interfaces which support polling(4), and
	fix a typo s/lukemftp/lukemftpd/.

Approved by:	re (implicitly)
2004-10-08 15:53:11 +00:00
Max Laier 07230173a0 MFC:
Remove obsolete references to PFIL_HOOKS and RANDOM_IP_ID

Approved by:	re (scottl)
2004-10-08 15:51:52 +00:00
Alfred Perlstein 1177d8025a MFC 1.291: Clear a process's procfs trace points upon delivery of SIGKILL.
Approved by: re (scottl)
2004-10-08 15:23:50 +00:00
Denis Peplin 22df69f32e Merge from English version 1.21.2.2 -> 1.21.2.4
Approved by:	re (hrs)
2004-10-08 09:26:12 +00:00
Julian Elischer fd683be6a0 MFC of kern_descrip.c 1.245
"Another case where we need to guard against a partially
  constructed process.
      Submitted by: Stephan Uphoff ( ups at tree.com  ) "

Approved by:	re (scottl)
2004-10-08 04:30:03 +00:00
Ken Smith ed1644befb MFC v1.114: On MP machines use a negative quality value for the timers
in the CPUs so they will not be chosen as the main timecounter.  Because
we don't even try to keep the timers in the CPUs synchronized using them
can result in time not monotonically increasing at the whims of which CPU
the timer is checked on.  On non-MP machines use a relatively high value
so the CPUs timer is more likely to be chosen as the main timecounter.

Approved by:	re (scottl)
2004-10-07 22:18:35 +00:00
Ken Smith cde8dc440b MFC of v1.7: Turn off getty for ttyu0/ttyu1 because they are not present
on a freshly installed machine.

Approved by:	re (scottl)
2004-10-07 22:07:31 +00:00
Paul Saab 65945eee6f MFC: rev 1.46 ICH6 support
Approved by:	re
2004-10-07 18:38:55 +00:00
Lukas Ertl 7b90437e8f MFC:
Make it possible to rebuild degraded RAID5 plexes.  Note that it is
currently not possible to do this while the volume is mounted.

Correctly skip the '/dev/' part when creating new drives and prefix
a drive's provider with '/dev/' when printing the config.

Don't allow to create a drive that already exists.

Approved by:  re@ (scottl)
2004-10-07 17:51:06 +00:00
MIHIRA Sanpei Yoshiro 67983d4fa3 MFC uscanner.4 1.18
Add a HARDWARE section which lists supported devices.
EPSON GT-8400UF(This product is same device id, 0x011f
as EPSON Perfection 1670 scanner)

Approved by: re (hrs)
2004-10-07 13:52:14 +00:00
David Xu 5d7337f641 MFC revision 1.292:
>Don't bother to turn off other P_STOPPED bits for SIGKILL, doing
>so would cause kernel to produce an unkillable process in some cases,
>especially, P_STOPPED_SINGLE has a singling thread, turning off the
>bit would mess the state

Approved by: re (jhb)
2004-10-06 23:44:16 +00:00
Peter Wemm f6e359d651 MFC: fix cvsbug to actually work, fix the version number cvs reports.
Approved by:  re (scottl)
2004-10-06 23:40:48 +00:00
Peter Wemm dcfd75385d MFC: jumbo update for build32.sh script
Approved by: re (kensmith, scottl)
2004-10-06 23:37:35 +00:00
Peter Wemm 45f7a05629 MFC: make libgnuregex not depend on -I overrides that conflict with the
build32.sh script.

Approved by:  re (kensmith, scottl)
2004-10-06 23:36:20 +00:00
Bruce A. Mah fce950a8b5 Mention the BIND 8 to BIND 9 transition. Largely based on system
update instructions originally written by dougb for src/UPDATING.

Reviewed by:	dougb, hrs
Approved by:	re (implicitly)
2004-10-06 05:55:51 +00:00
Max Laier fb51f417b5 MFC:
PFIL_HOOKS in no longer an optional item.

  Submitted by:   Anders Hanssen

Approved by:	re (hrs)
2004-10-05 20:44:24 +00:00
Max Laier 52258cdf39 MFC: pf.conf.5, rev 1.3:
Document a problem with user/group filtering. With debug.mpsafenet=1 this
  might result in a deadlock. The fix involves critical changes in the PF
  locking strategy (which will happen after 5.3R). For now advise users to
  set debug.mpsafenet=0 if they use this kind of filtering.

Approved by:	re (hrs)
2004-10-05 20:42:15 +00:00
Sheldon Hearn 4ab6959667 MFC rev 1.32: regen
Approved by:	re (hrs)
2004-10-05 20:12:15 +00:00
Ken Smith 3afbd543d1 MFC of v1.6: set tc_quality field of struct before calling tc_init(),
structure space had been obtained from malloc().

Approved by:	re (scottl)
2004-10-05 17:01:16 +00:00
Ken Smith eb46786666 MFC of v1.66: Remove print/acroread4 from the Alpha disc1 since it is
no longer available.

Approved by:	re (scottl)
2004-10-05 16:53:58 +00:00
Brooks Davis 7e4406e1bc MFC: 1.207
Log the renaming of an interface.  This should make it easier to follow
kernel log files.

Approved by:	re (scottl)
2004-10-04 22:57:10 +00:00
Dag-Erling Smørgrav 18daca5ed7 MFC: (1.136) turn VM_KMEM_SIZE_MAX and VM_KMEM_SIZE_SCALE into tunables
Approved by:	re (scottl)
2004-10-03 23:44:31 +00:00
Max Laier e28dbfbc37 MFC pfil API change:
Add an additional struct inpcb * argument to pfil(9) in order to enable
  passing along socket information. This is required to work around a LOR
  with the socket code which results in an easy reproducible hard lockup
  with debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us
  to do so later. The missing piece is to turn the filter locking into a
  leaf lock and will follow in a seperate (later) commit.

  Suggested by:           rwatson
  A lot of work by:       csjp
  LOR IDs:                14 - 17 (not fixed yet)

Approved by:	re (scottl)
2004-10-03 17:04:41 +00:00
Maksim Yevmenkin f4d2cf692b MFC: Make -t <tty> optional. If not specified use stdin/stdout.
Document this. These changes make it possible to write something like

	set device "!/usr/bin/rfcomm_sppd -a BD_ADDR"

inside the /etc/ppp/ppp.conf file. Very convenient for the users :)

Submitted by:	Konstantin Stepanenkov <kstepanenkov AT oilspace DOT com>
Approved by:	re (scottl)
2004-10-03 16:14:43 +00:00
MIHIRA Sanpei Yoshiro 62cba610e1 MFC ich.c 1.43 - 1.45:
Add support Nvidia nForce2(audio)
Add support nForce3 250 audio
Correct the capitalization of "nVidia".

Approved by:	re(hrs)
2004-10-02 22:33:51 +00:00
Scott Long 9a7ef35e6b Bump to BETA7
Approved by: re
2004-10-02 14:17:44 +00:00
Scott Long 3c1ac75bcb MFC: Fixes contigfree calls so that the driver no longer panics on boot
with INVARIANTS.

Submitted by: sos
Approved by: re
2004-10-02 14:14:27 +00:00
Sam Leffler 4b8fdd5f35 MFC various fixes:
o Correct handling of SADB_UPDATE and SADB_ADD requests.
o Add missing locking for secpolicy refcnt manipulations.
o Remove extraneous SECPOLICY_LOCK_DESTROY calls.

Submitted by:	Roselyn Lee
Approved by:	re (scottl)
2004-10-02 04:55:47 +00:00
Marcel Moolenaar 18e4890963 MFC rev 1.7: Trade slattach for gpt.
Approved by: re (blanket)
2004-10-02 04:16:30 +00:00
Scott Long 767028da93 MFC: Add in libhistory, libm, libopie, libpcap, and libreadline and update
libc, libc_r, and libperl.

Approved by: re
2004-10-02 02:01:51 +00:00
Scott Long 59a296cfd3 MFC: Add The following libraries:
libhistory.so.4
libm.so.2
libopie.so.2
libpcap.so.2
libreadline.so.4

Update the following libraries:
libc.so.4
libc_r.so.4
libperl.so.3

These changes were made by sliding the RELENG_5 and RELENG_5_BP labels.

Approved by: re
2004-10-01 23:16:59 +00:00
Scott Long c8f8fba370 MFC rev 1.68:
Merge netipsec/key.c:1.17 into KAME pfkey implementation:

    date: 2004/09/26 02:01:27;  author: sam;  state: Exp;  lines: +0 -5
    Correct handling of SADB_UPDATE and SADB_ADD requests.  key_align may
    split the mbuf due to use of m_pulldown.  Discarding the result because
    of this does not make sense as no subsequent code depends on the entire
    msg being linearized (only the individual pieces).  It's likely
    something else is wrong here but for now this appears to get things back
    to a working state.

    Submitted by:   Roselyn Lee

  This change was also made in the KAME CVS repository as key.c:1.337 by
  itojun.

Approved by: re
2004-10-01 19:18:55 +00:00
Max Laier b7a3cc40a0 MFC: if_em.c, rev 1.46:
Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
  This might fix some of the trouble around em(4) filling up its buffers.

  Submitted by:   mtm

This is a 5.3 TODO item.

PR:		misc/72183

Approved by:	re (scottl)
2004-10-01 18:51:11 +00:00
Ken Smith 94d10b137d MFC: Bump of library version numbers for:
/lib/{libm,libreadline}
	/usr/lib/{libhistory,libopie,libpcap}

Versions of effected files being MFC-ed from commit done to HEAD:

	Revision  Changes    Path
	1.367     +15 -0     src/UPDATING
	1.10      +1 -1      src/gnu/lib/libreadline/Makefile.inc
	1.19      +1 -1      src/lib/libopie/Makefile
	1.34      +1 -1      src/lib/libpcap/Makefile
	1.52      +1 -0      src/lib/msun/Makefile

Approved by:	re (scottl)
2004-10-01 16:32:06 +00:00
Ken Smith d00a8dfe6d MFC v1.865: Address ia64 disc2 overflow problem and fix to removal of
temp file left by 'make index'.

Approved by:	re (scottl)
2004-10-01 14:26:15 +00:00
Denis Peplin 29e240ed5e Merge from English version 1.761.2.9 -> 1.761.2.10
Approved by:	re (hrs)
2004-10-01 10:43:46 +00:00
David Schultz eadfc8bd2f MFC src/lib/libc/gen/isnan.c,v 1.2
| Remove __isnanl() to avoid conflicting with the same function in libm.
| __isnan() and __isnanf() must remain in libc for hysterical raisins.
| On the other hand, __isnanl() must live in libm because libm uses it
| internally and can't depend on older versions of libc to provide it.
| Fortunately, we don't need __isnanl() in both libraries.

Approved by:	re (scottl)
2004-10-01 06:33:00 +00:00
Philip Paeps 089c498f6c MFC: Introduction of hw.psm.synaptics_support tunable [1] and
documentation for the synaptics support in psm(4) [2].

[1] from psm.c r1.82
[2] from psm.4 r1.44

Approved by:	re (scottl)
2004-10-01 06:26:51 +00:00
Warner Losh dad92355de MFC: 1.46 Better handling of non-existent devices.
Approved by: re@ (scottl)
2004-10-01 06:20:23 +00:00
Warner Losh 16cc82ae62 MFC: 1.59. Fix nonexistant device support in init.
Approved by: re@ (scottl)
2004-10-01 06:08:38 +00:00
Ken Smith f0c7816e23 MFC of v1.17: Raise IPI_RETRIES to a value based on some feedback from
a test patch run by people experiencing a panic.

Approved by:	re (scottl)
2004-10-01 04:04:22 +00:00
John-Mark Gurney 5a538c424e MFC: if_rlreg.h: v1.46
>  comment requirement that rx/tx descriptor counts must be equal due to
>  shared code...
>  define rx descriptor count in terms of tx
>  align defines

v1.47:
>  fix misspelling of TX...

MFC: if_re.c: v1.32
>  pass in pointer to m_head to re_encap because m_defrag could free the
>  original mbuf causing a free'd mbuf passed to bpf later and panic'ing the
>  system..  This should only effect jumbo frames.

v1.33:
>  spell RX correctly
>  don't call re_rxeof a second time when we've already done the work
>  pull common code out from if and else clauses

v1.34:
>  trim trailing white space..
>  call the re mutex by it's name..

Approved by:	re (scottl)
2004-10-01 02:33:58 +00:00
Doug Barton 40f4a63f15 MFC the BIND 9 import and chroot-by-default work up to date.
This includes:
1. More granular NO_BIND_* make knobs.
2. WITH_BIND_LIBS make knob.
3. Run in an automatically configured chroot dir by default.
4. Edit paths in man pages, and install man pages for liblwres.
5. Improve named.conf and make it work with the new structure.
6. Install the bind9 docs.
7. A few Makefile style fixes.

Approved by:	re (scottl)
2004-09-30 23:36:11 +00:00
Søren Schmidt eddb6c4dfe MFC:
Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.

Approved by: re@ (scottl)
2004-09-30 21:29:19 +00:00
Max Laier f53011f81c MFC from pfvar.h, rev. 1.9 and keydb.h, rev. 1.4
>   Protect sockaddr_union definitions with a protecting define. This allows
>   to build kernels with FAST_IPSEC and PF. This is the least disruptive
>   fix.
>
>   PR:             kern/71836
>   Reviewed by:    bms, various mailing lists

Approved by:	re (scottl)
2004-09-30 20:11:46 +00:00
Max Laier 0d0f7ad215 MFC from pfil.c, rev. 1.9:
>   Switch order for mtx_unlock and cv_signal as (condvar(9)) sez:
>
>        A thread must hold mp while calling cv_signal(), cv_broadcast(), or
>        cv_broadcastpri() even though it isn't passed as an argument.
>
>   and is right with this claim.
>
>   While here remove a "\" from the macro -> __inline conversion.
>
>   Found by:       csjp

Approved by:	re (scottl)
2004-09-30 20:08:35 +00:00
John Baldwin dc4bdce238 MFC: Fix the fdc_acpi attach function to only fall back to enumerating
drives via hints if the _FDE enumeration fails but earlier steps all
succeeded.

Approved by:	re (scottl)
2004-09-30 20:04:56 +00:00
Simon L. B. Nielsen 7bf4601022 MFC 1.259:
- Auto generate device listings for the following drivers: urio, ulpt,
  and umct.

Approved by:	re (hrs)
2004-09-30 18:38:29 +00:00
Simon L. B. Nielsen 0aed82619b MFC 1.10:
- Add a HARDWARE section which lists supported devices based on the
  Hardware Notes.
- Update some text to fit better now that this driver support
  multiple different device types.

Approved by:	re (hrs)
2004-09-30 18:37:21 +00:00
Simon L. B. Nielsen 982dd1f437 MFC 1.7:
Add a HARDWARE section which lists supported devices based on the
Hardware Notes.

Approved by:	re (hrs)
2004-09-30 18:36:33 +00:00
Simon L. B. Nielsen 58f4ac2371 MFC 1.42+1.43:
- Add amd64 for cnw.
- Add ulpt(4) and urio(4).

Approved by:	re (hrs)
2004-09-30 18:34:58 +00:00
John-Mark Gurney bd458ee118 MFC: v1.241:
add MLINKs for the mbuf.9 man page..
and v1.242:
  Sort MAN and MLINKS in dictionary order ignoring case.

Approved by:	re (hrs)
2004-09-30 18:27:13 +00:00
Jacques Vidrine ae105f029c MFC 1.429: Disallow negative coordinates and sizes in the syscons
CONS_SCRSHOT ioctl.

Approved by:	re
2004-09-30 17:49:15 +00:00
Ken Smith 7d5d9d24e2 MFC of v1.67:
Initialize the count of saved register windows to 0 in the pcb created
for the new thread.  The rest of the fields in the pcb wind up being
written to before they're read as a normal part of the pcb usage but
this field may be read upon return to userland, having it be uninitialized
garbage is bad.

Approved by:	re (scottl)
2004-09-30 17:26:51 +00:00
cvs2svn 11b1149885 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-09-30 05:25:01 +00:00
Dag-Erling Smørgrav 5aa47f29a4 MFC: unsetting an undefined variable or function is not an error.
PR:		standards/45738
Submitted by:	Matthias Andree <[email protected]>
Approved by:	re (scottl)
2004-09-30 04:41:55 +00:00
Brooks Davis 075812e1be MFC: refer to bsdlabel, not disklabel.
Approved by:	re (hrs)
2004-09-30 04:33:52 +00:00
Paul Saab d03c7f1236 MFC: Add support for the 5750/5751
Approved by:	re
2004-09-29 14:31:49 +00:00
Paul Saab 1c9205d5b1 MFC: rev 1.73 supress spurious link change events.
Approved by:	re
2004-09-29 14:29:48 +00:00
Warner Losh 2980b924b0 MFC: Merge case 8 into the resource allocation from 1.15:
>>revision 1.15
>>date: 2004/09/20 06:12:19;  author: imp;  state: Exp;  lines: +14 -4
>>das@ has a ACPI bios that lists 0x3f0-0x3f1, 0x3f2-0x3f3, 0x3f4-0x3f5
>>and 0x3f7.  fdc_isa_alloc_resource() didn't work right in this case
>>(it accessed FDOUT correctly due to an overflow of the first resource.
>>It accesed FDSTS and FDDATA incorrectly via the second resource (which
>>wound up accessing FDOUT and the tape register at 0x3f3) and badly for
>>the CTL register (at location 0x3f4).  This is a minimal fix that just
>>'eats' the first one if it covers two locations and has an offset of
>>0.  This confusion lead the floppy driver to think there'd been a disk
>>change, which uncovered a deadlock in the floppy/geom code which lead
>>to a panic.  These changes fix that by fixing the underlying resource
>>problem, but doesn't address the potential deadlock issue that might
>>still be there.
>>
>>This is a minimal fix so it can more safely be merged into 5 w/o risk
>>for known working configurations (hence the use of the ugly goto,
>>which reduces case 8 to case 6 w/o affecting cases 1-7).  A more
>>invasive fix that will handle more ACPI resource list diversity is in
>>the pipeline that should kill these issues once and for all, while
>>staying within the resources that we allocate.
>>
>>Tested/Reported by: das
>>Reviewed by: njl
>>MFC before: re->next_release_name(5.3-BETA5);

If you get floppy hangs on boot, please try after this patch and let
me know if they are solved.

Approved by: re@ (scottl)
2004-09-29 05:17:26 +00:00
Pawel Jakub Dawidek 87cbbb528b MFC: According to module(9), when command is unrecognized, the module should
return EOPNOTSUPP.

Approved by:	re (scottl)
2004-09-28 18:27:28 +00:00
Pawel Jakub Dawidek 864638b2cf MFC: Fix '-s' option for large disks and fix printing maximum file system size.
Approved by:	re (scottl)
2004-09-28 18:25:48 +00:00
Pawel Jakub Dawidek 7ca614564a MFC: There is no humanize_number(9) manual page in FreeBSD.
Approved by:	re (scottl)
2004-09-28 18:24:50 +00:00
Pawel Jakub Dawidek 45c00a9c9b MFC: Take the lastest fixes from NetBSD.
Approved by:	re (scottl)
2004-09-28 18:24:10 +00:00
Pawel Jakub Dawidek 6c4df367e9 MFC:
- Avoid race while synchronizing components. It is very hard to bump into,
  but it is possible:
  1. Read data from good component for synchronization.
  2. Write data to the same area.
  3. Write synchronization data, which are now stale.
- Decrease kern.geom.mirror.timeout to 4, so it is smaller than
  vfs.root.mountdelay by default.
- Don't skip providers with 0 sectorsize.

Approved by:	re (scottl)
2004-09-28 18:23:14 +00:00
Pawel Jakub Dawidek 3e2b1e8029 MFC: There is no need to skip providers with 0 sectorsize in taste
routine, it is now forced by GEOM.
     Actually, it can even cause some problems, because GEOM requires
     sectorsize to be greater than 0 on first access, not on provider
     creation, so we can skip valid providers by doing this check in
     taste method.

Approved by:	re (scottl)
2004-09-28 18:22:15 +00:00
Pawel Jakub Dawidek 16a37a0c80 MFC: Make kern.geom.debugflags sysctl tunable from /boot/loader.conf.
It will help to debug problems when booting.

Approved by:	re (scottl)
2004-09-28 18:16:51 +00:00
Pawel Jakub Dawidek 43b9d77d53 MFC: Teach swap1 script how to remove added swap devices on system shutdown.
Without this change, if one had a swap-on-mirror configuration, gmirror
     will rebuild mirror component(s) on boot, because they are dirty (they
     were open on shutdown).

Approved by:	re (scottl)
2004-09-28 18:16:05 +00:00
Pawel Jakub Dawidek afbc624eb4 MFC: Don't allow to specify wrong stripe size.
Approved by:	re (scottl)
2004-09-28 18:15:19 +00:00
Pawel Jakub Dawidek 81201e86ad MFC: Document '-p' flag for 'insert' command correctly.
Approved by:	re (scottl)
2004-09-28 18:14:29 +00:00
Pawel Jakub Dawidek 6ed001f09d MFC: Do not exit after printing usage, give geom(8) a chance to show
standard commands.

Approved by:	re (scottl)
2004-09-28 18:13:39 +00:00
Pawel Jakub Dawidek 3ee69ec107 MFC: - Show all commands in usage, even if those commands are not available.
- When command is not available, just say it, instead of says, that
       command is unknown. Old behaviour seems to be too confusing.

Approved by:	re (scottl)
2004-09-28 18:12:32 +00:00
Pawel Jakub Dawidek 64ed36026a MFC: We have now so many GEOM classes that it is better to just skip unknown
classes than exiting.

Approved by:	re (scottl)
2004-09-28 18:11:24 +00:00
Pawel Jakub Dawidek ee9c05f424 MFC: Fix/clean up return values checking.
Approved by:	re (scottl)
2004-09-28 18:10:20 +00:00
Pawel Jakub Dawidek 0cecbc6d45 MFC: Allow to setup gbde on providers which have '/' in their names.
Approved by:	re (scottl)
2004-09-28 18:08:32 +00:00
John Baldwin b2d4521e84 MFC: Improve the panic message for a busted MP table with conflicting
entries for the same PCI interrupt.

Approved by:	re (scottl)
2004-09-28 16:24:09 +00:00
Colin Percival afbcd7ff3c RELENG_5 != current, so call this "... for FreeBSD stable users" instead
of "... for FreeBSD current users".

Pointed out by:	Thierry Herbelot via freebsd-current
Approved by:	re (scottl)
2004-09-28 06:54:02 +00:00
Wes Peters 5a3eb174dc p invalid sector size 0 in disk probe, refusing to add such a
device to the list.  This prevents crashes on /0 errors in 'lsdev'
et al.

Submitted by:	Nicko Dehaine <[email protected]>
Reviewed by:	jhb@
Approved by:	re@
2004-09-27 07:16:47 +00:00
David Schultz 4ecfa4c49b MFC src/sys/vm/swap_pager.c,v 1.257
| Don't look for swap blocks in objects that aren't swap-backed.
| I expect that this will fix the following panic, reported by Jun:
|	swap_pager_isswapped: failed to locate all swap meta blocks

Approved by:	re (scottl)
2004-09-27 04:53:18 +00:00
Dag-Erling Smørgrav 9614790463 MFC: (1.2) document the upgrade procedure
Approved by:	re (implicitly)
2004-09-27 00:29:59 +00:00
Dag-Erling Smørgrav e32cddc5e0 MFC: (1.13) don't create rndc.key if rndc.conf exists.
Approved by:	re (implicitly)
2004-09-26 10:52:35 +00:00
Scott Long 583d94860f Use the gnome2 meta-package instead of gnome2-lite. We have enough room on
the CD for it.  Unfortunately, not all of the KDE pieces are building yet,
and even the pieces that are there now overflow the ISO image.

Approved by: re
2004-09-26 08:09:28 +00:00
Nate Lawson fda7ada791 MFC rev 1.52: Properly initialize the tz flags. This MFC leaves in the
commented out code instead of removing it.

Approved by:	re (scottl)
2004-09-26 06:39:35 +00:00
Maxim Konovalov 0b6599ed28 MFC rev. 1.65, 1.66 loader.8 and rev. 1.29 boot.common: retire
hw.pci.allow_unsupported_io_range.

Approved by:	re (scottl)
2004-09-26 06:32:03 +00:00
Warner Losh 9fcb683ee2 MFC: detach before delete_child.
Approved by: re@
2004-09-26 05:54:28 +00:00
Dag-Erling Smørgrav cf78e84cf2 MFC: BIND 9 and related bits.
Approved by:	re
2004-09-26 03:10:20 +00:00
Maxime Henrion 9d8ad05697 MFC revision 1.218:
Add support for the fxp(4) based card in ICH6 (i915) chipsets.

  Submitted by:   Mike Tancsa <[email protected]>

Approved by:	re@ (scottl)
2004-09-25 22:21:09 +00:00
Marius Strobl d409cd1ce4 MFC: mk48txx.c 1.4; mk48txxreg.h 1.2, 1.3
- Only use the desired bits in the time related registers leaving bits
  with different meaning alone.
- Fix two off-by-one errors in the handling of the day of week. This
  makes the date being stored in the same format Sun/Solaris uses.
- Check the state of the battery on mk48txx that support this in the
  attach function.
- Add a note that use of the century bit should be implemented but isn't
  required at the moment because it isn't used on sparc64.

Approved by:	re (scottl)
2004-09-25 20:53:44 +00:00
Poul-Henning Kamp ba3c188c63 MFC: Use floppy drive unit number, not floppy controller unit number
for creating /dev entries.

Approved by:	re::scottl
2004-09-25 14:39:38 +00:00
Scott Long ad45983508 Bump to BETA6
Approved by: re
2004-09-25 14:31:37 +00:00
Alan Cox a26d6cf4da MFC
Correct a long-standing error in _pmap_unwire_pte_hold() affecting
 multiprocessors.  Specifically, the error is conditioning the call to
 pmap_invalidate_page() on whether the pmap is active on the current CPU.
 This call must be unconditional.

Approved by: re (kensmith)
2004-09-25 06:35:42 +00:00
cvs2svn 7dfe289ead This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-09-25 00:42:39 +00:00
Marius Strobl bd5f3ec4b9 MFC: 1.4
Don't call uart_bus_probe() for non-matching PnP-devices.

Approved by:	re (scottl)
2004-09-24 22:50:57 +00:00
Marius Strobl 8cdda268f6 MFC: vinumext.h 1.43, vinummemory.c 1.36
Fix compilation of vinum(4) when VINUMDEBUG is not defined.

Approved by:	re (scottl)
2004-09-24 22:40:01 +00:00
Brooks Davis a5be299352 MFC: 1.208, 1.209
Fix a LOR where ifconf() used copyout while holding a mutex.  This LOR
was seen when configuring addresses on interfaces using ifconfig.  This
patch has been verified to work with over eight thousand addresses
assigned to an interface.

Approved by:	re (scottl)
LOR id:		031
2004-09-24 22:36:51 +00:00
Simon L. B. Nielsen 8eae629e32 MFC:
Auto generate device listings for the snd_ess(4) driver.

Approved by:	re (blanket)
2004-09-24 19:42:14 +00:00
Simon L. B. Nielsen 5a4d5a1efd MFC the snd_ess(4) manual page.
Approved by:	re (blanket)
2004-09-24 19:39:14 +00:00
cvs2svn 66ca21b807 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-09-24 18:42:06 +00:00
Ken Smith bb0588b613 MFC rev 1.864: Fix-ups for problems reported with how ports get packaged
for the release.

Approved by:	re (scottl)
2004-09-24 16:34:08 +00:00
Lukas Ertl 9a7db3558d Big geom_vinum MFC:
geom_vinum.c:
   MFC rev. 1.10, 1.11

geom_vinum.h:
   MFC rev. 1.3, 1.4, 1.5, 1.6

geom_vinum_drive.c:
   MFC rev. 1.10, 1.11, 1.12, 1.13, 1.14

geom_vinum_init.c:
   MFC rev. 1.3, 1.4, 1.5

geom_vinum_plex.c:
   MFC rev. 1.9, 1.10

geom_vinum_raid5.c:
   MFC rev. 1.6, 1.7

geom_vinum_raid5.h:
   MFC rev. 1.3

geom_vinum_rm.c:
   MFC rev. 1.2, 1.3, 1.4, 1.5

geom_vinum_state.c:
   MFC rev. 1.3, 1.4, 1.5

geom_vinum_subr.c:
   MFC rev. 1.7, 1.8, 1.9, 1.10

geom_vinum_var.h:
   MFC rev. 1.2, 1.3

geom_vinum_volume.c:
   MFC rev. 1.5, 1.6

Approved by:  re@ (scottl)
2004-09-24 16:23:17 +00:00
Roman Kurakin e6f37f7d0c MFC revision 1.238 to 1.239
date: 2004/09/23 16:06:27;  author: rik;  state: Exp;  lines: +7 -3
	Invalidate cache after changing pte entry.

	Discussed with: jhp and njl

Approved by:	re (scottl)
2004-09-24 15:02:33 +00:00
Peter Pentchev ff53e7433f MFC adduser.sh 1.25: only print /usr/sbin/nologin once when updating
the master.passwd file.

Approved by:	re (scottl)
2004-09-24 14:18:16 +00:00
Maxim Konovalov a2685fbbb8 MFC rev. 1.290: turn net.inet.ip.check_interface sysctl off by default.
Approved by:	re (scottl)
2004-09-24 12:20:34 +00:00
John Baldwin 180903d464 MFC: Force a redraw if all dists are selected.
Approved by:	re (kensmith)
2004-09-23 18:23:42 +00:00
Hiroki Sato a47070a438 New release notes:
SA-04:14.

Approved by:	re (implicitly)
2004-09-23 16:59:39 +00:00
Andre Oppermann 0a220c3523 MFC 1.289: Proper bounds checking when initializing the ip_protox[] array.
Approved by:	re (kensmith)
2004-09-23 16:44:21 +00:00
Andre Oppermann ab4bbc5742 MFC: Store IP source routing options in mtag instead of global variable.
Approved by:	re (kensmith)
2004-09-23 16:38:53 +00:00
Bruce A. Mah 2966b552b3 Fix a couple of minor inconsistencies in the text that discusses
branchpoints for RELENG_*.  I'm not 100% happy with my change, but
it's better than it was.

Pointed out by:	den
Approved by:	re (implicitly)
2004-09-23 15:39:50 +00:00
Denis Peplin bb99f8d5c3 Remove items that are not applicable to RELENG_5.
Noticed by:	hrs
Approved by:	re (hrs)
2004-09-23 08:20:58 +00:00
Denis Peplin 307fb30b32 Merge from HEAD
Approved by:    re (kensmith)
Obtained from:  The FreeBSD Russian Documentation Project
2004-09-23 06:12:03 +00:00
Denis Peplin 02a6768365 Update early-adopters translation to Migration Guide
Approved by:	re (kensmith)
Obtained from:	The FreeBSD Russian Documentation Project
2004-09-23 06:02:09 +00:00
Andre Oppermann 091f761e09 MFC: Make PFIL_HOOKS a permanent part of the kernel and remove the associated
kernel compile option.

Approved by:	re (scottl)
2004-09-22 20:41:31 +00:00
Andre Oppermann 2df97dc1ef Undo incrementing __FreeBSD_version and have IPFILTER check against 503000
instead.  This works just as well because it didn't check before for this
at all.

Pointed out by:	ceri
Approved by:	re (implicit)
2004-09-22 19:51:03 +00:00
Andre Oppermann 906924251e MFC: Make PFIL_HOOKS a permanent part of the kernel and remove the associated
kernel compile option.

Approved by:	re (scottl)
2004-09-22 19:23:39 +00:00
Ruslan Ermilov 88c2867de0 MFC: Makefile.inc1,v 1.440 and gnu/usr.bin/cc/cc_tools/Makefile,v 1.80.
Ensure that .depend file in cc_tools has correct libraries and headers
(host versions, not target).

Approved by:	re (kensmith)
2004-09-22 07:11:46 +00:00
Brooks Davis 081fbeda64 MFC: Makefile:1.240 microtime.9:1.8 microuptime.9:1.6 time.9:1.13
Bring kernel time variable and access function docs up to date by
updating the list of variables and mentioning the bin(up)time functions.

Approved by:	re (kensmith)
2004-09-22 04:43:33 +00:00
Brooks Davis d7023b21b4 MFC: 1.44
Document the struct if_data members ifi_datalen, ifi_epoch, and
ifi_link_state.

Approved by:	re (kensmith)
2004-09-22 04:40:21 +00:00
Christian Brueffer 570beb56a9 MFC: rev. 1.256
Autogenerate device listings for cnw(4)

Approved by:	re (blanket)
2004-09-22 00:42:32 +00:00
Christian Brueffer ac87519da9 MFC: rev. 1.39
Add cnw(4)

Approved by:	re (blanket)
2004-09-22 00:41:00 +00:00
Christian Brueffer 5555d4ff84 MFC: rev. 1.13
Re-formulate the first sentence for better readability

Approved by:	re (blanket)
2004-09-22 00:37:08 +00:00
Bruce A. Mah ae8e67f5a9 Fix gramm-o.
Translators can probably ignore this.

Pointed out by:	Matthew George < mdg at securenetworks dot net >
Approved by:	re (implicitly)
2004-09-21 18:37:16 +00:00
Ruslan Ermilov e0b30b76dc MFC: 1.152: Get ready for 5.x becoming -STABLE soon.
Approved by:	re (hrs)
2004-09-21 15:57:06 +00:00
Tim Kientzle 2f1adf5f66 MFC 1.18: Use pax extensions for uid/gid >= 1<<18, but clip
values that must remain ustar compatible to less than this limit.
This fixes an internal assertion failure triggered by large uid/gid.
Approved by: re (Scott Long)
2004-09-21 03:38:06 +00:00
Stefan Eßer a45c9b3aa4 MFC: Add module dependency on CAM.
Approved by:	re
2004-09-20 20:57:37 +00:00
Ruslan Ermilov b920345dd3 MFC: Make sure we use the correct make(1) binary in newvers.sh.
Approved by:	re (scottl)
2004-09-20 17:39:02 +00:00
Max Laier b31d7d7b9d MFC: boot order change:
Move pf* init from SI_SUB_PSEUDO to SI_SUB_PROTO_IFATTACHDOMAIN where it
  is save to call if_attachdomain from if_attach() (as done for if_loop.c).
  We will now end up with a properly initialized if_afdata array and the nd6
  callout will no longer try to deref a NULL pointer.

  Still this is a temp workaround and the locking for if_afdata should be
  revisited at a later point.

  Requested by:                   rwatson
  Discussed with and tested by:   yongari (a while ago)
  PR:                             kern/70393

Approved by:	re (scottl)
2004-09-20 15:25:57 +00:00
Max Laier cc11402a79 MFC: pf_ioctl.c, rev. 1.15:
Break out altq_enable/disable from DIOC{START,STOP}ALTQ into seprate
   functions that can be called from enable/disable pf as well. This
   improves switching from non-altq ruleset to altq ruleset (and the other
   way 'round) by a great deal and makes pfctl act like the user would
   except it to.

   PR:		kern/71746
   Tested by:	Aurilien "beorn" Rougemont (PR submitter)

Approved by:	re (scottl)
2004-09-20 15:15:58 +00:00
Denis Peplin 6407b85f54 MFC ru_RU release documentation
Approved by: re (hrs)
2004-09-20 08:16:11 +00:00
Brooks Davis 68ae0f75ae MFC 1.3: Fix a LOR where copyout was called while holding a lock when
listing available cloners (running "ifconfig -C").

Approved by:	re (scottl)
Reported by:	rwatson
LOR id:		039
2004-09-20 07:12:21 +00:00
Brooks Davis 59667fbaec MFC revs 1.860 and 1.861:
Add 'hint.atkbd.0.flags="0x1"' back to /boot/device.hints on the
install media on i386 and amd64.  While the current default is very
useful in server environments, the ability to use USB keyboards is
vastly more important then the ability to use PS/2 keyboards the admin
forgot to plug in during the install process.

Approved by:	re (scottl)
PR:		kern/71443 kern/71568 (probably others)
2004-09-20 07:06:56 +00:00
Max Khon 433166bbb7 MFC: Use correct malloc type when freeing memory allocated by g_read_data.
PR:		71431
Submitted by:	daichi
Approved by:	re
2004-09-20 06:07:19 +00:00
Nate Lawson e2f1d06379 MFC rev 1.30: Remove an unnecessary printf and fix a spelling error.
Approved by:	re (scottl)
2004-09-20 05:52:19 +00:00
Robert Watson 014bcdcd02 Merge if_tap.c:1.47 to RELENG_5:
date: 2004/09/17 03:55:50;  author: rwatson;  state: Exp;  lines: +2 -0
  Destroy global tapmtx when the if_tap module is unloaded.

  RELENG_5 candidated.

Approved by:	re (scottl)
2004-09-20 05:49:40 +00:00
MIHIRA Sanpei Yoshiro 792ce47108 MFC umass.c 1.113:
Add support Western Digital External USB HDD
	ONSPEC entry are sorted

Approved by:	re(kensmith)
2004-09-20 05:28:08 +00:00
MIHIRA Sanpei Yoshiro 5cc0bb100b MFC usb_quirks.c 1.40
Add support Qualcomm CDMA modem

Approved by:	re(kensmith)
2004-09-20 05:18:04 +00:00
MIHIRA Sanpei Yoshiro 094b7dea2e MFC uscanner.c in 1.58
Add support Nikon CoolScan LS40 ED

Approved by:	re(kensmith)
2004-09-20 05:03:28 +00:00
MIHIRA Sanpei Yoshiro fdc7477127 MFC uplcom.c 1.21:
add support ELECOM UC-SGT(minor change version)
http://www2.elecom.co.jp/products/UC-SGT.html

Approved by:	re(kensmith)
2004-09-20 04:46:41 +00:00
Marcel Moolenaar 48b449941a MFC rev 1.104: cred_free_thread() removal.
Forgotten by: julian
Approved by: re (blanket)
2004-09-19 21:04:28 +00:00
Max Khon 0416dc070c MFC: rev 1.11
g_nop_create: Destroy correct provider in case of errors.

Approved by:	re
2004-09-19 10:38:57 +00:00
Yoshihiro Takahashi 518f8f2412 MFC: Add -fno-unit-at-a-time to CFLAGS.
Approved by:	re (scottl)
2004-09-19 05:28:13 +00:00
Christian Brueffer ae2577258c MFC: rev. 1.257
Autogenerate device listings for ed(4)

Approved by:	re (blanket)
2004-09-19 02:32:31 +00:00
Christian Brueffer cf0c52297b MFC: rev. 1.40
Add ed(4)

Approved by:	re (blanket)
2004-09-19 02:30:53 +00:00
Christian Brueffer 9804b9acaf MFC: rev. 1.37
- add a HARDWARE section based on the hardware notes
- capitalize Ethernet
- minor fixes

Approved by:	re (blanket)
2004-09-19 02:28:29 +00:00
Christian Brueffer c77ffd3815 MFC: rev. 1.17
Adaptec ANA-6944/TX is supported

Approved by:	re (blanket)
2004-09-19 02:27:24 +00:00
Matt Jacob 59ffe07149 MFC: Make module depend on cam && pci.
Approved by:	re
2004-09-19 01:07:23 +00:00
Bruce A. Mah 08499ac1bd MFC: Fix a misspelling and delete an extra word.
new.sgml	1.777 -> 1.778

Translators can probably ignore this.

Approved by:	re (hrs)
2004-09-18 19:30:24 +00:00
Scott Long a1aad6f869 MFC: Bring fdformat and fdread up to the new fd driver
Approved by: re
2004-09-18 17:40:51 +00:00
Xin LI cd6225a233 MFC revision 1.153
date: 2004/09/15 08:19:03;  author: delphij;  state: Exp;  lines: +7 -1
Clear all "active partition" bits before we set a new one.

This adds a safebelt that prevents users to mark more than
one "active" partitions, which will lead to a unbootable
machine, especially in multi-boot configurations.

Approved by:	re (scottl), mentor (murray)
2004-09-18 16:57:39 +00:00
Scott Long bc5c63e4d4 Move to BETA5
Approved by: re
2004-09-18 16:50:03 +00:00
Scott Long 21d600c925 MFC: Update fdcontrol to the new fdc driver changes.
Approved by: re
2004-09-18 16:41:29 +00:00
Bruce A. Mah 6614e43718 Track the installed name (MIGRATE5.*) for the Migration Guide on
the release media.

Approved by:	re (implicitly)
2004-09-18 07:14:53 +00:00
Bruce A. Mah 2684ee6037 Give the Migration Guide an appropriate 8.3 name (MIGRATE5.*) on
release media.

Approved by:	re (implicitly)
2004-09-18 07:13:31 +00:00
Hiroki Sato f7320def1a MFC from rev.1.777:
Reorganize the "Kernel Changes" section, including:
	- Add "Hardware Support" section and move device driver-related
	  items there.
	- Move "Multimedia Support" and "Network Interface Support" into
	  the "Hardware Support" section as sub-sections.
	- Move Netgraph-related items to "Network Protocols".

For translators: many items are moved but the contents
are not changed.

Approved by:	re (implicitly)
2004-09-18 07:03:40 +00:00
Warner Losh a74ff8b7aa MFC: Merge in phk's new floppy driver.
Approved by: re@
2004-09-18 04:57:55 +00:00
Warner Losh c03c61d1fe MFC: BIO_CMD0
Approved by: re (as part of fdc merge)
2004-09-18 04:56:06 +00:00
Alan Cox 1190cc3302 MFC
Use atomic ops in pmap_clear_ptes() and pmap_protect() to prevent the loss
 of a page modified (PG_M) bit in a race between processors.

Approved by: re (scottl)
PR: i386/61852
2004-09-18 04:27:00 +00:00
Julian Elischer 0005e2b297 Cumulative MFC of patches applied to -current to get preemption
support to a non-instantly-crashing state.
Also includes some cosmetic changes to keep the diffs to a minimum and
an experimental option (followon) in sched_4bsd. (turned off but
included to keep diffs to a mimimum)

Approved by:	re (scottl)
2004-09-18 04:11:36 +00:00
Jun Kuriyama ae0a866cea MFC: Fix a condition where the hole would be inserted in the wrong
place during a split.

     Obtained from:	NetBSD

Approved by:	re (scottl)
2004-09-18 03:57:38 +00:00
Gleb Smirnoff f38019d8e1 MFC 1.129:
Check flag do_bridge always, even if kernel was compiled without
   BRIDGE support. This makes dynamic bridge.ko working.

Approved by:	re (scottl)
2004-09-17 19:50:27 +00:00
Gleb Smirnoff c6bcdd00f4 MFC 1.180:
Do not call xl_init_locked() unconditionally when we are bringed UP. Call
   it only if we weren't UP before. In some cases xl_init causes long media
   re-negotiation, and ppp(8) fails to open PPPoE connection because it sets
   IFF_UP every time before opening PPPoE connection.

Approved by:    re (scottl)
2004-09-17 19:46:40 +00:00
Marcel Moolenaar dae045f54a MFC: switch to the 4BSD scheduler as the default scheduler.
Approved by: re (blanket)
2004-09-17 19:01:28 +00:00
Max Laier e287dce8fa MFC pf examples:
Bring in some examples (and create space for future work here):
   - Add OpenBSD example rulesets as advertised in etc/pf.conf and
     pf.conf(5)
   - Tweak the pointer to fit the FreeBSD default location share/examples/pf
   - Account for the new directory in BSD.usr.dist (no hier(7) change
     required as share/examples is an opaque item there).

  Obtained from:  OpenBSD
  Reminded by:    Thomas T. Veldhouse
  PR:             docs/71691

Approved by:	re (scottl)
2004-09-17 18:27:15 +00:00
Max Laier ba744977cd MFC pf.c, rev. 1.19:
One more round on the H/W supported checksum code: Fix NICs that can't do
  the pseudo header. We really need the TCP packet length here. This happens
  to end up in ip->ip_len in tcp_input.c, but here we should get it from the
  len function variable instead.

  Submitted by:	yongari
  Tested by:	Nicolas Linard, yongari (sparc64 + hme)

Approved by:	re (scottl)
2004-09-17 18:11:09 +00:00
John-Mark Gurney 45491ecc39 MFC: v1.82
>  unlock global lock in kqueue_scan before msleep'ing to prevent dead
>  lock..  we didn't unlock global lock earlier to prevent just having
>  to reaquire it again..

Approved by:	re (scottl)
2004-09-17 17:53:16 +00:00
Bruce A. Mah 8b080d54dd Reflect the "Early Adopters Guide" to "Migration Guide" change.
Approved by:	re (implicitly)
2004-09-17 16:28:58 +00:00
Bruce A. Mah 9272e696ca Turn the "Early Adopters Guide" into the "Migration Guide". This change
is really more of a rewrite than a set of edits, but basically the
focus is now on "how to help 4.X users switch to 5.3" rather than on
the "why users should (or should not) run 5.X".  There were also a lot
of content updates, and the "source upgrade" section now includes an
annotated version of the steps from src/UPDATING.

This is a direct commit to RELENG_5 since technically it doesn't apply
to HEAD.  Subsequent commits will (after testing) rename the rendered
output files on the release media and fix the document title in
sysinstall(8).

Many helpful comments were provided by reviewers via the doc and
current lists.

Approved by:	re (scottl)
Reviewed by:	trhodes, scottl, imp, hrs, marcus, brooks, keramida, brueffer,
		Michel TALON < talon at lpthe dot jussieu dot fr >,
		Len Zettel < zettel at acm dot org >
2004-09-17 15:47:16 +00:00
Christian S.J. Peron c098407bf3 MFC v1.58
Currently when ipfw(8) generates the micro-instructions for rules which
contain O_UID, O_GID and O_JAIL opcodes, the F_NOT or F_OR logical
operator bits get clobbered. Making it impossible to use the ``NOT'' or
``OR'' operators with uid, gid and jail based constraints.

The ipfw_insn instruction template contains a ``len'' element which
stores two pieces of information, the size of the instruction
(in 32-bit words) in the low 6 bits of "len" with the 2 remaining
bits to implement OR and NOT.

The current code clobbers the OR and NOT bits by initializing the
``len'' element to the size, rather than OR'ing the bits. This change
fixes this by changing the initialization of cmd->len to an OR operation
for the O_UID, O_GID and O_JAIL opcodes.

Approved by:	re@ (scottl)
PR:		kern/63961 (partially)
2004-09-17 14:49:08 +00:00
Gleb Smirnoff 6fcc17644d MFC 1.234:
Remove layer intermixing. Device driver should pass the frame to
   ether_input(), and do not play with bridge itself.

Approved by:	re (scottl)
2004-09-17 10:14:49 +00:00
Nate Lawson 9c55cc61b3 MFC rev 1.50: Don't change the state of the system in acpi_tz_establish().
Turning off fans on some systems generates a notify saying the zone needs
to be re-evaluated, producing an infinite loop.

Approved by:	re (scottl)
2004-09-17 04:22:02 +00:00
Nate Lawson 700a0c3e62 MFC rev 1.27: Instead of trusting _STA from power resources, cache the
first value returned and then infer the state from calls to _ON/_OFF.

Approved by:	re (scottl)
2004-09-17 04:20:31 +00:00
Maksim Yevmenkin d5f9ccf669 MFC: Add missing #include
Bump WARNS level to 2

PR:		bin/71668
Submitted by:	Dan Lukes <[email protected]>
Approved by:	re (scottl)
2004-09-17 03:45:24 +00:00
Simon L. B. Nielsen 557d539d81 MFC 1.251-1.253:
- Auto generate device listings for the ubsa(4), ubser(4), uftdi(4),
  and uplcom(4) drivers.
- Auto generate device listing for the uvisor driver.
- Auto generate device listings for the fwohci(4), hifh(4), safe(4),
  and ubsec(4) drivers.

Approved by:	re (blanket)
2004-09-16 22:48:18 +00:00
Simon L. B. Nielsen ed2d6c2907 MFC 1.8+1.9:
- Change DESCRIPTION section to a HARDWARE section.
- Sync list of supported devices with source code.
- Bump document date.

Approved by:	re (blanket)
2004-09-16 22:41:58 +00:00
Simon L. B. Nielsen 39a7ee8a8f MFC:
- Add a HARDWARE section which lists supported devices.

Approved by:	re (blanket)
2004-09-16 22:38:44 +00:00
Simon L. B. Nielsen 6f75bb7b79 MFC 1.5:
- Add a HARDWARE section which lists supported devices based on the
  FreeBSD Hardware Notes, source code and cvs comments from
  FreeBSD and NetBSD.
- Update page title and DESCRIPTION section to reflect the fact that
  this driver supports much more than Handspring Visor now.

Approved by:	re (blanket)
2004-09-16 22:23:14 +00:00
Simon L. B. Nielsen df30dc6d13 MFC 1.9:
- Move HARDWARE section to after DESCRIPTION like in the other FreeBSD
  section 4 manual pages.

Approved by:	re (blanket)
2004-09-16 22:22:03 +00:00
Simon L. B. Nielsen 98a7fa0d18 MFC:
- Move HARDWARE section to after DESCRIPTION like in the other FreeBSD
  section 4 manual pages.
- Sort device list.

Approved by:	re (blanket)
2004-09-16 22:16:30 +00:00
Simon L. B. Nielsen d5ceef605b MFC 1.3:
Change DESCRIPTION section to a HARDWARE section.

Approved by:	re (blanket)
2004-09-16 22:11:46 +00:00
Christian Brueffer 5d78bd5889 MFC: rev. 1.7, 1.8
- add a HARDWARE section
- grammar fixes
- wording improvements
- bump document date

Approved by:	re (blanket)
2004-09-16 22:09:52 +00:00
Simon L. B. Nielsen 31c480f8c5 MFC 1.15+1.28,1.30,1.31,1.34-1.36,(part of 1.38):
- Auto generate device listings for the following drivers: snd_ad1816,
  snd_cmi, snd_cs4281, snd_ds1, snd_emu10k1, snd_es137x, and snd_solo.
- Add vge(4) to the Hardware Notes.
- Add snd_csa(4) and snd_gusc(4).
- Add ubser(4).
- Auto generate device listing for the uvisor driver.
- Add fwohci, hifn, safe, sbp, and ubsec.
- note ia64 support for several drivers.

Approved by:	re (blanket)
2004-09-16 21:47:34 +00:00
Ruslan Ermilov 3673e1850d MFC: 1.1276: Fixed sound-related hints.
Approved by:	re (scottl, hrs)
2004-09-16 20:20:04 +00:00
Ruslan Ermilov ef07017573 MFC: Reflect July 2004 code changes in manpages.
Approved by:	re (scottl, hrs)
2004-09-16 20:18:15 +00:00
Christian Brueffer ddfca1f496 MFC: rev. 1.250, 1.254, 1.255
- autogenerate device listings for em(4) and gx(4)
- fix an entity
- autogenerate device listings for lnc(4), ng_ubt(4) and pcn(4)

Approved by:	re (blanket)
2004-09-16 19:37:49 +00:00
Christian Brueffer 4f616cc117 MFC: rev. 1.32, 1.33
Add em(4) and gx(4)

Approved by:	re (blanket)
2004-09-16 19:19:29 +00:00
Don Lewis 9bd3617a3b MFC sys/dev/sound/isa/sb16.c 1.88
Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()
  calls in sb_cmd2() and sb_getmixer().  The lock has already be grabbed
  before these functions are called.

PR:		71189
Submitted by:	stephane
Approved by:	re (scottl)
2004-09-16 19:02:50 +00:00
Christian Brueffer 84dfbb4d3a MFC: rev. 1.37, 1.38
- note ia64 support for several drivers
- remove drivers that work on all supported architectures
- add lnc(4), ng_ubt(4) and pcn(4)

Approved by:	re (blanket)
2004-09-16 19:02:28 +00:00
Christian Brueffer 3a4a30ca26 MFC: rev. 1.22
- remove device count
- add a HARDWARE section
- bump document date

Approved by:	re (blanket)
2004-09-16 18:42:22 +00:00
Christian Brueffer 891000d3ed MFC: rev. 1.10
- fix capitalization
- add HARDWARE section based on the hardware notes
- bump document date

Approved by:	re (blanket)
2004-09-16 18:41:41 +00:00
Andre Oppermann ef863641fd MFC 1.76: Return EINVAL when IPFIREWALL_FORWARD is not compiled into the kernel.
Approved by:	re (scottl)
2004-09-16 18:02:22 +00:00
Andre Oppermann 05f508e403 MFC 1.9: Don't prepend an already existing tag again.
Approved by:	re (scottl)
2004-09-16 17:59:35 +00:00
Andre Oppermann e685a2b8de MFC 1.20: Fix ip_input() fallback for the destination modified cases.
Approved by:	re (scottl)
2004-09-16 17:57:04 +00:00
Andre Oppermann e4caf644a8 MFC: Make 'ipfw tee' behave as intended and designed.
Approved by:	re (scottl)
2004-09-16 17:53:23 +00:00
Hiroki Sato ec00f1ce85 MFC from rev.1.5.
Approved by:	re (implicitly)
2004-09-16 17:27:32 +00:00
Hiroki Sato fe2366221b MFC from rev.1.35.
Approved by:	re (implicitly)
2004-09-16 17:23:16 +00:00
John Baldwin 6861e85ed1 MFC: Teach the stack trace code how to walk across a double fault.
Approved by:	re (scottl)
2004-09-16 17:21:46 +00:00
Mike Makonnen 4c2400db0c MFC:
----------------------------
revision 1.24
date: 2004/08/28 14:32:10;  author: mtm;  state: Exp;  lines: +2 -1
Also, match the full path to the special nologin shell.
Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.

NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
      There is a symlink, /sbin/nologin, but that's deprecated and
      only there for backwards compatibility.
=============================================================================

Approved by:	re (scottl)
2004-09-16 13:41:20 +00:00
Scott Long eb15d69f4e MFC: Program the sbus interface with the correct frequency
Approved by: re
2004-09-16 03:48:43 +00:00
Andre Oppermann 605f292ed9 Fix mismerge of previous MFC.
Found by:	brooks
Approved by:	re (implicit)
2004-09-15 18:38:32 +00:00
Andre Oppermann c29d01eeb3 MFC: Apply error and success logic consistently to the function netisr_queue()
and its users.

Approved by:	re (kensmith)
2004-09-15 15:14:19 +00:00
Andre Oppermann 088248bfcb MFC 1.229: Replace ifunit("lo0") with direct 'loif' pointer.
Approved by:	re (kensmith)
2004-09-15 15:07:09 +00:00
Andre Oppermann c5bdd4707c MFC 1.133: Change the array of char to an array of struct pollfd.
Approved by:	re (kensmith)
2004-09-15 14:56:26 +00:00
Andre Oppermann 4765a4b42a MFC 1.1265: Properly document and enable the IPFIREWALL_FORWARD option.
Approved by:	re (kensmith)
2004-09-15 14:52:31 +00:00
Bill Paul 8257b2d6bd Merge the vge(4) driver from the HEAD. Also add nge(4) and lge(4) to
GENERIC for x86.

Approved by:	re (scottl)
2004-09-14 21:22:34 +00:00
Christian Brueffer 470a3bd12b Connect cnw(4) manpage to the build
Approved by:	re (blanket)
2004-09-14 16:21:41 +00:00
Pawel Jakub Dawidek 5c7e31ecd0 Connect gmirror.8 manual page to the build.
Approved by:	re (scottl)
2004-09-14 16:11:00 +00:00
cvs2svn eb8cf9e06f This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-09-14 16:08:14 +00:00
Pawel Jakub Dawidek 9fa2abb294 Fix 'show' command for pipes and queues.
PR:		bin/70311
Submitted by:	Pawel Malachowski <[email protected]>
Approved by:	re (scottl)
2004-09-14 16:07:16 +00:00
Pawel Jakub Dawidek 9d9ed367f3 Allocate memory when dumping pipes with M_WAITOK flag.
On a system with huge number of pipes, M_NOWAIT failes almost always,
because of memory fragmentation.
My fix is different than the patch proposed by Pawel Malachowski,
because in FreeBSD 5.x we cannot sleep while holding dummynet mutex
(in 4.x there is no such lock).

PR:		kern/46557
Submitted by:	Eugene Grosbein <[email protected]>
Reviewed by:	mlaier
Approved by:	re (scottl)
2004-09-14 16:05:06 +00:00
Pawel Jakub Dawidek f491148e57 Add a tool for testing performance of storage devices.
Approved by:	re (scottl)
2004-09-14 16:02:32 +00:00
Pawel Jakub Dawidek 9b0a98356b Add regression tests for "round-robin" and "verify" modes.
Approved by:	re (scottl)
2004-09-14 15:53:51 +00:00
Pawel Jakub Dawidek db0995da74 Update manual page.
Approved by:	re (scottl)
2004-09-14 15:52:00 +00:00
Pawel Jakub Dawidek 788dc74519 Add manual page for graid3(8).
Approved by:	re (scottl)
2004-09-14 15:50:51 +00:00
Pawel Jakub Dawidek 7b86e0ed24 Add manual page for gmirror(8).
Approved by:	re (scottl)
2004-09-14 15:49:30 +00:00
Pawel Jakub Dawidek 002e4c4141 - Add warnings support.
- Fix command name printing in case of version desynch.

Approved by:	re (scottl)
2004-09-14 15:48:01 +00:00
Pawel Jakub Dawidek ff1a1f03a2 - Add support for 'round-robin' and 'verify' modes.
- Make kern.geom.raid3.debug sysctl tunable.
- Add warnings.
- Bump version number and add version history.
- Don't handle spoiling for synchronization geom.
- Skip providers with 0 sectorsize.

Approved by:	re (scottl)
2004-09-14 15:47:03 +00:00
Pawel Jakub Dawidek 95295864fd - Make kern.geom.mirror.debug and kern.geom.mirror.timeout sysctls tunable.
- Don't handle spoiling for synchronization geom.
- Skip providers with 0 sectorsize.
- Some other fixes.

Approved by:	re (scottl)
2004-09-14 15:44:55 +00:00
Pawel Jakub Dawidek 9f4f8af6e3 Improve usage a bit.
Approved by:	re (scottl)
2004-09-14 15:43:25 +00:00
Pawel Jakub Dawidek 64ccf2d9b2 Add a warning when we are not going to use whole provider's space.
Approved by:	re (scottl)
2004-09-14 15:42:23 +00:00
Pawel Jakub Dawidek dadcccfcb1 - Skip providers with 0 sectorsize.
- Dump disk number.
- Make kern.geom.stripe.debug sysctl tunable.

Approved by:	re (scottl)
2004-09-14 15:40:23 +00:00
Pawel Jakub Dawidek 86bd0bf390 Do not handle spoiling!
Approved by:	re (scottl)
2004-09-14 15:39:24 +00:00
Pawel Jakub Dawidek d9bc81284e - Skip providers with 0 sectorsize.
- Make kern.geom.label.debug sysctl tunable.

Approved by:	re (scottl)
2004-09-14 15:34:35 +00:00
Pawel Jakub Dawidek 7d1d8c5cb8 - Skip providers with 0 sectorsize.
- Make kern.geom.concat.debug sysctl tunable.

Approved by:	re (scottl)
2004-09-14 15:33:22 +00:00
Don Lewis 3a1523a3cc MFC sndstat.c 1.18
>   Convert sndstat_lock from a mutex to an sx lock.  sndstat_read()
>   holds sndstat_lock across a call to uiomove(), which is not legal
>   to do with a  mutex because of the possibility that the data transfer
>   could sleep because of a page fault.  It is not possible to just
>   unlock the mutex for the uiomove() call without introducing another
>   locking mechanism to prevent the body of sndstat_read() from being
>   re-entered.  Converting sndstat_lock to an sx lock is the least
>   complicated change.

LOR:		030
Approved by:	re (scottl)
2004-09-14 06:43:46 +00:00
Poul-Henning Kamp cde96b5955 MFC:
Fix an datatype issue which could result in key-sectors being
	overwritten if less than the full complement of keys (4) were
	configured.

Approved by:	re:scottl
2004-09-14 05:59:12 +00:00
Poul-Henning Kamp 10f3b14993 Add three spare fields to reserve room so we can MFC the in-progress
work on safe device removal at a later date without breaking binary
compatibility on the RELENG_5 branch.

Approved by:	re::scottl
2004-09-14 05:49:18 +00:00
Scott Long 4c4c887c5f Add missing semicolons.
Approved by: re (implicit)
2004-09-14 05:47:14 +00:00
Hiroki Sato a95b55520c Merge from rev.1.775.
Approved by:	re (implicitly)
2004-09-14 05:40:44 +00:00
John-Mark Gurney a03863ace2 MFC: v1.34
>   remove XXX comment now that the kernel is fixed, there isn't any obvious
>   reason to enable this as performance didn't significantly change...

Approved by:	re (kensmith)
2004-09-14 03:52:51 +00:00
John-Mark Gurney 63a988ddd7 MFC: subr_witness.c v1.179
>   make witness it's own sysctl branch instead of using _ to do this.  I have
>   left the old tunables in to give people a few days to transition their
>   loader.conf and sysctl.conf's over to the new names..

MFC: witness.4 1.6, UPDATING 1.356
>   document the recent change to debug.witness.*
>   fix spelling of debug.witness.kdb

Approved by:	re (kensmith)
2004-09-14 03:51:21 +00:00
John-Mark Gurney 499da048df MFC:
kern_event.c: v1.80, if.c: v1.205
>   don't call f_detach if the filter has alread removed the knote.. This
>   happens when a proc exits, but needs to inform the user that this has
>   happened..  This also means we can remove the check for detached from
>   proc and sig f_detach functions as this is doing in kqueue now...

kern_event.c: v1.81
>  remove giant required from kqueue_close..

Approved by:	re (kensmith, scottl)
2004-09-14 03:46:43 +00:00
Brooks Davis 30211e0e22 MFC: The disk labels generated by bsdlabel can no address more than
0xffffffff sectors.  Document this limit and avoid installing bogus
labels on disks with more sectors (by refusing to install one at all).

Approved by:	re (scottl)
2004-09-14 03:44:58 +00:00
John-Mark Gurney cc209855ae MFC: v1.230
>   revert comment from rev1.158 now that rev1.225 backed it out..

Approved by:	re (kensmith)
2004-09-14 03:42:46 +00:00
John-Mark Gurney e54a448ebf MFC: v1.34
>   add support for documented readonly option...
>   also print out the option that is unknow so that the user knows what (s)he
>   did wrong..

Approved by:	re (kensmith)
2004-09-14 03:32:21 +00:00
John-Mark Gurney e87d45ff1e MFC: v1.30
>   merge in if_rl locking because if_re was originally based upon if_rl.
>   This essentially merges revs 1.143-1.1445 of sys/pci/if_rl.c.
>   This now marks the interrupt MPSAFE along with making the mutex
>   non-recursive.

Approved by:	re (kensmith)
2004-09-14 03:30:47 +00:00
Robert Watson 7adcca8152 Merge subr_witness.c:1.180 to RELENG_5:
date: 2004/09/09 05:01:37;  author: rwatson;  state: Exp;  lines: +7 -0
  Hard code witness lock order for BPF locks.

Approved by:	re (scottl)
2004-09-14 03:01:06 +00:00
Robert Watson 44c386b4d6 Merge bpf.c:1.134-1.136, bpfdesc.h:1.28 to RELENG_5:
date: 2004/09/09 04:11:12;  author: rwatson;  state: Exp;  lines: +20 -11
  Reformulate bpf_dettachd() to acquire the BIF_LOCK() as well as
  BPFD_LOCK() when removing a descriptor from an interface descriptor
  list.  Hold both over the operation, and do a better job at
  maintaining the invariant that you can't find partially connected
  descriptors on an active interface descriptor list.

  This appears to close a race that resulted in the kernel performing
  a NULL pointer dereference when BPF sessions are detached during
  heavy network activity on SMP systems.

  RELENG_5 candidate.

  date: 2004/09/09 00:19:27;  author: rwatson;  state: Exp;  lines: +20 -35
  date: 2004/09/09 00:19:27;  author: rwatson;  state: Exp;  lines: +4 -3
  Reformulate use of linked lists in 'struct bpf_d' and 'struct bpf_if'
  to use queue(3) list macros rather than hand-crafted lists.  While
  here, move to doubly linked lists to eliminate iterating lists in
  order to remove entries.  This change simplifies and clarifies the
  list logic in the BPF descriptor code as a first step towards revising
  the locking strategy.

  RELENG_5 candidate.

  Reviewed by:    fenner

  date: 2004/09/09 00:11:50;  author: rwatson;  state: Exp;  lines: +3 -3
  Compare/set pointers using NULL not 0.

Approved by:	re (scottl)
2004-09-14 02:59:20 +00:00
Max Laier 5ac5ca6a0e The pflog format change has been MFC'ed so the note about the format change
(for 64 bit archs) belongs here as well.

Requested by:	scottl
Approved by:	re (scottl)
2004-09-14 02:45:13 +00:00
Christian Brueffer 0309e87755 MFC: rev. 1.29
nge(4) works on alpha as well

Approved by:	re (blanket)
2004-09-14 01:17:05 +00:00
Christian Brueffer eb74eca7cd MFC:
Add a manpage for the cnw(4) driver, adopted from NetBSD.

Approved by:	re (blanket)
2004-09-14 01:14:30 +00:00
cvs2svn 4d99136918 This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-09-14 01:07:20 +00:00
Wilko Bulte 46be224b52 MFC:
revision 1.19
date: 2004/09/10 05:00:27;  author: marcel;  state: Exp;  lines: +14 -62
The previous commit, roughly one and a half years ago removed the
branch prediction optimization for LINT, because the kernel was too
large. This commit now removes it altogether since it causes build
failures for GENERIC kernels and the various applicable trends are
such that one can expect that it these failure will cause more
problems than they're worth in the future. These trends include:
1. Alpha was demoted from tier 1 to tier 2 due to lack of active
   support. The number of people willing to fix build breakages
   is not likely to increase and those developers that do have the
   gumption to test MI changes on alpha are not likely to spend
   time fixing unexpected build failures first.
2. The kernel will only increase in size. Even though stripped-down
   kernels do link without problems now, compiler optimizations (like
   inlining) and new (non-optional) functionality will likely cause
   stripped-down kernels to break in the future as well.

So, with my asbestos suit on, get rid of potential problems before
they happen.

Approved by: re (scottl)
2004-09-13 21:52:04 +00:00
Wilko Bulte 9c9e80578a Note the removal of TurboLaser support from GENERIC.
Approved by: re (scottl; implicitely)
2004-09-13 21:20:13 +00:00
Wilko Bulte 75ff176185 Match reality: remove support for TurboLaser as it no longer works. Nor
is it likely it will be fixed given the big-iron nature of the machine.

Approved by:	re (scottl)
2004-09-13 21:15:05 +00:00
Tom Rhodes b71457fff5 MT5 or whatever: Set the first match ability as the default and remove the
debugging sysctl.

Approved by:	re (kensmith)
Supported by:	rwatson (in email and phone conversation)
2004-09-13 20:21:32 +00:00
Maksim Yevmenkin b614ccc836 Shame on me. I screwed up product ID for the 3COM Bluetooth PC-Card.
It's 0x0040 not 0x0400.

Approved by:	re (kensmith)
2004-09-13 16:47:00 +00:00
Max Laier 4f51bf59c2 MFC pflog rev. 1.2
Don't rely on properly setup linker.hints to figure out that pflog is now
  part of the pf module.
  While here fix a comment that was c'n'ped from rc.d/pf

  PR:             bin/71096 (partly)
  Submitted by:   Ville-Pertti Keinonen

Approved by:	re (kensmith)
2004-09-13 11:40:59 +00:00
Max Laier 1e51a43e80 MFC pflogd.c rev. 1.6:
Make pflogd(8) store pcap_sf_pkthdr instead of MD timeval contaminated
  pcap_pkthdr. This makes /var/log/pflog standart compliant on 64bit archs.

  OpenBSD has fixed this by changing the bpf timeval to 32bit in the kernel,
  so no need to report this over (again).

  PR:             bin/71096 (w/ changes)
  Submitted by:   Ville-Pertti Keinonen
  Tested by:      amd64(submitter), sparc64(yongari), i386(myself)

Approved by:	re (kensmith)
2004-09-13 11:39:09 +00:00
Maxim Konovalov a5f762227c MFC rev.1.75: recover normal behavior: return EINVAL to attempt
to add a divert rule when module is built without IPDIVERT.

Approved by:	re (kensmith)
2004-09-13 07:19:55 +00:00
Poul-Henning Kamp 4bb5e8f0f7 MFC:
For removable devices without media we set a zero mediasize but a non-zero
   sectorsize in order to avoid a lot of checks around various divisions etc.
   Enforce the sectorsize being > 0 with a KASSERT on successful open.
   Fix scsi_cd.c to return 2k sectors when no media inserted.

Approved by:	re::kensmith
2004-09-13 06:26:57 +00:00
Brooks Davis fdc5041768 MFC the addition of ifi_epoch to struct if_data. The ifi_unused
variable has been replaced with ifi_epoch (and additionally, ifi_timepad
on alpha) so no ABI change has occured.

Approved by:	re (kensmith)
2004-09-13 05:11:40 +00:00
Warner Losh 2739847920 MFC: usb_subr.c 1.70
Add comments and don't free subdevs in the failure case.

Approved by: re@
2004-09-13 03:01:56 +00:00
Warner Losh 4dcc4bdcc3 MFC: uhub.c 1.63: remove child_deleted routine because we don't need it.
Approved by: re@
2004-09-13 03:00:06 +00:00
Christian Brueffer 5d52260d42 MFC: rev. 1.4
Remove spare ")"

Approved by:	re (blanket)
2004-09-13 01:34:46 +00:00
Christian Brueffer d30d78c5bc MFC: rev. 1.4
- grammar fixes
- fix path to a source file

Approved by:	re (blanket)
2004-09-13 01:34:03 +00:00
Pawel Jakub Dawidek 41c53ad350 Fix build on !i386 archs.
Approved by:	re (scottl)
2004-09-12 19:54:10 +00:00
Bruce A. Mah 826733a10b MFC: Minor grammar and wording fixups.
new.sgml	1.769 -> 1.770

Approved by:	re (hrs)
Reminded by:	hrs
2004-09-12 16:01:41 +00:00
Christian Brueffer 97a66196ca MFC: rev. 1.14
- add a HARDWARE section based on the driver README
- capitalization fixes
- bump document date

Approved by:	re (blanket)
2004-09-12 15:10:12 +00:00
Christian Brueffer 8acd78faaf MFC: rev. 1.21
We don't need device counts anymore.  Also remove device.hints entries
for ie1, to be in line with the other manpages.

Approved by:	re (blanket)
2004-09-12 15:09:20 +00:00
Christian Brueffer a6038a202c MFC: rev. 1.31
We don't need device counts anymore

Approved by:	re (blanket)
2004-09-12 15:07:57 +00:00
Wilko Bulte 086d41ae98 Document that tga(4) will not be in GENERIC for 5.3 on Alpha. It panics
the system on boot and needs major surgery to solve this.

Requested by: scottl
Approved by: re (scottl)
2004-09-11 20:45:41 +00:00
Scott Long ed191906f2 MFC: Revert the previous round of scheduler changes as they cause instant
panics on boot.

Approved by: re (implicit)
2004-09-11 10:28:42 +00:00
Hiroki Sato e7310c68db Removal of DA_OLD_QUIRKS option should be in "Disks and Storage"
section.

Pointed out by:	Xin LI (delphij at frontfree dot net)
Approved by:	re (implicitly)
2004-09-11 08:29:33 +00:00
Hiroki Sato 6f68b7a73f Unbreak the build.
Approved by:	re (implicitly)
2004-09-11 07:50:00 +00:00
Scott Long 8a4fdb58b2 Revert a mistake in the previous commit.
Approved by: re
2004-09-11 04:28:39 +00:00
Tim J. Robbins 4e3f8d7d39 MFC rev. 1.28: Ensure that struct defid is no larger than struct fid on
LP64 platforms, fixing NFS exports of msdos filesystems on at least amd64.

PR:		71173
Approved by:	re (scottl)
2004-09-11 03:19:31 +00:00
Scott Long 041694b017 Move into BETA4
Approved by: re
2004-09-11 01:26:28 +00:00
Scott Long 8957bf0f48 MFC the fix for PR 71509. This might not be the final fix, but it's good
enough for warrant wider testing.

Submitted by: tegge, julian
Approved by: re
2004-09-11 01:09:32 +00:00
Julian Elischer 4776820aad Bring in a change from jeffr for the preemption case.
MFC: 1.122

Approved by:	re (scottl)
2004-09-11 00:22:02 +00:00
Nate Lawson af5afe2fad MFC rev 1.9: Don't enter the debugger for AML breakpoint opcodes if
ACPI_DEBUG is not defined.

Approved by:	re (scottl)
2004-09-10 22:14:08 +00:00
Nate Lawson 4ca8103d1b MFC rev 1.29: Disable links after getting the possible resources instead
of before.

Approved by:	re (scottl)
2004-09-10 22:12:40 +00:00
John-Mark Gurney 5f0e790ab2 MFC v1.52:
document that m_free returns m_next of the free'd mbuf

Approved by:	re (hrs)
2004-09-10 20:59:38 +00:00
Ken Smith 01e25adc2e MFC of v1.41. From that Log entry:
Better fix the busdma problem exposed by ATA. With the CMD 646 for
  example the maximum segment size is 64K while the boundary is set
  to 8K due to controller limitations. It is impossible to NOT cross
  the boundary for any segment size that's larger than the boundary.
  So, once we inherited the boundary from the parent tag, make sure
  to reduce the maximum segment size to the boundary if it was larger.

Work done by:	marcel
Approved by:	re (scottl) [ Sooner than normal, needed for BETA4... ]
2004-09-10 20:22:50 +00:00
Max Laier 766fd5aa5d MFC if.c, rev. 1.203:
Fix an assertion when if_down()ing a ALTQ managed interface. The lock
  should have been in place all the time the mtx_assert in the ALTQ code
  just discovered the shortcoming.

  PR:             i386/71195
  Tested by:      Bettan (PR originator), myself

Approved by:	re (scottl)
2004-09-10 19:43:47 +00:00
Max Khon 211e6e1706 MFC: Do not compile in zlib.c. Add a dependency on module instead.
Approved by:	re
2004-09-10 07:00:38 +00:00
Wilko Bulte b4d5f155fb tga(4) is sufficiently broken that bandaids won't work. Given that
it panics systems on boot remove it from GENERIC so that tga(4)
equipped systems can get installed with 5.3.

This needs documenting in the 5.3 release notes.

Discussed with:	marcel, -alpha@
Approved by:	re (scottl)
2004-09-10 06:46:32 +00:00
Gleb Smirnoff c263fb4249 MFC 1.16:
Add axe(4) to ethernet-nic-regex.

Approved by:	re (scottl)
2004-09-10 06:23:23 +00:00
Gleb Smirnoff d3efcab04e MFC 1.34:
Increase PPTP_MAX_TIMEOUT up to 3 seconds. 10 proved too much for high
   packet
   loss links, and 1 second appeared to be too small for high latency links.

Approved by:	re (scottl)
2004-09-10 06:16:34 +00:00
Tim Kientzle 38d5bbcf51 MFC 1.27: The "regular-file-plus-trailing-slash-equals-dir" convention
should be checked only after the full header is read, including any
extensions; otherwise regular files in GNU tar archives with '/' as the
100th char get treated as directories.
Approved by: re@ (Ken Smith)
2004-09-10 04:30:24 +00:00
Scott Long 69ba7f5969 MFC: Turn PREEMPTION into a kernel option. It is NOT enabled at this time.
Approved by: re
2004-09-10 00:04:18 +00:00
Scott Long 9a18838a2b MFC rev 1.33: Sync busdma code with i386.
Submitted by: marcel
Approved by: re
2004-09-09 23:45:10 +00:00
Scott Long 61baafe02c Switch to the 4BSD scheduler for RELENG_5
Approved by: re
2004-09-09 23:10:49 +00:00
Ken Smith 3e1e27e576 MFC v1.25: Backout v1.24 on HEAD which had also been MFC-ed. Removing a
hack that hardcoded setting "hw.ata.ata_dma=0" because of DMA issues
on sparc64.  A fix is being done to bus_machdep.c that makes this
unnecessary now.

Approved by:	re (scottl)
2004-09-09 23:06:55 +00:00
Scott Long 152806cc30 MFC: Fix boundary inheritance in busdma.
Approved by: re
2004-09-09 23:05:01 +00:00
Simon L. B. Nielsen 735ae3ffee MFC v. 1.24-1.25:
Auto generate device listings for the following drivers: ctau, uhci.

Approved by:	re (blanket)
2004-09-09 19:22:01 +00:00
Simon L. B. Nielsen e566188a20 MFC v. 1.245-1.247:
- Auto generate device listings for the following drivers: cp, ct,
  ctau, uhci.
- Remove listing for NCR5380/NCR53400 and UltraStor 14F/24F/3F4;
  the drivers were removed over 5 years ago.
- Note that WD7000 is supported by the wds(4) driver and move it
  to the generic SCSI section, since it was converted to CAM some time ago.
- Remove section about non-CAM drivers, since there are none left in
  the section.

Approved by:	re (blanket)
2004-09-09 19:18:06 +00:00
Simon L. B. Nielsen 41ea0fb9ee MFC v. 1.15+1.16:
- Add a HARDWARE section which lists supported devices.
- Bump document date.

Approved by:	re (blanket)
2004-09-09 19:09:53 +00:00
Simon L. B. Nielsen 231bcb4dc9 MFC v. 1.17:
Reword/reorganize a bit to make it more clear that all OHCI v1.0
compliant controllers are supported.

Approved by:	re (blanket)
2004-09-09 19:05:34 +00:00
Simon L. B. Nielsen bd2d744509 MFC v. 1.5:
Add a HARDWARE section which lists supported devices based on the
Hardware Notes.

Approved by:	re (blanket)
2004-09-09 19:03:40 +00:00
Christian Brueffer b15a933694 MFC: rev. 1.61
Fix a couple of typos in comments

Approved by:	re (kensmith)
2004-09-09 13:19:39 +00:00
Ruslan Ermilov 6049dd52f4 MFC: Tweak the shell arithmetic to work with older /bin/sh (4.x and 5.1).
Approved by:	re (kensmith)
2004-09-09 12:20:47 +00:00
Yaroslav Tykhiy acf211c2c8 MFC fixes of list_net_interfaces().
1.155:
	Fix a typo in a variable name.

1.156:
	Avoid double appearing of cloned interfaces in the output
	from list_net_interfaces() when network_interfaces=auto.

Approved by:	re (kensmith)
2004-09-09 11:46:07 +00:00
Christian Brueffer f9d23bab62 MFC: rev. 1.4
- move list of supported devices into a HARDWARE section
- fix a device name
- various language fixes
- bump document date

Approved by:	re (blanket)
2004-09-09 11:43:12 +00:00
Christian Brueffer c8e6cd3c03 MFC: rev. 1.5
Add a missing 's'

Approved by:	re (blanket)
2004-09-09 11:42:16 +00:00
Julian Elischer 345c71eefb MFC: allow libthr to use process or system scope threads.
Approved by: re (scottl)
2004-09-09 10:39:01 +00:00
Julian Elischer c09dea4baa MFC: Make debug printf less threatenning and make it only print out once.
Approved by: re (scottl)
2004-09-09 10:23:02 +00:00
Julian Elischer 631a78a6b9 MFC of:
Give libthr a choice (per system) of scope_system  or scope_thread
  scheduling.

  Revision  Changes    Path
  1.26      +37 -10    src/sys/kern/kern_thr.c

Approved by: re (scottl)
2004-09-09 10:19:52 +00:00
Julian Elischer aa8d040b6a MFC of:
Don't do IPIs on behalf of interrupt threads.
  just punt straight on through to the preemption code.
  Make a KASSSERT out of a condition that can no longer occur.

Approved by: re (scottl)
2004-09-09 10:15:53 +00:00
Julian Elischer bc53cd71f6 MFC: slight code cleanup
Approved by: re (scottl)
2004-09-09 10:10:37 +00:00
Julian Elischer 1bf70e5e30 MFC: turn on IPIs for 4bsd scheduler by default.
Approved by: re (scottl)
2004-09-09 10:08:50 +00:00
Julian Elischer 292f4f3c4a MFC of:
Refactor a bunch of scheduler code to give basically the same behaviour
  but with slightly cleaned up interfaces.
(2004-09-05 02:09:54 UTC)
  see version 1.16 of sched.h for the original commit message.

Approved by: re (scottl)
2004-09-09 10:03:21 +00:00
Julian Elischer ab9b1e86a3 MFC of:
Give the 4bsd scheduler the ability to wake up idle processors
   when there is new work to be done.
   ( 2004-09-01 06:42:02 UTC)

Approved by: re (scottl)
2004-09-09 09:56:59 +00:00
Julian Elischer 22d3d6d45b MFC of:
Give setrunqueue() and sched_add() more of a clue as to
   where they are coming from and what is expected from them.
   (  2004-09-01 02:11:28 UTC )

Approved by:    re (scottl)
2004-09-09 09:45:27 +00:00
Tim Kientzle be5742d42c MFC: Correct the handling of the dynamically-generated .h file
Approved by: re (Ken Smith)
2004-09-09 05:42:22 +00:00
Scott Long 44d74aa93c MFC rev 1.11 of iir.c. This allows it to compile with PAE by removing some
bogus code.

Approved by: re
2004-09-08 19:54:36 +00:00
Marcel Moolenaar 232d436df4 MFC rev. 1.6: The IA32 option was renamed to COMPAT_IA32.
Approved by: re (blanket)
2004-09-08 17:41:31 +00:00
Christian Brueffer 3ec1c97ea9 MFC: rev. 1.244
Autogenerate device listings for el(4), ep(4) and sn(4)

Approved by:	re (blanket)
2004-09-08 15:09:39 +00:00
Christian Brueffer 6dd135995d MFC: rev. 1.23
Add el(4), ep(4) and sn(4)

Approved by:	re (blanket)
2004-09-08 15:08:05 +00:00
Christian Brueffer 18fe52f978 MFC: rev. 1.7
- add a HARDWARE section
- some capitalization fixes
- bump document date

Approved by:	re (blanket)
2004-09-08 15:01:52 +00:00
Christian Brueffer 4cfbf8b65f MFC: rev. 1.12
ixgb(4) supports polling as well

Approved by:	re (blanket)
2004-09-08 14:59:10 +00:00
Christian Brueffer a4a90ebd9d MFC: rev. 1.4
Remove dublicate words

Approved by:	re (blanket)
2004-09-08 14:57:54 +00:00
Christian Brueffer f42281b08e MFC: rev. 1.31
- move list of supported devices into a HARDWARE section
- sort the hardware list
- misc fixes
- bump document date

Approved by:	re (blanket)
2004-09-08 14:57:01 +00:00
Christian Brueffer 479045bba7 MFC: rev. 1.17
- add a HARDWARE section
- misc fixes
- bump document date

Approved by:	re (blanket)
2004-09-08 14:56:04 +00:00
Christian Brueffer 0fb4284cf4 MFC: rev. 1.5
- add a HARDWARE section
- bump document date

Approved by:	re (blanket)
2004-09-08 14:55:20 +00:00
Christian Brueffer 95bacb62ac MFC: rev. 1.30 + 1.31
Add the SMC EZ Card 1233A-TX as supported

Approved by:	re (blanket)
2004-09-08 14:54:24 +00:00
Roman Kurakin 98b193d337 MFC: mark cx(4) and ctau(4) as non MPSAFE.
Approved by:	re (scottl)
2004-09-08 12:38:23 +00:00
Scott Long 3ba69f0503 Remove the big scary paragraph about 5.x being slow due to enabled debugging
code.  Replace it with a friendly paragraph about how the debugging code
was disabled recently.

Submitted by: Xin Li (who really is in dire need of a commit bit!)
Approved by: re
2004-09-08 04:48:21 +00:00
Tim J. Robbins 6b3505f430 MFC rev. 1.5: Correctly check the return value of kldload() to determine
whether an error occurred.

Approved by:	re (scottl)
2004-09-08 04:47:56 +00:00
Tim J. Robbins caf16af507 MFC rev. 1.33: Fixes to handling of bracket expressions in regexes compiled
with REG_ICASE.

PR:		71367
Approved by:	re (scottl)
2004-09-08 04:42:46 +00:00
Scott Long 5ce26d28c9 Remove the kernel debugging options from GENERIC.
Approved by: re
2004-09-07 23:49:58 +00:00
Robert Watson 44c39b2035 Merge nd6.c:1.45 to RELENG_5:
date: 2004/09/05 17:27:54;  author: rwatson;  state: Exp;  lines: +1 -0
  Call callout_init() on nd6_slowtimo_ch before setting it going; otherwise,
  the flags field will be improperly initialized resulting in inconsistent
  operation (sometimes with Giant, sometimes without, et al).

  RELENG_5 candidate.

Approved by:	re (scottl)
2004-09-07 23:29:26 +00:00
Robert Watson 6817c14401 Merge uipc_socket.c:1.212 to RELENG_5:
date: 2004/09/05 14:33:21;  author: rwatson;  state: Exp;  lines: +4 -4
  Expand the scope of the socket buffer locks in sopoll() to include the
  state test as well as set, or we risk a race between a socket wakeup
  and registering for select() or poll() on the socket.  This does
  increase the cost of the poll operation, but can probably be optimized
  some in the future.

  This appears to correct poll() "wedges" experienced with X11 on SMP
  systems with highly interactive applications, and might affect a plethora
  of other select() driven applications.

  RELENG_5 candidate.

  Problem reported by:    Maxim Maximov <mcsi at mcsi dot pp dot ru>
  Debugged with help of:  dwhite

Approved by:	re (scottl)
2004-09-07 23:27:07 +00:00
Brooks Davis ff92be2bfc MFC 1.15:
When an USB keyboard is plugged in to a machine with a builtin
    keyboard, cause the USB keyboard to take over from the builtin one.

Approved by:	re (scottl)
PR:		kern/71354 (partial workaround only)
2004-09-07 23:26:52 +00:00
Brooks Davis df09f37367 MFC: if.c:1.202 if.h:1.90 ifconfig.c:1.107
Use a spare byte in struct if_data to store the structure size without
increasing it.  Add code to ifconfig to use this size to find the
sockaddr_dl after the struct if_data in the routing message.  This
allows struct if_data to grow (up to 255 bytes) without breaking
ifconfig.

Approved by:	re (scottl)
2004-09-07 23:21:10 +00:00
Robert Watson 46d669b180 Merge ng_ksocket.c:1.47 to RELENG_5:
date: 2004/09/02 19:53:13;  author: rwatson;  state: Exp;  lines: +3 -3
  In FreeBSD 5.x, curthread is always defined, so we don't need to to test
  and optionally use &thread0 if it's NULL.

  Spotted by:     julian

Approved by:	re (scottl)
2004-09-07 23:09:37 +00:00
Simon L. B. Nielsen 2905d562ef MFC 1.242:
- Auto generate device listings for the ex and ie drivers.

Approved by:	re (blanket)
2004-09-07 18:44:43 +00:00
Simon L. B. Nielsen b620ee0a5b MFC 1.21:
- Auto generate device listings for the ex and ie drivers.

Approved by:	re (blanket)
2004-09-07 18:43:55 +00:00
Simon L. B. Nielsen 34f8a51ad0 MFC 1.9:
Make sure ampersand is encoded as &amp; since jade seems to be confused
when it is encoded as &#38; inside an entity.

Approved by:	re (blanket)
2004-09-07 18:39:24 +00:00
Simon L. B. Nielsen 3e0b157d74 MFC 1.19+1.20:
- Properly capitalize Ethernet.
- Add a HARDWARE section which lists supported devices.
- Add a standard 2 clause BSD license.

Approved by:	re (blanket)
2004-09-07 18:36:50 +00:00
Simon L. B. Nielsen fef2e1cab2 MFC 1.20:
- Add a HARDWARE section which lists supported devices.

Approved by:	re (blanket)
2004-09-07 18:34:45 +00:00
Christian Brueffer 633a11001d MT5: rev. 1.231
Document a couple of build knobs

PR:             misc/71032 (partly)
Submitted by:   Divacky Roman <[email protected]>
Reviewed by:    ru
Approved by:	re (scottl)
2004-09-07 16:20:26 +00:00
Scott Long 72fc3a09fa Turn off malloc debugging for RELENG_5. This is intended to be off for the
remainder of the RELENG_5/5-STABLE lifespan.  It remains on in HEAD/6-CURRENT.

Approved by: re
2004-09-07 15:38:34 +00:00
Yaroslav Tykhiy a18b42013c MT5: Add an if_start handler to the SLIP driver so that
it is working again and doesn't panic the system.

Approved by:	re (scottl)
2004-09-07 09:48:27 +00:00
Peter Pentchev 414966098b MFC sockstat.c rev. 1.10 and sockstat.1 rev. 1.19:
Do not display bogus entries for sockets in the TIME_WAIT or similar
  states that no longer have a corresponding file descriptor - until now,
  sockstat would mostly randomly match null kern.file.*.xf_data fields
  with the first mostly-closed socket.

Approved by:	re (rwatson)
2004-09-07 07:53:38 +00:00
Maxim Konovalov 9e70475186 MFC rev. 1.56: restore a historical ipfw1 logamount behaviour: rules
with 'log' keyword but without 'logamount' limit the amount of their
log messages by net.inet.ip.fw.verbose_limit sysctl value.

Approved by:	re (scottl)
2004-09-07 06:37:09 +00:00
Christian Brueffer cbe6275995 Forced commit to not that the last message was supposed to be:
MT5: rev. 1.20 and 1.22

Add re, sis and snc

Approved by:	re (blanket)
2004-09-07 00:54:52 +00:00
Christian Brueffer 0cdc5f02b1 MT5: rev. 1.243
Autogenerate device listings for re, sis and snc

Approved by:	re (blanket)
2004-09-07 00:51:38 +00:00
Christian Brueffer f97eaf9988 Add snc, re and sis
Approved by:	re (blanket)
2004-09-07 00:48:28 +00:00
Christian Brueffer c4f959448c MT5: rev. 1.17
- move list of supported devices into a HARDWARE section
- mention which chip the devices use (where known)
- bump document date

Approved by:	re (blanket)
2004-09-07 00:45:13 +00:00
Christian Brueffer ee72ccd524 MT5: rev. 1.8
- move list of supported devices into a HARDWARE section
- fix spacing in the Corega entry
- bump document date

Approved by:	re (blanket)
2004-09-07 00:44:10 +00:00
Christian Brueffer 26d96cec4a MT5: rev. 1.2 - 1.4
- replace the ERRORS section with a DIAGNOSTICS section
- move list of supported adapters into a HARDWARE section
- sort the device list
- some minor fixes

Approved by:	re (blanket)
2004-09-07 00:41:50 +00:00
Christian Brueffer 7e514ae93d MT5: rev. 1.14
Properly capitalize Gigabit Ethernet

Approved by:	re (blanket)
2004-09-07 00:33:31 +00:00
Thomas Quinot 75d6e45ca3 MFC to RELENG_5 rev. 1.9:
Fix positional parameter reference to ${10}.
Fix target location for generation of fstab.

Approved by:	re (scottl)
PR:		bin/70795
2004-09-06 20:57:28 +00:00
Thomas Quinot 293edd811d MFC to RELENG_5 rev. 1.5:
Skip entries for GBDE swap devices if they are commented out in /etc/fstab.

Approved by:	re (scottl)
2004-09-06 20:55:03 +00:00
Robert Watson f200fb18f8 Merge pseudofs_vnops.c:1.46 to RELENG_5:
date: 2004/09/02 16:04:09;  author: rwatson;  state: Exp;  lines: +0 -11
  Back out pseudo_vnops.c:1.45, which was a workaround for pfind()
  returning incompletely initialized processes.  This problem was
  eliminated by kern_proc.c:1.215, which causes pfind() not to
  return processes in the PRS_NEW state.

Approved by:	re (scottl)
2004-09-06 19:38:01 +00:00
Robert Watson e80df11f01 Merge key.c:1.67 to RELENG_5:
date: 2004/09/02 20:14:03;  author: rwatson;  state: Exp;  lines: +0 -22
  The KAME IPSEC implementation at one point used its own pseudo-random
  number generator, which was re-seeded via a timeout.  Now centralized
  randomness/entropy is used, we can garbage collect the timeout and
  re-seeding code (which was largely a no-op).

  Discussed with: itojun, suz, JINMEI Tatuya < jinmei at isl dot rdc dot
  toshiba dot co dot jp >

Approved by:	re (scottl)
2004-09-06 19:36:40 +00:00
Søren Schmidt 39a323d20e Update ATA to -current level. Summary:
Fix the handling of "inflight" requests when doing reinit's.

Always pick up giant before returning from an ioctl call.

Sii_reset needs to wait up to 1 second to get slow disks with it.

Set and reset the right bit for UDMA enable/disable on the ICH* chips.

Only call dmainit() if there is a valid busmaster resource.

Workaround devices that responds with registers as *both* master & slave.

Introduce ata_udelay() that uses tsleep instead of DELAY if possible.

Properly check malloc returns.

Approved by: re@
2004-09-06 19:36:26 +00:00
Robert Watson 8c4db076ba Merge vfs_aio.c:1.175 to RELENG_5:
date: 2004/09/03 03:19:14;  author: rwatson;  state: Exp;  lines: +2 -0
  Tag AIO as requiring Giant over the network stack using
  NET_NEEDS_GIANT().

  RELENG_5 candidate.

Approved by:	re (scottl)
2004-09-06 19:32:00 +00:00
Stefan Farfeleder e505962ca3 MFC rev. 1.2, 1.3, 1.4:
date: 2004/09/03 23:26:55;  author: stefanf;  state: Exp;  lines: +1 -1
  Embarrassing typo: s/nextbyint/nearbyint/

  date: 2004/09/03 23:31:28;  author: stefanf;  state: Exp;  lines: +4 -4
  Use the keyword '_Complex' rather than the macro 'complex' since
  applications are allowed to undefine the latter.

  date: 2004/09/03 23:44:09;  author: stefanf;  state: Exp;  lines: +2 -1
  Add a workaround to recognise I/_Complex_I as complex arguments.  Although
  the GCC manual claims that the expression 1.0fi has type float _Complex,
  __builtin_types_compatible_p(float _Complex, __typeof__(1.0fi))) yields 0.

Approved by:	re (scottl)
2004-09-06 16:58:25 +00:00
Christian Brueffer 2fb71ebed1 MT5: rev. 1.239 - 1.241
Autogenerate device listings for nge, ste, ti, tl and wb

Approved by:	re (blanket)
2004-09-06 16:09:03 +00:00
Christian Brueffer 4209fafb30 MT5: rev. 1.17 - 1.19
Add nge, ste, ti, tl, ubsa, uftdi, uplcom

Approved by:	re (blanket)
2004-09-06 16:05:39 +00:00
Christian Brueffer 09e74c5391 MT5: rev. 1.5
Grammar fix

Approved by:	re (blanket)
2004-09-06 15:49:35 +00:00
Christian Brueffer cc1307ecae MT5: rev. 1.23
Properly capitalize Ethernet

Approved by:	re (blanket)
2004-09-06 15:48:51 +00:00
Christian Brueffer 6036b5df8d MT5: rev. 1.3
- change layout of the hardware list to the one used by other manpages
- grammar fixes

Approved by:	re (blanket)
2004-09-06 15:47:13 +00:00
Christian Brueffer c6d58104ab MT5: rev. 1.4
- change layout of the hardware list to the one used by other manpages
- add a missing word

Approved by:	re (blanket)
2004-09-06 15:45:05 +00:00
Christian Brueffer bde114cec5 MT5: rev. 1.8
- change layout of the hardware list to the one used by other manpages
- fix spacing of one hardware entry
- grammar fix

Approved by:	re (blanket)
2004-09-06 15:39:11 +00:00
Christian Brueffer e35509ebd2 MT5: rev. 1.17
- move list of supported adapters into a HARDWARE section
- properly capitalize (Fast) Ethernet
- bump document date

Approved by:	re (blanket)
2004-09-06 15:37:57 +00:00
Christian Brueffer 4f46c95bdd MT5: rev. 1.19
- move list of supported adapters into a HARDWARE section
- properly capitalize (Fast) Ethernet
- bump document date

Approved by:	re (blanket)
2004-09-06 15:37:15 +00:00
Christian Brueffer 1607cb9b00 MT5: rev. 1.28
- move list of supported adapters into a HARDWARE section
- list the Digital EtherWORKS adapter as supported [1]
- properly capitalize (Fast|Gigabit) Ethernet
- bump document date

Obtained from:  NetBSD [1]
Approved by:	re (blanket)
2004-09-06 15:36:23 +00:00
Christian Brueffer 091f6197ed MT5: rev. 1.16
- move list of supported adapters into a HARDWARE section
- properly capitalize (Fast) Ethernet
- bump document date

Approved by:	re (blanket)
2004-09-06 15:35:08 +00:00
Christian Brueffer 6394edbe97 MT5: rev. 1.14
- move list of supported adapters into a HARDWARE section
- properly capitalize Fast/Gigabit Ethernet
- bump document date

Approved by:	re (blanket)
2004-09-06 15:34:11 +00:00
Warner Losh 7b2ee40615 MFC: 1.157
Clear the description when detaching a driver from a node in the tree.

Approved by: re@
2004-09-06 04:29:40 +00:00
Martin Blapp ff417efc44 MFC r1.41:
Add special case for the german whois nameserver.

Approved by:	re (ken)
2004-09-06 00:21:42 +00:00
Hiroki Sato 79e75bb1aa Remove an unnecessary article.
Pointed out by:	bmah
Approved by:	re (implicitly)
2004-09-05 17:23:54 +00:00
Hiroki Sato 8edc6a6bf0 Various update for 5.3:
- Add &release.manpath.xorg;.
	- Bump &release.manpath.xfree86;.
	- Bump &release.manpath.freebsd;.
	- Fix a mail address in ($email-footer$).

Approved by:	re (implicitly)
2004-09-05 14:11:17 +00:00
Hiroki Sato 3e47c1221a Merge from rev.1.768.
Approved by:	re (implicitly)
2004-09-05 14:10:45 +00:00
Ken Smith 6cecded8c3 Forced commit to help with approvecheck debugging. Extra debugging
is turned on for cfg_local.pm.
2004-09-05 05:02:16 +00:00
Ken Smith 3889a464df Sorry - trying one last thing before I give up. :-/ 2004-09-05 04:44:20 +00:00
Ken Smith 91c32bf803 Forced commit to see if approvecheck works since I was one of the
ones it seemed to be failing for.
2004-09-05 04:36:34 +00:00
Tim J. Robbins b6579cbd62 MFC: Symlink missing lt_LT.ISO8859-4 LC_MONETARY, LC_MESSAGES and LC_NUMERIC
data files to the ISO8859-13 versions.

Approved by:	re (scottl)
2004-09-05 04:21:07 +00:00
Tim J. Robbins 17d4a0f84d MFC rev. 1.127, 1.128: Improve the robustness of MSDOSFSMNT_KICONV handling.
Approved by:	re (scottl)
2004-09-05 03:23:36 +00:00
Tim J. Robbins b6f818b6d1 MFC rev. 1.2: Fix conversion error in nostr.
Approved by:	re (scottl)
2004-09-05 01:47:33 +00:00
Christian Brueffer 4b6a0516dc MT5: rev. 1.16
aac works on ia64, twe and twa seem to work on amd64 (though not officially
supported by 3ware)

Approved by:	re (blanket)
2004-09-05 01:42:24 +00:00
MIHIRA Sanpei Yoshiro 6006529f5f MFC if_re.c 1.29, if_rlreg.h 1.45, re.4 1.7:
Add support Corega CG-LAPCIGT Gigabit Ethernet(8169S)

Approved by:	re (scott)
2004-09-04 22:32:32 +00:00
Simon L. B. Nielsen b19be55c83 MFC 1.236+1.238:
- Auto generate device listing for ath(4).
- Remove the listing for the Seagate ST01/02 and the Future Domain
  8xx/950 SCSI controllers.

Approved by:	re (blanket)
2004-09-04 19:34:26 +00:00
Simon L. B. Nielsen a091bc3d86 MFC:
- Add a HARDWARE section which lists supported devices.
- Mark up each item in the device list with .It, as per mdoc(7) and to
  make it simpler for auto generated Hardware Notes to parse the manual
  page.
- Bump document date.

Approved by:	re (blanket)
2004-09-04 19:26:08 +00:00
Dag-Erling Smørgrav c5a96d10b8 MFC: (1.16) add PCI ID for the BCM4401-B0
Approved by:	re (scottl)
2004-09-04 19:24:17 +00:00
Dag-Erling Smørgrav c7c2c2c99f MFC: (1.4) add PCI ID for the BCM4401-B0
Approved by:	re (scottl)
2004-09-04 19:23:54 +00:00
Simon L. B. Nielsen 8485cf1abd MFC 1.14:
- Auto generate device listing for ath(4).

Approved by:	re (blanket)
2004-09-04 19:21:56 +00:00
Simon L. B. Nielsen 5f413aa136 MFC 1.5-1.8:
- Support column lists, by only extracting the first column.
- s/_/./g for an entity name.
- For column lists: ignore first item when it is likely to be a header.
- Clean up and improve handling of trailing punctuation characters.
- Handle the Pa macro.
- Give a warning when ignoring unimplemented mdoc commands.
- Improve handling of trailing punctuation characters for the Xr macro.

Approved by:	re (blanket)
2004-09-04 19:15:00 +00:00
Ruslan Ermilov 2a70c9aa08 See if it also works for me. 2004-09-04 15:00:49 +00:00
David Xu b797728961 MFC: Add code to support statically linked binary and .core file of
threaded program.

Approved by: re (scottl)
2004-09-04 09:56:03 +00:00
David Xu c8572d7518 MFC: Only compile fbsd-thread.c on amd64 and i386.
Approved by: re (scottl)
2004-09-04 09:54:42 +00:00
Marcel Moolenaar 88dcd5eb01 MFC rev 1.3: return the dst argument.
Approved by: re (blanket)
2004-09-04 00:33:05 +00:00
Ken Smith 807af07c3b Another forced commit with no approval line, hoping this time it fails. 2004-09-04 00:23:10 +00:00
Marcel Moolenaar d9f18728d4 MFC rev 1.3: return the dst argument.
Approved by: re (blanket)
2004-09-04 00:17:50 +00:00
Ken Smith 3b5693d1cc Forced commit being done without an approval line to verify that the
check is failing.
2004-09-04 00:15:47 +00:00
Scott Long 08bd148c0e Update to 5.3-BETA3
Approved by: re
2004-09-03 23:23:51 +00:00
Ian Dowse ab3462326f MFC: 1.87; Add support for completing the installation of ELF
relocatable object format modules that were read in by the loader.

Approved by:	re
2004-09-03 20:06:24 +00:00
Ian Dowse 7c7515754d MFC: 1.87; fix two cases where a successful return from usbd_transfer()
would be treated as an error and cause a transfer to be freed twice.

Approved by:	re
2004-09-03 20:01:32 +00:00
Ian Dowse 53ec2be364 MFC: 1.27; Prevent vm_page_zero_idle_wakeup() from attempting to
wake up the page zeroing thread before it has been created.

Approved by:	re
2004-09-03 19:58:00 +00:00
Ian Dowse 56c038053c MFC: 1.114; fix the logic for trying each linker class in turn with
a preloaded module.

Approved by:	re
2004-09-03 19:49:25 +00:00
Ian Dowse bfba777dba MFC: add loader(8) support for preloading ELF relocatable object
format modules.

Approved by:	re
2004-09-03 19:25:40 +00:00
Ian Dowse 6d8298727f MFC: Add support for reading the ELF relocatable object format
modules that are use on the amd64 platform.

Approved by:	re
2004-09-03 18:38:47 +00:00
Ian Dowse 242bb9f6dc MFC: 1.39; add MODINFOMD_SHDR for passing section header tables
from the loader to the kernel.

Approved by:	re
2004-09-03 18:32:24 +00:00
Nate Lawson 649e5e0536 MFC rev 1.4, 1.5: Fix _FDE and _FDI probing.
Approved by:	re (scottl)
2004-09-03 16:54:41 +00:00
Alexander Kabaev f132146a87 MFC r1.76:
Reintroduce slightly modified patch from kern/69964.
  Check for LK_HAVE_EXL in both acquire invocations.

Approved by:	re (scottl)
2004-09-03 15:45:31 +00:00
John Baldwin 683a7ba55d MFC: Regenerate after fcntl() changes.
Approved by:	re (scottl)
2004-09-03 15:33:00 +00:00
John Baldwin 1f15a28a91 MFC: Fix the ABI wrappers to use kern_fcntl() rather than calling
fcntl() directly and mark related ABI syscalls as MP safe.

Approved by:	re (scottl)
2004-09-03 15:30:21 +00:00
John Baldwin 3aabf91be8 MFC: Generalize the UFS bad magic value so that it applies to both UFS1 and
UFS2.

Approved by:	re (scottl)
2004-09-03 15:19:06 +00:00
John Baldwin e2d62cc52e MFC: Further refine sleepqueue interface and consolidate duplicated code.
This also appears to fix some select/poll races by more sanely handling
TDF_SINTR.

Approved by:	re (scottl)
2004-09-03 15:14:15 +00:00
John Baldwin bffabda316 MFC: Remove some dead code.
Approved by:	re (scottl)
2004-09-03 15:06:54 +00:00
John Baldwin db0a650c5a MFC: Correct arguments to kern_sigaltstack().
Approved by:	re (scottl)
2004-09-03 15:05:49 +00:00
Ruslan Ermilov b9d08cf8b5 MFC: Fixed the doc build.
Tested by:	hrs
Approved by:	re (hrs)
2004-09-03 12:08:56 +00:00
Julian Elischer bd04aba61f fix mismerge of two MFCs 2004-09-03 10:47:49 +00:00
Julian Elischer e2689070ce MFC
remove #if 0'd  code

Approved by:	re (scottl)
2004-09-03 08:34:48 +00:00
Julian Elischer 1ee968c296 MFC:
>  Remove an unneeded argument..
>  The removed argument could trivially be derived from the remaining one.
>  That in turn should be the same as curthread, but it is possible that
>  curthread could be expensive to derive on some systems so leave it as an
>  argument.
>  Having both proc and thread as an argument just gives an opportunity for
>  them to get out sync.
>
>
>  Revision  Changes    Path
>  1.120     +1 -1      src/sys/alpha/alpha/trap.c
>  1.281     +2 -2      src/sys/amd64/amd64/trap.c
>  1.269     +2 -2      src/sys/i386/i386/trap.c
>  1.105     +1 -1      src/sys/ia64/ia64/trap.c
>  1.197     +2 -2      src/sys/kern/kern_kse.c
>  1.290     +1 -1      src/sys/kern/kern_sig.c
>  1.272     +1 -1      src/sys/kern/subr_trap.c
>  1.49      +1 -1      src/sys/powerpc/powerpc/trap.c
>  1.72      +1 -1      src/sys/sparc64/sparc64/trap.c
>  1.395     +1 -1      src/sys/sys/proc.h
2004-09-03 06:40:26 +00:00
Julian Elischer 8ae7881d15 MFC:
Remove TDP_USTATCLOCK, we no longer need it because we now always
 update tick count for userland in thread_userret. This change
 also removes a "no upcall owned" panic because fuword() schedules
 an upcall under heavily loaded, and code assumes there is no upcall
 can occur.

 Reported and Tested by: Peter Holm <[email protected]>

 Revision  Changes    Path
 1.198     +30 -55    src/sys/kern/kern_kse.c
 1.396     +0 -1      src/sys/sys/proc.h
----
 Note free bit.. as per the flags word.

 MFC after:      2 days

 Revision  Changes    Path
 1.397     +1 -0      src/sys/sys/proc.h

Approved by:	re (scottl)
2004-09-03 06:26:28 +00:00
Julian Elischer 6a3e188652 MFC:
> 1. try to use existing mailbox address in thread_update_usr_ticks.
> 2. remove '\n' in KASSERT.
>
> Revision  Changes    Path
> 1.196     +6 -4      src/sys/kern/kern_kse.c

Approved by:	re (scottl)
2004-09-03 06:18:47 +00:00
Julian Elischer 8afb903bde MFC
> Remove sched_free_thread() which was only used
> in diagnostics. It has outlived its usefulness and has started
> causing panics for people who turn on DIAGNOSTIC, in what is otherwise
> good code.
>
> MFC after:      2 days
>
> Revision  Changes    Path
> 1.119     +0 -6      src/sys/alpha/alpha/trap.c
> 1.280     +0 -6      src/sys/amd64/amd64/trap.c
> 1.7       +0 -3      src/sys/amd64/ia32/ia32_syscall.c
> 1.268     +0 -6      src/sys/i386/i386/trap.c
> 1.104     +0 -10     src/sys/ia64/ia64/trap.c
> 1.235     +0 -3      src/sys/kern/kern_fork.c
> 1.188     +0 -13     src/sys/kern/kern_prot.c
> 1.271     +0 -3      src/sys/kern/subr_trap.c
> 1.48      +0 -3      src/sys/powerpc/powerpc/trap.c
> 1.71      +0 -6      src/sys/sparc64/sparc64/trap.c
> 1.50      +0 -3      src/sys/sys/ucred.h

Approved by:	re (scottl)
2004-09-03 06:11:59 +00:00
Julian Elischer 1c3d4ccd17 MFC:
> Only test return_instead if P_SINGLE_EXIT is set, otherwise a fork()
> syscall can interrupt other thread's syscall in sleepq_catch_signals().
> Current, all callers know thread_suspend_check may suspend thread
> itself, so we need't to check return_instead for normal suspension
> flags (no P_SINGLE_EXIT set).
>
> Tested by: deischen
> Reported by: Maarten L. Hekkelman <[email protected]>
>
> Revision  Changes    Path
> 1.195     +1 -1      src/sys/kern/kern_thread.c

Approved by:	re (scottl)
2004-09-03 05:58:20 +00:00
Julian Elischer 3f77e4d948 MFC:
> Move TDF_CAN_UNBIND to thread private flags td_pflags, this eliminates
> need of sched_lock in some places. Also in thread_userret, remove
> spare thread allocation code, it is already done in thread_user_enter.
>    Reviewed by: julian
>      Revision  Changes    Path
> 1.195     +4 -19     src/sys/kern/kern_kse.c
> 1.394     +3 -4      src/sys/sys/proc.h
>
Approved by:	re (scottl)
2004-09-03 05:55:06 +00:00
Julian Elischer 2373981121 MFC 1.50 Use some macros to reduce diff to upcoming commits
Approved by:	re (scottl)
2004-09-03 05:49:05 +00:00
Robert Watson 8f204636b9 Merge UPDATING:1.351 to RELENG_5:
date: 2004/08/28 17:08:30;  author: rwatson;  state: Exp;  lines: +13 -0
  Add an updating entry for the recent change in network stack locking
  default for debug.mpsafenet, pointing at the recent announcement and
  things to try if instability is experienced.

Approved by:	re (scottl)
2004-09-03 03:17:14 +00:00
Robert Watson bbee142b17 Merge sys/netgraph/ng_tty.c:1.30, sys/netinet6/ipsec.c:1.37,
sys/netipx/ipx.c:1.27 to RELENG_5:

  Mark Netgraph TTY, KAME IPSEC, and IPX/SPX as requiring Giant for correct
  operation using NET_NEEDS_GIANT().  This will result in a boot-time
  restoration of Giant-enabled network operation, or run-time warning on
  dynamic load (applicable only to the Netgraph component).  Additional
  components will likely need to be marked with this in the future.

Approved by:	re (scottl, kensmith)
2004-09-03 03:12:58 +00:00
Robert Watson 226a384ac3 Merge sys/conf/options:1.478, sys/net/netisr.c:1.12, and
sys/sys/kernel.h:1.118 to RELENG_5:

  Change the default disposition of debug.mpsafenet from 0 to 1, which
  will cause the network stack to operate without the Giant lock by
  default.  This change has the potential to improve performance by
  increasing parallelism and decreasing latency in network processing.

  Due to the potential exposure of existing or new bugs, the following
  compatibility functionality is maintained:

  - It is still possible to disable Giant-free operation by setting
    debug.mpsafenet to 0 in loader.conf.

  - Add "options NET_WITH_GIANT", which will restore the default value of
    debug.mpsafenet to 0, and is intended for use on systems compiled with
    known unsafe components, or where a more conservative configuration is
    desired.

  - Add a new declaration, NET_NEEDS_GIANT("componentname"), which permits
    kernel components to declare dependence on Giant over the network
    stack.  If the declaration is made by a preloaded module or a compiled
    in component, the disposition of debug.mpsafenet will be set to 0 and
    a warning concerning performance degraded operation printed to the
    console.  If it is declared by a loadable kernel module after boot, a
    warning is displayed but the disposition cannot be changed.  This is
    implemented by defining a new SYSINIT() value, SI_SUB_SETTINGS, which
    is intended for the processing of configuration choices after tunables
    are read in and the console is available to generate errors, but
    before much else gets going.

  This compatibility behavior will go away when we've finished the last
  of the locking work and are confident that operation is correct.

Approved by:	re (scottl, kensmith)
2004-09-03 03:09:55 +00:00
Robert Watson 0ffe4a33d8 Merge raw_ip6.c:1.46 to RELENG_5:
date: 2004/09/02 20:18:02;  author: rwatson;  state: Exp;  lines: +1 -1
  Unlock rather than lock the ripcbinfo lock at the end of rip6_input().

  RELENG_5 candidate.

  Foot provided by:       Patrick Guelat <pg at imp dot ch>

Approved by:	re (scottl) (accelerated schedule for BETA3)
2004-09-02 21:18:09 +00:00
Robert Watson f15b0466fa Merge if_pcn.c:1.60, if_sf.c:1.73, if_ti.c:1.97, if_tl.c:1.94,
if_wb.c:1.74 to RELENG_5:

  Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until they
  are either locked down or demonstrated MPSAFE.

Approved by:	re (scottl)
2004-09-02 20:57:40 +00:00
Colin Percival 05ba583756 MFC rev. 1.129. (Attempt #2 to fix this problem without breaking
anything else.)

When creating a new md, g_waitidle() to make sure the /dev entry gets
created before mdconfig(8) returns, *but only if it's not a preloaded
md*.

Approved by:	re (kensmith)
2004-09-02 20:08:41 +00:00
Marcel Moolenaar c4a4217ea1 MFC rev 1.67: remove asr(4),
rev 1.69: add aac(4) and aacp(4).

Approved by: re (blanket)
2004-09-02 19:01:48 +00:00
Robert Watson 0bb5c1d3fb Merge ng_socket.c:1.54 to RELENG_5:
date: 2004/08/30 14:41:25;  author: rwatson;  state: Exp;  lines: +2 -0
  Acquire Giant arounds calls into the linker from Netgraph sockets.
  We now no longer hold Giant in send(), so it isn't inheritted by the
  linker, which calls into VFS.

  Reported by:    glebius
  Discussed with: glebius, bz

Approved by:	re (kensmith)
2004-09-02 15:41:44 +00:00
Justin T. Gibbs e2867b05ae MFC: Correct a spelling error in a comment.
Approved by: re
2004-09-02 15:36:04 +00:00
Justin T. Gibbs 9c077ee25d MFC: Correct polarity of logic to avoid unecessary bus resets
during timeout recovery.

Approved by: re
2004-09-02 15:33:15 +00:00
Justin T. Gibbs a96ee3d394 MFC: Remove stale EISA constants from initial port from the aic7xxx driver
Approved by: re
2004-09-02 15:32:05 +00:00
Justin T. Gibbs 951d35d8bb MFC: Set AHD_BUSFREEREV_BUG in the bugs, not features, field of our softc.
Approved by: re
2004-09-02 15:31:21 +00:00
Justin T. Gibbs 692bfb5b28 MFC: Correct argument order in PCI config space operations used to handle
PCI error interrupts.

Approved by: re
2004-09-02 15:29:39 +00:00
Justin T. Gibbs 07261a9cf0 MFC: Improve sync error recovery (revs 1.80 and 1.81).
Approved by: re
2004-09-02 15:24:38 +00:00
Bruce A. Mah 9ad35d0cf5 Update the version number in the release documentation to reflect the
current pre-5.3 state of this branch and change the upload location
for relnotesNG snapshots.

Approved by:	re (hrs)
2004-09-02 14:51:18 +00:00
Christian S.J. Peron 10f1868849 MFC net/route.c v1.107
When a prison is given the ability to create raw sockets (when the
security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged
access to jails is given out, it is possible for prison root to manipulate
various network parameters which effect the host environment. This commit
plugs a number of security holes associated with the use of raw sockets
and prisons.

This commit makes the following changes:

- Add a comment to rtioctl warning developers that if they add
  any ioctl commands, they should use super-user checks where necessary,
  as it is possible for PRISON root to make it this far in execution.
- Add super-user checks for the execution of the SIOCGETVIFCNT
  and SIOCGETSGCNT IP multicast ioctl commands.
- Add a super-user check to rip_ctloutput(). If the calling cred
  is PRISON root, make sure the socket option name is IP_HDRINCL,
  otherwise deny the request.

Although this patch corrects a number of security problems associated
with raw sockets and prisons, the warning in jail(8) should still
apply, and by default we should keep the default value of
security.jail.allow_raw_sockets MIB to 0 (or disabled) until
we are certain that we have tracked down all the problems.

Looking forward, we will probably want to eliminate the
references to curthread.

Approved by:	re (kensmith)
2004-09-02 14:49:34 +00:00
Christian S.J. Peron 518a9fdb22 MFC netinet/ip_mroute.c v.1.107
MFC netinet/raw_ip.c v1.143

When a prison is given the ability to create raw sockets (when the
security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged
access to jails is given out, it is possible for prison root to manipulate
various network parameters which effect the host environment. This commit
plugs a number of security holes associated with the use of raw sockets
and prisons.

This commit makes the following changes:

- Add a comment to rtioctl warning developers that if they add
  any ioctl commands, they should use super-user checks where necessary,
  as it is possible for PRISON root to make it this far in execution.
- Add super-user checks for the execution of the SIOCGETVIFCNT
  and SIOCGETSGCNT IP multicast ioctl commands.
- Add a super-user check to rip_ctloutput(). If the calling cred
  is PRISON root, make sure the socket option name is IP_HDRINCL,
  otherwise deny the request.

Although this patch corrects a number of security problems associated
with raw sockets and prisons, the warning in jail(8) should still
apply, and by default we should keep the default value of
security.jail.allow_raw_sockets MIB to 0 (or disabled) until
we are certain that we have tracked down all the problems.

Looking forward, we will probably want to eliminate the
references to curthread.

Approved by:	re (kensmith)
2004-09-02 14:47:37 +00:00
Jacques Vidrine 995c28950b MFC infback.c 1.2, inflate.c 1.5: Correct a denial-of-service
vulnerability in zlib.

Approved by:	re (scottl)
2004-09-02 14:34:28 +00:00
Giorgos Keramidas 2542e8ec5a Minor wordsmithing of the fixit media login message.
Approved by:	re
2004-09-02 13:45:24 +00:00
Marcel Moolenaar e3d998abca MFC rev 1.9 & 1.10:
Do not match TGA2 adapters. They are not compatible with TGA adapters,
nor are they 3D accelarators as the description would like us to
believe. Since the TGA2 adapter has a VGA mode (unlike the TGA adapter),
one can use the VGA driver instead.

Remove redundant _FBSDID.

Approved by: re (scottl)
2004-09-02 06:14:42 +00:00
Marcel Moolenaar f8ca9a36b7 MFC rev 1.35:
In alpha_pci_alloc_resource(), when allocating a memory resource,
do not set the virtual address to the bus address when the bus
doesn't have either of the PCI_RF_DENSE or PCI_RF_BWX flags set.
The TGA driver uses the virtual address to access the registers,
which on some machines can cause a memory management fault.  Map
the bus address as K0SEG virtual memory instead. Note that with
some hardware combinations involving the TGA2 adapter this change
merely results that the memory management fault is replaced by a
machine check.

Approved by: re (scottl)
2004-09-02 06:12:19 +00:00
Tim Kientzle 09b4ca36cb MFC lib/version-etc.c 1.4: correctly clean up va_list variable
Approved by: re (Ken Smith)
2004-09-02 04:32:26 +00:00
Tim Kientzle 18206eb7c1 MFC: Recognize and ignore pax 'x' and 'g' extension entries.
In particular, don't create "PaxHeader" dirs when extracting archives
created by newer tar and pax implementations.

Approved by: re (Ken Smith)
2004-09-02 04:18:17 +00:00
Tim Kientzle 0cd77e3704 MFC: support -O with -t, where it means "send list to stderr", as in gtar
Approved by: re (Ken Smith)
2004-09-02 04:09:46 +00:00
Tim Kientzle b44abde8b0 MFC write.c 1.34: Fix -T/-I to correctly use updated -C machinery.
Approved by: re (Ken Smith)
2004-09-02 04:06:00 +00:00
Tim Kientzle 3f59b86286 MFC archive_read_extract.c 1.35:
Cache uid-from-uname and gid-from-gname lookups during extraction
Approved by: re (Ken Smith)
2004-09-02 04:00:12 +00:00
Robert Watson 18a7add041 Merge uipc_usrreq.c:1.140 to RELENG_5:
date: 2004/08/25 21:24:36;  author: rwatson;  state: Exp;  lines: +15 -8
  Don't hold the UNIX domain socket subsystem lock over the body of the
  UNIX domain socket garbage collection implementation, as that risks
  holding the mutex over potentially sleeping operations (as well as
  introducing some nasty lock order issues, etc).  unp_gc() will hold
  the lock long enough to do necessary deferal checks and set that it's
  running, but then release it until it needs to reset the gc state.

  Discussed with: alfred

Approved by:	re (kensmith)
2004-09-02 03:21:39 +00:00
Ken Smith 6acac06358 MFC of the X server configuration removal from sysinstall. Versions
being MFC-ed:

	config.c	V1.226
	dispatch.c	V1.47
	install.c	V1.359
	menus.c		V1.400
	sysinstall.8	V1.65
	sysinstall.h	V1.262

Discussed on:	freebsd-current@
Approved by:	re (scottl)
2004-09-02 01:55:00 +00:00
Christian S.J. Peron dd894fd77c MFC v1.243:
Currently, if the secure level is low enough, system flags can
be manipulated by prison root. In 4.x prison root can not manipulate
system flags, regardless of the security level. This behavior
should remain consistent to avoid any surprises which could lead
to security problems for system administrators which give out
privileged access to jails.

This commit changes suser_cred's flag argument from SUSER_ALLOWJAIL
to 0. This will prevent prison root from being able to manipulate
system flags on files.

Approved by:	re (kensmith)
2004-09-02 01:12:20 +00:00
Ken Smith 50c5fbddf2 MFC v1.11: Protect command flags set in the rc.conf files in case they're
more than one word, adding some quotes.

Reviewed by:	mtm
Approved by:	re (scottl)
2004-09-01 16:31:43 +00:00
Peter Pentchev 5dcb7e5fa5 MFC mpool.3 rev. 1.13: remove the misleading documentatin of the unused
'key' argument to mpool_open(3).

Approved by:	re (kensmith)
MFC after:	3 days
2004-08-31 07:04:41 +00:00
Poul-Henning Kamp c1ad05d25f MFC:
Introduce g_alloc_bio() as a waiting variant of g_new_bio().

	Use in places where we can sleep and where we previously
	failed to check for a NULL pointer.

Approved by:	re(ken)
2004-08-31 06:14:03 +00:00
Nate Lawson 15c54a5c94 MFC: Rework sysresource allocation to merge all resources presented by
sysresource objects before allocating.  This includes adding a
bus_get_resource_list() method to all archs as well.  Includes:

    Revision  Changes    Path
    1.189     +82 -7     src/sys/dev/acpica/acpi.c
    1.31      +59 -115   src/sys/dev/acpica/acpi_resource.c
    1.81      +0 -2      src/sys/dev/acpica/acpivar.h

Approved by:	re (scottl)
2004-08-31 05:26:37 +00:00
Dag-Erling Smørgrav 994dea634c MFC: don't forget to va_end() after va_copy().
Approved by:	re (kensmith)
2004-08-31 05:20:43 +00:00
Dag-Erling Smørgrav 47d4a517de MFC: (1.73) the check for r_flag was accidentally removed in 1.72.
Approved by:	re (kensmith)
2004-08-31 05:18:33 +00:00
Tim Kientzle 98e9f47def MFC:
archive_string_sprintf.c 1.5: don't reuse va_list variable
   archive_read_extract.c 1.34: don't change permissions on existing dirs
Approved by: re@ (Ken Smith)
2004-08-31 05:10:36 +00:00
Tim Kientzle 5a238fce1c MFC:
1.53: Enable already-implemented -I option
  1.54: Permit -P as a no-op when used with -t
Approved by: re@ (Ken Smith)
2004-08-31 05:04:17 +00:00
Tom Rhodes 263b16ce45 Catch up with CURRENT which documents the new features in mac_bsdextended(4).
Approved by:	re (kensmith)
2004-08-31 04:51:35 +00:00
Tom Rhodes 756b5e9447 MT5: 1.20 Allow mac_bsdextended(4) to log policy violations via
syslog(3)'s AUTHPRIV facility.  Default is disabled but this can
be altered with the mac_bsdextended_logging sysctl.

Approved by:	re (kensmith)
2004-08-31 04:50:35 +00:00
Tom Rhodes 40a8901f07 MT5: 1.19 The ability to match first rule in place of all rules.
Add the mac_bsdextended_firstmatch_enabled sysctl to permit the
enable/disable of this feature.  Default is disabled.

Approved by:	re (kensmith)
2004-08-31 04:48:04 +00:00
Tom Rhodes a1827b1cd5 Catch hfa.4 and rc.4 manual pages up to the ones in CURRENT.
Approved by:	re (kensmith)
2004-08-31 04:37:31 +00:00
Christian Brueffer 937a276639 MT5: rev. 1.230 - 1.235
Autogenerate device listings for the following drivers:

ixgb, sf, sk, lge, vx, axe, rue, cue, kue

Approved by: re (blanket)
2004-08-30 23:49:53 +00:00
Christian Brueffer 5c1ab3ca52 MT5: rev. 1.7 - 1.9, 1.11 - 1.13
Add ixgb, sf, sk, lge, vx, axe, rue, cue, kue
Remove isp and mpt (work on all supported platforms)

Approved by: re (blanket)
2004-08-30 23:39:17 +00:00
Christian Brueffer fd57ea57e3 MT5: rev. 1.27
- use .Nm
- fix some grammar and spelling mistakes

Approved by:	re (blanket)
2004-08-30 23:27:04 +00:00
Christian Brueffer a1ba67e437 MT5: rev. 1.20
- move the list of supported adapters into a HARDWARE section
- sort the list of adapters
- add the 3Com 3c460 HomeConnect Ethernet USB Adapter [1]
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date

Obtained from:  NetBSD [1]
Approved by:	re (blanket)
2004-08-30 23:25:41 +00:00
Christian Brueffer 96c0da5e7f MT5: rev. 1.19
- move the list of supported adapters into a HARDWARE section
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date

Approved by:	re (blanket)
2004-08-30 23:24:14 +00:00
Christian Brueffer 0fbc30b1be MT5: rev. 1.8
- move list of supported adapters into a HARDWARE section
- fix capitalization of a "to"
- bump document date

Approved by:	re (blanket)
2004-08-30 23:23:15 +00:00
Christian Brueffer 0664539edf MT5: rev. 1.7
- put the list of supported adapters into a HARDWARE section
- make the Buffalo entry look better
- properly capitalize Ethernet and Fast Ethernet
- bump document date

Approved by:	re (blanket)
2004-08-30 23:22:12 +00:00
Christian Brueffer 2f77e00d8b MT5: rev. 1.19
- move the list of supported devices into a HARDWARE section
- bump document date

Approved by:	re (blanket)
2004-08-30 23:20:28 +00:00
Christian Brueffer 3ec024f402 MT5: rev. 1.8 + 1.9
1.8:
- move device listing and hardware notes into a HARDWARE section
- properly capitalize Gigabit Ethernet
- bump document date

1.9:
Move a paragraph from the HARDWARE section back into the
DESCRIPTION section.  Also adapt it to make it fit in better.

Approved by:	re (blanket)
2004-08-30 23:18:53 +00:00
Christian Brueffer aa0d3a68cc MT5: rev. 1.23
- move the list of supported adapters to a HARDWARE section
- correct entry for the Belkin card
- properly capitalize Gigabit Ethernet
- wordsmithing on a sentence
- bump document date

Approved by:	re (blanket)
2004-08-30 23:15:24 +00:00
Christian Brueffer 173d5d7457 MT5: rev. 1.18 + 1.19
- move list of supported adapters into a HARDWARE section
- correctly capitalize Fast Ethernet
- correct two typos
- correct the link to the AIC-6915 programmer's manual
- bump document date

Approved by:	re (blanket)
2004-08-30 23:12:10 +00:00
Christian Brueffer a4f5df9443 MT5: rev. 1.3 + 1.4
Add a HARDWARE section and bump the document date

Approved by:	re (blanket)
2004-08-30 23:09:05 +00:00
Brooks Davis 82219f6dbb MFC 1.200:
When detaching an interface, don't leave an obsolete pointer to the
  soon to be deleted struct ifnet around.

PR:		kern/52260
Approved by:	re (scottl)
2004-08-30 22:15:07 +00:00
Robert Watson 8f57ee5f80 Merge nfs_serv.c:1.148 to RELENG_5:
date: 2004/08/25 16:52:59;  author: rwatson;  state: Exp;  lines: +1 -1
  Convert a mtx_lock(&Giant) to a mtx_unlock(&Giant) in nfsrv_link() to
  prevent leakage of Giant.  With INVARIANTS, this results in an
  assertion failure following execution of the RPC.  Without INVARIANTS,
  it could result in problems if the NFS server is killed causing nfsd
  to return to user space holding Giant.

  Feet provided by:       brueffer

Approved by:	re (scottl)
2004-08-30 22:02:57 +00:00
Robert Watson 58f73d5a80 Merge nfs_socket.c:1.115 to RELENG_5:
date: 2004/08/25 01:23:38;  author: rwatson;  state: Exp;  lines: +2 -4
  In nfs_timer(), pass curthread rather than &thread0 into the protocol
  send routine.  In IPv6 UDP, the thread will be passed to suser(), which
  asserts that if a thread is used for a super user check, it be
  curthread.  Many of these protocol entry points probably need to
  accept credentials instead of threads.

  MT5 candidate.

  Noticed/tested by:      kuriyama

Approved by:	re (scottl)
2004-08-30 21:58:31 +00:00
Wilko Bulte 1c3f901675 MFC:
- Now that I discovered that 164SX SRM recognises Intel 8255x NICs and allows
  them to be net booted lets document that fact.
- Note that Adaptec 3940UW won't be recognised by the 164sx SRM
- Warn that 164SX is a picky customer with regards to DIMMs.

Approved by: re (kensmith)
2004-08-30 19:09:58 +00:00
Robert Watson 438b1408f1 Merge kern_socket.c:1.211 to RELENG_5:
date: 2004/08/24 05:28:18;  author: rwatson;  state: Exp;  lines: +16 -35
  Conditional acquisition of socket buffer mutexes when testing socket
  buffers with kqueue filters is no longer required: the kqueue framework
  will guarantee that the mutex is held on entering the filter, either
  due to a call from the socket code already holding the mutex, or by
  explicitly acquiring it.  This removes the last of the conditional
  socket locking.

Approved by:	re (scottl)
2004-08-30 17:54:57 +00:00
Robert Watson 44651eda08 Merge udp_usrreq.c:1.164 and udp_usrreq.c:1.165 to RELENG_5:
revision 1.165
  date: 2004/08/22 01:32:48;  author: rwatson;  state: Exp;  lines: +3 -1
  When sliding the m_data pointer forward, update m_pktrhdr.len as well
  as m_len, or the pkthdr length will be inconsistent with the actual
  length of data in the mbuf chain.  The symptom of this occuring was
  "out of data" warnings from in_cksum_skip() on large UDP packets sent
  via the loopback interface.

  revision 1.164
  date: 2004/08/21 16:14:04;  author: rwatson;  state: Exp;  lines: +7 -4
  When prepending space onto outgoing UDP datagram payloads to hold the
  UDP/IP header, make sure that space is also allocated for the link
  layer header.  If an mbuf must be allocated to hold the UDP/IP header
  (very likely), then this will avoid an additional mbuf allocation at
  the link layer.  This trick is also used by TCP and other protocols to
  avoid extra calls to the mbuf allocator in the ethernet (and related)
  output routines.

Approved by:    re (Scottl)
2004-08-30 16:22:23 +00:00
Sheldon Hearn f06e159db1 MFC rev 1.31: regen 2004-08-30 15:51:34 +00:00
Don Lewis 06d368af39 MFC kern_module.c 1.46
>   Don't bother calling the module event handlers from module_shutdown()
>   in the shutdown_final state if the RB_NOSYNC flag is set.
>
>   The specific motivation in this case is that a system panic in an
>   interrupt context results in a call to module_shutdown(), which
>   calls g_modevent(), which calls g_malloc(..., M_WAITOK), which
>   results in a second panic.   While g_modevent() could be fixed to
>   not call malloc() for MOD_SHUTDOWN events (which it doesn't handle
>   in any case), it is probably also a good idea to entirely skip the
>   execution of the module shutdown handlers after a panic.

Approved by:	re (kensmith)
2004-08-30 08:11:03 +00:00
Don Lewis 0cb8fd6b22 MFC vfs_subr.c 1.523
>   Don't attempt to trigger the syncer thread final sync code in the
>   shutdown_pre_sync state if the RB_NOSYNC flag is set.  This is the
>   likely cause of hangs after a system panic that are keeping crash
>   dumps from being done.

Approved by:	re (kensmith)
2004-08-30 08:09:06 +00:00
Peter Pentchev 051efa7a1b MFC rtsock.c 1.116: typo fix - attacked -> attached.
Approved by:	re (kensmith)
2004-08-30 06:31:55 +00:00
Max Laier 65cdc248f8 MT5:
Document supported devices here (for lack of a better place). Users
  interested in ALTQ are likely to type in "man altq" at some point and
  maybe they will scroll down to the bottom as well.

Approved by:	re (hrs)
2004-08-30 01:34:01 +00:00
Nate Lawson 1f00bb32bc MFC rev 1.27: Remove code to initialize the lid state at boot.
Approved by:	re (kensmith)
2004-08-29 23:24:33 +00:00
Nate Lawson d9d851b84d MFC rev 1.26-1.28: When ignoring an invalid _CRS response, be sure to
set a status of success.  Also moves a printf under bootverbose.

Approved by:	re (kensmith)
2004-08-29 23:23:37 +00:00
Brian Feldman 93495516da MFC r1.24: fix totally broken memory allocation exposed by new contigmalloc.
Approved by:	re
2004-08-29 20:50:32 +00:00
Max Laier e2ab11b1af MT5:
Fix securelevel handling for tables:

  Loopback a fix from Cedric Berger:
          Fix table add/replace commands with securelevel=2.
          Reported by James J. Lippard.

and

  Use securelevel_gt instead of reading global securelevel unprotected.

Approved by:	re (kensmith)
2004-08-29 11:51:07 +00:00
Maxim Sobolev 7f6cdd5d49 MFC: CPU_DISABLE_CMPXCHG is no longer necessary with VmWare 4.x.
Approved by:	re@
2004-08-29 11:23:59 +00:00
Tim J. Robbins 0fdacc2ca0 MFC rev. 1.12: Build a dummy opt_compat.h header.
Approved by:	re (kensmith)
2004-08-29 06:15:44 +00:00
Tim J. Robbins 013564995c MFC: Better ftw() and nftw() implementations from OpenBSD.
Approved by:	re (kensmith)
2004-08-29 06:10:53 +00:00
Tim J. Robbins 5e3f006a10 MFC rev. 1.2: Re-generate from sl_SI.ISO8859-2.src rev. 1.8 (lowercase
month/weekday names).

Approved by:	re (kensmith)
2004-08-29 05:58:11 +00:00
Tim J. Robbins 37c923c53c MFC rev. 1.7: Begin month and weekday names with a lowercase letter.
PR:		65317
Approved by:	re (kensmith)
2004-08-29 05:55:58 +00:00
Ken Smith d38bc58c5a s/5.2/5.3/
Approved by:	re (scottl)
2004-08-29 05:37:20 +00:00
Doug White a60267028d MFC: Pick up changes in rev 1.8 of src/sys/dev/ic/mpt_netbsd.c from NetBSD.
Set the DMA SGL length correctly if the DMA request must be chained because
it is too large to fit in one SGL.

Approved by:	re
2004-08-29 04:56:38 +00:00
cvs2svn 6355e714bc This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-08-29 00:48:43 +00:00
Ken Smith 297c82c367 Back out the MFC done as rev 1.127.2.1. It seems to fix the problem of
mdconfig returning before the device's name appears in /dev but it seems
to cause a worse problem.  When booting the installation media (CD or
boot floppies) the system hangs after the device probes, at the point
it should be trying to mount a MD-based filesystem as its root filesystem.
Backing out this patch solves that problem, allowing it to proceed to
the sysinstall menu.

Approved by:	re (rwatson)
2004-08-28 19:54:50 +00:00
Simon L. B. Nielsen 8401c4c7a2 MFC 1.22: Fix grammar nit.
Approved by:	re (blanket)
2004-08-27 20:06:55 +00:00
Doug Rabson fb0f2d1d89 MFC: Fix variant I tls initialisation for static binaries
Approved by: re (scottl)
2004-08-27 16:57:28 +00:00
Matt Jacob 772718e237 MFC 1.103- turn of sleeping in top half due to conflicts with geom design.
Approved by:	re
2004-08-27 15:46:56 +00:00
Scott Long bdba4ec4db Start the 5.2-BETA2 phase
Approved by:	re
2004-08-27 05:32:03 +00:00
Robert Watson 83ad145904 Merge removal of in6_prefix to RELENG_5 from HEAD:
Remove in6_prefix.[ch] and the contained router renumbering capability.
  The prefix management code currently resides in nd6, leaving only the
  unused router renumbering capability in the in6_prefix files.  Removing
  it will make it easier for us to provide locking for the remainder of
  IPv6 by reducing the number of objects requiring synchronized access.

  This functionality has also been removed from NetBSD and OpenBSD.

  Submitted by:   George Neville-Neil <gnn at neville-neil.com>
  Discussed with/approved by:     suz, keiichi at kame.net, core at kame.net

  Revision  Changes    Path
  1.944     +0 -1      src/sys/conf/files
  1.48      +0 -7      src/sys/netinet6/in6.c
  1.24      +0 -3      src/sys/netinet6/in6_ifattach.c
  1.11      +0 -1199   src/sys/netinet6/in6_prefix.c (dead)
  1.6       +0 -91     src/sys/netinet6/in6_prefix.h (dead)
  1.30      +0 -1      src/sys/netinet6/in6_proto.c
  1.76      +0 -5      src/sys/netinet6/ip6_input.c
  1.44      +0 -21     src/sys/netinet6/nd6.c

Approved by:	re (scottl)
2004-08-27 04:46:27 +00:00
Alan Cox 3b566faf6a MFC the fix for cross-ipi smp deadlocks. This includes:
Revision  Path
  1.243     amd64/amd64/mp_machdep.c
  1.492     amd64/amd64/pmap.c
  1.236     i386/i386/mp_machdep.c
  1.495     i386/i386/pmap.c
  1.189     kern/subr_smp.c
  1.78      sys/smp.h

Approved by: re (scottl)
2004-08-27 02:50:58 +00:00
Nate Lawson 84720dbdcc MFC rev 1.4: Unlock the sx lock when exiting the sysctl function.
Approved by:	re (scottl)
2004-08-27 00:54:30 +00:00
Julian Elischer 8e2a6e7ee6 MFC of field alignment change and a filed size change.
5.3 seems the last change to get this in before we freeze the ABI
for a while.
 MFC'd from:
>  1.345     +7 -0      src/UPDATING
>  1.6       +1 -6      src/sys/netgraph/bluetooth/include/ng_btsocket.h
>  1.44      +1 -1      src/sys/netgraph/netgraph.h
>  1.24      +5 -3      src/sys/netgraph/ng_message.h

Submitted by:	jdp, emax
Approved by:	re (scottl)
2004-08-26 20:58:46 +00:00
Simon L. B. Nielsen 3d3f509a49 MFC 1.6+1.10:
- Auto generate device listings for the following drivers: ncr, sym,
  umodem, and uscanner.
- asr(4) is currently i386 only.

Approved by:	re (blanket)
2004-08-26 15:05:57 +00:00
Ruslan Ermilov e3cc39760c Fix a standalone module build.
Approved by:	re (scottl)
2004-08-26 14:41:43 +00:00
Dag-Erling Smørgrav b9ce284c1b MFC: (1.52) only translate control message if we're sure it's valid.
Approved by:	re (scottl)
2004-08-26 06:32:23 +00:00
Ken Smith b9842735ab MFC rev 1.60 - Remove sleep command because the underlying problem
with mdconfig should be fixed now.

Approved by:	re (scottl)
2004-08-26 02:28:22 +00:00
Alexander Kabaev f6ecb8c7ca Back out rev. 1.74. A better fix is available and will be MFCed later
once properly tested in -current.

Approved by:	re (scottl, kensmith)
2004-08-26 00:00:18 +00:00
John-Mark Gurney ca0f222e6c MFC: fix LOR in if_sk
v1.86	if_sk.c
v1.22	if_skreg.h

Approved by:	re@ (scottl)
2004-08-25 21:19:06 +00:00
John-Mark Gurney 8478e1329a MFC: adding Belkin F5D5005 gige card, and minor style change
leave the 10k typo since future man page changes should be merged too

v1.8[45] if_sk.c
v1.21	if_skreg.h
v1.22	sk.4

Approved by:	re@ (scottl)
2004-08-25 21:15:38 +00:00
John-Mark Gurney 57a0f89fec MFC: add options to adjust MPROF buffers and hash size
v1.7	MUTEX_PROFILING.9
v1.1262	NOTES
v1.476	options
v1.147	kern_mutex.c

Approved by: re@ (scottl)
2004-08-25 21:05:42 +00:00
Colin Percival 56e1d5b0f4 MFC rev. 1.128: Insert a g_waitidle() call in order to ensure that new
memory disks appear in /dev before mdconfig(8) returns.

Approved by:	re (kensmith)
2004-08-25 20:20:00 +00:00
Alan Cox 4b94139fe7 MT5 i386/i386/uio_machdep.c:1.6 and sparc64/sparc64/uio_machdep.c:1.7:
Properly free the temporary sf_buf in uiomove_fromphys() if a copyin or
  copyout fails.

  Obtained from: DragonFlyBSD

Approved by:	re (kensmith)
2004-08-25 18:49:56 +00:00
Maxime Henrion 0adea32d6e MFC revision 1.35:
Pass a correct lowaddr to bus_dma_tag_create(), lnc(4) cards can only
  deal with 24-bit addresses.  While the two other attachments, namely
  isa and cbus, do it properly, the PCI attachment was passing
  BUS_SPACE_MAXADDR instead of BUS_SPACE_MAXADDR_24BIT.  This bug
  became apparent with the new contigmalloc() code.

  This fixes the problem reported with lnc(4) interfaces inside VMWare,
  and should theoritically also fix any user of a PCI lnc(4) card.  It
  is a RELENG_5 MFC candidate.

Approved by:	re@
2004-08-25 17:30:36 +00:00
Vinod Kashyap bddc00305f Merged from HEAD, twa changes for amd64 support.
Reviewed by:re
Approved by:re
2004-08-25 17:15:26 +00:00
Robert Watson c98b14ff25 MT5 subr_kdb.c:1.6:
date: 2004/08/22 15:10:52;  author: rwatson;  state: Exp;  lines: +1 -0
  Make debug.kdb.stop_cpus also a TUNABLE() so it can be set prior to boot
  to help debug early nasty hangs.

Approved by:	re (scottl)
2004-08-25 03:29:43 +00:00
Robert Watson 2e7e0a541c MT5 rtsock.c:1.113 and rtsock.c:1.114:
date: 2004/08/21 21:45:40;  author: rwatson;  state: Exp;  lines: +3 -1
  If a tunable for the routing socket netisr queue max is defined, allow it
  to override the default value, rather than the default value overriding
  the tunable.

  date: 2004/08/21 21:20:06;  author: rwatson;  state: Exp;  lines: +6 -1
  Allow the size of the routing socket netisr queue to be configured using
  the tunable or sysctl 'net.route.netisr_maxqlen'.  Default the maximum
  depth to 256 rather than IFQ_MAXLEN due to the downsides of dropping
  routing messages.

Approved by:	re (scottl)
2004-08-25 02:50:18 +00:00
Simon L. B. Nielsen 25c1cd280a MFC: 1.228+1.229:
- Move listing of DTC 3290 to aha(4).
- Remove note about device listings going away.
- Add a note about possibility for duplicate listing of devices.
- Auto generate device listings for the following drivers: ncr, sym,
  umodem, and uscanner

Approved by:	re (blanket)
2004-08-24 21:25:54 +00:00
Simon L. B. Nielsen 77ac826188 MFC: Fix hard sentence breaks.
Approved by:	re (jhb)
2004-08-24 20:43:10 +00:00
Simon L. B. Nielsen 6bfb601ea6 MFC: Add a HARDWARE section which lists supported devices.
Approved by:	re (blanket)
2004-08-24 18:24:19 +00:00
Simon L. B. Nielsen 4260b7d878 MFC v. 1.25:
Move listing of DTC 3290 to aha(4).

Approved by:	re (blanket)
2004-08-24 18:07:16 +00:00
Robert Watson 8c287bc943 MT5 if_fwsubr.c:1.6:
date: 2004/08/22 14:48:55;  author: rwatson;  state: Exp;  lines: +0 -2
  Don't need to assert Giant in fw_output(), only in the firewire start
  routine.

Approved by:	re (scottl)
2004-08-24 14:19:33 +00:00
Nate Lawson 48071798f9 MFC rev 1.26: Fix irq programming on resume.
Approved by:	re (kensmith)
2004-08-24 02:27:57 +00:00
Simon L. B. Nielsen a0bfcdf3a5 MFC v. 1.19:
Add a HARDWARE section to the example section 4 manual page.

Approved by:	re (hrs)
2004-08-23 16:06:33 +00:00
Ruslan Ermilov b8fc5ee458 MFC: 1.394: Build Netgraph modules on all architectures.
Approved by:	re (kensmith)
2004-08-23 14:16:15 +00:00
Doug Rabson 94e0e2ab72 MFC: fix static threaded programs.
Approved by: re
2004-08-23 08:17:46 +00:00
David E. O'Brien 2b4977857a Set vendor to a non-fun, but non-controversial one for the release.
Approved by:	re(kensmith)
2004-08-23 07:13:51 +00:00
Warner Losh 8f4099bd65 ifndef PC98 the opt_agp.h files, per extensive discussions with
nyan-san, obrien, rwatson, and scottl.

Approved by: re
2004-08-23 05:23:16 +00:00
Nate Lawson 7ae76fabdd MFC rev 1.38: Disable irqs after pmap_enter().
Approved by:	re (kensmith)
2004-08-23 05:14:18 +00:00
Nate Lawson 69960b5121 MFC rev 1.36,1.37: Add debugging print to rman_manage_region().
Approved by:	re (kensmith)
2004-08-23 05:12:36 +00:00
Nate Lawson 24c3bfd048 MFC rev 1.11: Remove too-strict register offset check.
Approved by:	re (kensmith)
2004-08-23 05:11:05 +00:00
Marcel Moolenaar 66cdc59f0e MFC of alpha boot fixes for binutils 2.15 and gcc-3.4.2.
Revisions:
	alpha/Makefile.inc		1.10
	alpha/common/Makefile.common	1.19
	alpha/common/ldscript		1.1
	ficl/Makefile			1.38

Approved by: re (kensmith)
2004-08-23 04:26:55 +00:00
David E. O'Brien 32258d2705 Enter the great FreeBSD 5.3!
Approved by:	re(kensmith)
2004-08-23 03:28:01 +00:00
Robert Watson 48c6f8857d MT5 in6_pcb.c:1.60:
date: 2004/08/21 17:38:48;  author: rwatson;  state: Exp;  lines: +5 -3
  When notifying protocol components of an event on an in6pcb, use the
  result of the notify() function to decide if we need to unlock the
  in6pcb or not, rather than always unlocking.  Otherwise, we may unlock
  and already unlocked in6pcb.

  Reported by:    kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
  Tested by:      kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
  Discussed with: mdodd

Approved by:	re (kensmith)
2004-08-22 20:07:50 +00:00
Robert Watson 1957b76ac6 MT5 kern_descrip.c:1.244:
date: 2004/08/19 14:59:51;  author: rwatson;  state: Exp;  lines: +0 -2
  Remove GIANT_REQUIRED from setugidsafety() as knote_fdclose() no longer
  requires Giant.

Approved by:	re (kensmith)
2004-08-22 20:06:19 +00:00
Robert Watson 137359b142 MT5 uipc_usrreq.c:1.139:
date: 2004/08/19 01:45:16;  author: rwatson;  state: Exp;  lines: +10 -2
  Add UNP_UNLOCK_ASSERT() to asser that the UNIX domain socket subsystem
  lock is not held.

  Rather than annotating that the lock is released after calls to
  unp_detach() with a comment, annotate with an assertion.

  Assert that the UNIX domain socket subsystem lock is not held when
  unp_externalize() and unp_internalize() are called.

Approved by:	re (kensmith)
2004-08-22 20:04:56 +00:00
Robert Watson 230c15f4dc MT5 udp_usrreq.c:1.163:
date: 2004/08/19 01:13:10;  author: rwatson;  state: Exp;  lines: +35 -25
  Push down pcbinfo and inpcb locking from udp_send() into udp_output().
  This provides greater context for the locking and allows us to avoid
  locking the pcbinfo structure if not binding operations will take
  place (i.e., already bound, connected, and no expliti sendto()
  address).

Approved by:	re (kensmith)
2004-08-22 20:02:54 +00:00
Robert Watson 504a359052 MT5 in_pcb.c:1.154:
date: 2004/08/19 01:11:17;  author: rwatson;  state: Exp;  lines: +1 -1
  In in_pcbrehash(), do assert the inpcb lock as well as the pcbinfo lock.

Approved by:	re (kensmith)
2004-08-22 20:01:01 +00:00
cvs2svn f516b2168e This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-08-22 16:26:10 +00:00
Dag-Erling Smørgrav edab4dc37e MFC: add NO_BOOT knob to disable building the boot blocks and loader.
Approved by:	re (kensmith)
2004-08-22 14:19:53 +00:00
Dag-Erling Smørgrav 0434278e1e MFC: (1.16) quote variables used as command-line arguments.
Approved by:	re (kensmith)
2004-08-22 14:19:03 +00:00
Ken Smith 64441263db MFC v1.17: Back out call to _init_tls() until it can be fixed. This
is currently causing all static executables to fail.

Work done by:	dfr
Approved by:	re (rwatson)
2004-08-21 16:36:21 +00:00
David E. O'Brien e7f3346566 MFC: rev 1.15: turn on the FreeBSD login user capabilities database support.
Approved by:	re(kensmith)
2004-08-21 03:46:39 +00:00
David E. O'Brien 9e40a6a64c MFC: Import of LukeM's ftpd taken from the NetBSD CVS repo on 9-Aug-2004.
Approved by:	re(kensmith)
2004-08-21 03:45:51 +00:00
Ken Smith 7b2806c921 We're ready to begin the BETA1 builds.
Approved by:	re (scottl)
2004-08-20 15:31:44 +00:00
Ken Smith 4e8277362c MFC rev 1.24: temporarily have loader set hw.ata.ata_dma=0 on sparc64
only.  This is a temporary hack needed until kernel support for DMA
buffer alignment support is added.  The newer ATA code expects this
support and it has been added to each arch except for sparc64.  This
commit will be backed out when the support is added.

Approved by:	re (scottl)
2004-08-20 05:33:37 +00:00
Ken Smith 493e51b106 Fix 'make update' to look for RELENG_5 tag.
Submitted by:	eik
Approved by:	re (scottl)
2004-08-20 02:57:07 +00:00
Ken Smith 541e468618 Almost an oops, local mirror hadn't caught up with the last version
of this file yet...

MFC of rev. 1.73 - definitely stop callout.

Work done by:		andre
Noticed my oops:	andre
Approved by:		re
2004-08-20 02:02:05 +00:00
Ken Smith 7e012e7ce2 Last nit to MFC, rev 1.5: fix typo (extra semi-colon).
Work done by:	andre
Approved by:	re
2004-08-20 01:43:50 +00:00
Ken Smith 906ba70bcc MFC balance of ipfw fixes. Revs being MFC-ed:
ip_fw.h rev 1.90
	ip_fw2.c rev 1.71-1.73
	ip_fw_pfil.c rev 1.2-1.3
	ip_input.c rev 1.285
	tcp_subr.c rev 1.202

Work done by:	andre
Approved by:	re
2004-08-20 01:40:42 +00:00
Ken Smith 449c31a012 MFC of v1.1263, Add comment that IPFIREWALL now requires option
PFIL_HOOKS.

Work done by:	andre
Approved by:	re
2004-08-20 00:42:35 +00:00
Ken Smith e9321d3dbd MFC of v1.30 - Note that IPFIREWAll depends on PFIL_HOOKS compiled into
the kernel as well.

Work done by:	andre
Approved by:	re
2004-08-20 00:36:44 +00:00
Ken Smith cc8aee3c73 MFC of v1.343 and v1.344, add note about ipfw to pfil_hooks conversion
and requirement of having that in the kernel to be able to use ipfw.

Work done by:	andre@
Approved by:	re
2004-08-20 00:30:59 +00:00
Scott Long 0972ec5e1f Track RELENG_5
Submitted by: kuriyama
Approved by: re
2004-08-19 23:02:06 +00:00
Nate Lawson db1420c3fa MFC: rev 1.25, Don't bail out on _CRS failure.
Approved by:	re (scottl)
2004-08-19 19:19:40 +00:00
Nate Lawson 0bc877a749 MFC: rev 1.188, Use original order in resuming.
Approved by:	re (scottl)
2004-08-19 19:15:30 +00:00
Nate Lawson 26f8d10781 MFC: rev 1.27, Skip, don't bail out on tables with invalid checksums.
Approved by:	re (scottl)
2004-08-19 19:12:11 +00:00
Nate Lawson cafb646a91 MFC: rev 1.19, Update supported table types.
Approved by:	re (scottl)
2004-08-19 19:10:52 +00:00
Nate Lawson 559a3f8117 MFC: Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls. Includes:
Revision     Path
  1.187        src/sys/dev/acpica/acpi.c
  1.11         src/sys/dev/acpica/acpiio.h
  1.80         src/sys/dev/acpica/acpivar.h
  1.14         src/usr.sbin/acpi/acpiconf/acpiconf.8
  1.16         src/usr.sbin/acpi/acpiconf/acpiconf.c

Approved by:	re (scottl)
2004-08-19 19:08:58 +00:00
Ken Smith 6f218ff374 Prepare for the first 5.3 snapshot builds. There are enough significant
issues re@ feels this warrants being called ALPHA.

Approved by:	re
2004-08-19 18:52:37 +00:00
Poul-Henning Kamp 782b39c1fe MFC: Don't override class provided dumpconf function. 2004-08-19 06:56:50 +00:00
Marcel Moolenaar a4446fcbbf MFC rev 1.4: unbreak the startup code by restoring a clobbered GP.
Approved by: re (blanket)
2004-08-19 05:52:09 +00:00
Scott Long 9a49abc426 MFC: Fix the kernel compile when not using PFIL_HOOKS and IPSEC.
Submitted by: rwatson, peter
Approved by: re
2004-08-18 23:27:42 +00:00
Justin T. Gibbs 66ffd88f6b MFC: Remove ISA attachment's dependency on eisaconf.h and fix iobase
printout in diagnostics during failed ISA probes.

Approved by: re
2004-08-18 22:16:38 +00:00
cvs2svn 3c9270175d This commit was manufactured by cvs2svn to create branch 'RELENG_5'. 2004-08-18 16:37:05 +00:00
8607 changed files with 802797 additions and 579038 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (C) 1992-2004 The FreeBSD Project. All rights reserved.
Copyright (C) 1992-2006 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+2 -4
View File
@@ -14,10 +14,8 @@ ahd(4) gibbs Pre-commit review requested.
NEWCARD imp Pre-commit review requested.
OLDCARD imp Pre-commit review requested.
wi imp Pre-commit review requested.
telnet markm please ensure that a security-aware person
sanity-checks your work.
secure/* markm please ensure that a security-aware person
sanity-checks your work.
telnet markm Heads-up appreciated. Try not to break it.
secure/* markm Heads-up appreciated. Try not to break it.
kerberos5 nectar Pre-commit review requested.
heimdal nectar Pre-commit review requested.
cdboot jhb Pre-commit review requested.
+25 -12
View File
@@ -69,7 +69,8 @@ TGTS= all all-man buildkernel buildworld checkdpadd clean \
kernel-toolchain libraries lint maninstall \
obj objlink regress rerelease tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend
_build-tools _cross-tools _includes _libraries _depend \
build32 install32
BITGTS= files includes
BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
@@ -85,6 +86,13 @@ TGTS+= ${BITGTS}
PATH= /sbin:/bin:/usr/sbin:/usr/bin
MAKEOBJDIRPREFIX?= /usr/obj
_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
-f /dev/null -V MAKEOBJDIRPREFIX dummy
.if !empty(_MAKEOBJDIRPREFIX)
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
(in make.conf(5)) or command-line variable.
.endif
MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
BINMAKE= \
`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
@@ -144,10 +152,9 @@ ${TGTS}:
# Set a reasonable default
.MAIN: all
.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
.if make(world)
STARTTIME!= LC_ALL=C date
.endif
.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
#
# world
#
@@ -242,16 +249,20 @@ make: .PHONY
# universe
#
# Attempt to rebuild *everything* for all supported architectures,
# with reasonable chance of success, regardless of how old your
# with a reasonable chance of success, regardless of how old your
# existing system is.
#
i386_mach= pc98
universe:
universe: universe_prologue
universe_prologue:
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
@echo "--------------------------------------------------------------"
.for arch in i386 sparc64 alpha ia64 amd64
.for mach in ${arch} ${${arch}_mach}
.for target in i386 i386:pc98 sparc64 alpha ia64 amd64
.for arch in ${target:C/:.*$//}
.for mach in ${target:C/^.*://}
universe: universe_${mach}
.ORDER: universe_prologue universe_${mach} universe_epilogue
universe_${mach}:
@echo ">> ${mach} started on `LC_ALL=C date`"
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \
TARGET_ARCH=${arch} TARGET=${mach} \
@@ -262,10 +273,13 @@ universe:
-cd ${.CURDIR}/sys/${mach}/conf && ${MAKE} LINT \
> ${.CURDIR}/_.${mach}.makeLINT 2>&1
.endif
cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernels TARGET_ARCH=${arch} TARGET=${mach}
cd ${.CURDIR} && ${MAKE} buildkernels TARGET_ARCH=${arch} TARGET=${mach}
@echo ">> ${mach} completed on `LC_ALL=C date`"
.endfor
.endfor
.endfor
universe: universe_epilogue
universe_epilogue:
@echo "--------------------------------------------------------------"
@echo ">>> make universe completed on `LC_ALL=C date`"
@echo " (started ${STARTTIME})"
@@ -274,8 +288,6 @@ universe:
.if make(buildkernels)
KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \
find [A-Z]*[A-Z] -type f -maxdepth 0 ! -name NOTES
.endif
buildkernels:
.for kernel in ${KERNCONFS}
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \
@@ -283,3 +295,4 @@ buildkernels:
__MAKE_CONF=/dev/null \
> _.${TARGET}.${kernel} 2>&1
.endfor
.endif
+129 -21
View File
@@ -27,7 +27,7 @@
# The intended user-driven targets are:
# buildworld - rebuild *everything*, including glue to help do upgrades
# installworld- install everything built by "buildworld"
# update - convenient way to update your source tree (eg: sup/cvs)
# update - convenient way to update your source tree (eg: cvsup/cvs)
#
# Standard targets (not defined here) are documented in the makefiles in
# /usr/share/mk. These include:
@@ -83,6 +83,7 @@ CLEANDIR= cleandir
.endif
CVS?= cvs
CVSFLAGS?= -r RELENG_5_5 -P -d -I!
SUP?= /usr/local/bin/cvsup
SUPFLAGS?= -g -L 2 -P -
.if defined(SUPHOST)
@@ -90,13 +91,6 @@ SUPFLAGS+= -h ${SUPHOST}
.endif
MAKEOBJDIRPREFIX?= /usr/obj
_MAKEOBJDIRPREFIX!= env -i PATH=${PATH} MAKEFLAGS="${.MAKEFLAGS}" ${MAKE} \
-f /dev/null -V MAKEOBJDIRPREFIX dummy
.if !empty(_MAKEOBJDIRPREFIX)
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
(in /etc/make.conf) or command-line variable.
.endif
.if !defined(OSRELDATE)
.if exists(/usr/include/osreldate.h)
OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
@@ -118,8 +112,8 @@ _TARGET_CPUTYPE=${TARGET_CPUTYPE}
.else
_TARGET_CPUTYPE=dummy
.endif
_CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \
CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
-f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
.error CPUTYPE global should be set with ?=.
.endif
@@ -180,13 +174,13 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
# bootstrap-tools stage
BMAKEENV= DESTDIR= \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${BPATH}:${PATH} \
WORLDTMP=${WORLDTMP} \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
-DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE \
-DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS
@@ -194,6 +188,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
# build-tools stage
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS
# cross-tools stage
@@ -201,11 +196,52 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
# world stage
WMAKEENV= ${CROSSENV} \
DESTDIR=${WORLDTMP} \
_SHLIBDIRPREFIX=${WORLDTMP} \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH}
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
.if ${TARGET_ARCH} == "amd64"
# 32 bit world
LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT
LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \
-L${LIB32TMP}/usr/lib32 \
-B${LIB32TMP}/usr/lib32
LIB32CC= ${LIB32PREFLAGS} \
${LIB32POSTFLAGS}
LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \
${LIB32POSTFLAGS}
LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \
${LIB32POSTFLAGS}
# Yes, the flags are redundant.
LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
_SHLIBDIRPREFIX=${LIB32TMP} \
MACHINE_ARCH=i386 \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
CC="cc ${LIB32CC}" \
CXX="c++ ${LIB32CXX}" \
OBJC="cc ${LIB32OBJC}" \
LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
AS="as --32" \
LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32 \
LIBCOMPATDIR=/usr/lib32/compat
LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
-DNO_BIND -DNOMAN -DNODOC -DNOINFO -DNOHTML \
CC="cc ${LIB32CC}" \
CXX="c++ ${LIB32CXX}" \
OBJC="cc ${LIB32OBJC}" \
LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
AS="as --32" \
LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32 \
LIBCOMPATDIR=/usr/lib32/compat
.endif
# install stage
.if empty(.MAKEFLAGS:M-n)
@@ -248,7 +284,7 @@ _worldtmp:
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
.endif
.for _dir in \
usr/bin usr/games usr/include/c++/3.3 usr/include/sys usr/lib \
usr/bin usr/games usr/include/c++/3.4 usr/include/sys usr/lib \
usr/libexec usr/sbin usr/share/dict \
usr/share/groff_font/devX100 \
usr/share/groff_font/devX100-12 \
@@ -276,6 +312,10 @@ _worldtmp:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.if defined(WITH_BIND_LIBS) && !defined(NO_BIND)
mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
.endif
_legacy:
@echo
@echo "--------------------------------------------------------------"
@@ -340,6 +380,63 @@ everything:
@echo ">>> stage 4.4: building everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} par-all
.if ${TARGET_ARCH} == "amd64"
build32:
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 5.1: building 32 bit shim libraries"
@echo "--------------------------------------------------------------"
.for _dir in \
lib lib32 usr/bin usr/include usr/lib32/compat/aout \
usr/libdata/ldscripts usr/libexec usr/sbin usr/share/misc \
usr/share/snmp/defs usr/share/snmp/mibs
mkdir -p ${LIB32TMP}/${_dir}
.endfor
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${LIB32TMP}/usr/include >/dev/null
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
.for _t in obj depend all
cd ${.CURDIR}/kerberos5/tools; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t}
.endfor
.endif
.for _t in obj includes
cd ${.CURDIR}/include; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
cd ${.CURDIR}/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
cd ${.CURDIR}/gnu/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.if !defined(NOCRYPT)
cd ${.CURDIR}/secure/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endif
.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
cd ${.CURDIR}/kerberos5/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endif
.endfor
.for _dir in lib/libncurses lib/libmagic
cd ${.CURDIR}/${_dir}; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools
.endfor
cd ${.CURDIR}; \
${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries
.for _t in obj depend all
cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endfor
install32:
mkdir -p ${DESTDIR}/usr/lib32/compat # XXX add to mtree
cd ${.CURDIR}/lib; ${LIB32MAKE} install
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install
.if !defined(NOCRYPT)
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install
.endif
WMAKE_TGTS=
@@ -351,6 +448,9 @@ WMAKE_TGTS+= _cleanobj _obj _build-tools
WMAKE_TGTS+= _cross-tools
.endif
WMAKE_TGTS+= _includes _libraries _depend everything
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
WMAKE_TGTS+= build32
.endif
buildworld: ${WMAKE_TGTS}
.ORDER: ${WMAKE_TGTS}
@@ -481,6 +581,9 @@ reinstall: ${SPECIAL_INSTALLCHECKS}
@echo ">>> Installing everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
.endif
redistribute:
@echo "--------------------------------------------------------------"
@@ -504,7 +607,7 @@ redistribute:
.if !defined(KERNCONF) && defined(KERNEL)
KERNCONF= ${KERNEL}
KERNWARN= yes
KERNWARN=
.else
KERNCONF?= GENERIC
.endif
@@ -660,9 +763,9 @@ update:
.endif
.if defined(CVS_UPDATE)
@echo "--------------------------------------------------------------"
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${CVS} -R -q update -A -P -d
cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
.endif
#
@@ -788,7 +891,6 @@ build-tools:
bin/csh \
bin/sh \
${_rescue} \
gnu/usr.bin/cc/cc_tools \
lib/libncurses \
${_share} \
${_aicasm} \
@@ -801,6 +903,7 @@ build-tools:
${MAKE} DIRPRFX=${_tool}/ build-tools
.endfor
.for _tool in \
gnu/usr.bin/cc/cc_tools \
${_kerberos5_tools}
${_+_}@${ECHODIR} "===> ${_tool}"; \
cd ${.CURDIR}/${_tool}; \
@@ -817,7 +920,8 @@ build-tools:
_elf2aout= usr.bin/elf2aout
.endif
.if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH}
.if (${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386") && \
${TARGET_ARCH} != ${MACHINE_ARCH}
_btxld= usr.sbin/btxld
.endif
@@ -901,7 +1005,7 @@ _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \
lib/libkvm lib/libmd \
lib/libncurses lib/libnetgraph lib/libopie lib/libpam \
lib/libradius \
lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \
lib/libsbuf lib/libtacplus lib/libutil \
lib/libz lib/msun
lib/libopie__L lib/libtacplus__L: lib/libmd__L
@@ -930,6 +1034,10 @@ _generic_libs+= secure/lib
lib/libradius__L: lib/libmd__L
.endif
.if !defined(NO_NIS)
_prebuild_libs+= lib/libypclnt
.endif
_generic_libs+= usr.bin/lex/lib
.if ${MACHINE_ARCH} == "i386"
+368 -93
View File
@@ -1,4 +1,4 @@
Updating Information for FreeBSD current users
Updating Information for FreeBSD stable users
This file is maintained and copyrighted by M. Warner Losh
<[email protected]>. See end of file for further details. For commonly
@@ -6,20 +6,254 @@ done items, please see the COMMON ITEMS: section later in the file.
Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running
portupgrade. Important recent entries: 20040724 (default X changes).
portupgrade.
NOTE TO PEOPLE WHO THINK THAT FreeBSD 5.x IS SLOW:
FreeBSD 5.x has many debugging features turned on, in
both the kernel and userland. These features attempt to detect
incorrect use of system primitives, and encourage loud failure
through extra sanity checking and fail stop semantics. They
also substantially impact system performance. If you want to
do performance measurement, benchmarking, and optimization,
you'll want to turn them off. This includes various WITNESS-
related kernel options, INVARIANTS, malloc debugging flags
in userland, and various verbose features in the kernel. Many
developers choose to disable these features on build machines
to maximize performance.
20060127:
The i386 loader(8) now defaults to the serial speed set by the
previous boot stage, if the comconsole is already in use. If
you've changed BOOT_COMCONSOLE_SPEED in make.conf(5) and
installed a new loader, but have not rebuilt and reinstalled the
boot blocks, then your loader will leave the console at 9600
baud. Either install the new boot blocks, or set
comconsole_speed in loader.conf(5). Note that the new boot
blocks also support a -S<speed> flag described in boot(8).
20060111:
Bug fixes to the trimdomain(3) function in libutil may result in
slight changes to the host names appearing in log files under
relatively rare circumstances.
20051015:
The shared library version number of libarchive was accidentally
bumped up during an MFC of other changes on October 4, 2005. It
was reset to the correct value on October 14, 2005. If you
updated a system between those dates you should check to see if
/usr/lib/libarchive.so.2 exists and remove it AFTER doing your
next update.
20051004:
if_bridge has been merged which provides more advanced Ethernet
bridging and 802.1d spanning tree support. See if_bridge(4) for
configuration details.
20050513:
Intel Hyper-Threading is now disabled by default due to a
security issue, but can be re-enabled by setting the
machdep.hyperthreading_allowed tunable in /boot/loader.conf.
20050509:
FreeBSD 5.4-RELEASE
20050302:
The full packet destination manipulation for 'ipfw fwd' is
back with the kernel compile time option:
options IPFIREWALL_FORWARD_EXTENDED
This option has to be specified in addition to IPFIREWALL_FORWARD.
With this option even packets targeted for an IP address local
to the host can be redirected. All restrictions to ensure proper
behaviour for locally generated packets are turned off. Firewall
rules have to be carefully crafted to make sure that things like
PMTU discovery do not break.
20050228:
The responsibility of recomputing the file system summary of
a SoftUpdates-enabled dirty volume has been transferred to the
background fsck. A rebuild of fsck(8) utility is recommended
if you have updated the kernel.
To get the old behavior (recompute file system summary at mount
time), you can set vfs.ffs.compute_summary_at_mount=1 before
mounting the new volume.
20050228:
The ifi_epoch member of struct if_data has been changed to
contain the uptime at which the interface was created or the
statistics zeroed rather then the wall clock time because
wallclock time may go backwards. This should have no impact
unless an snmp implementation is using this value (I know of
none at this point.)
20050227:
The default "world" build no longer supports running on an
80386 CPU. In order to build a world for an 80386 CPU, one
needs to set CPUTYPE=i386 in /etc/make.conf.
20050225:
The cpufreq framework has been merged. As part of this, the sysctls
for acpi(4) throttling have been removed. See cpufreq(4) for the
new sysctl interface. The power_profile script has also been updated,
so you can use performance/economy_cpu_freq in rc.conf(5) to set AC
on/offline cpu frequencies. No new cpufreq drivers have been brought
in with this import but drivers from -current can now be built and run
on -stable.
20050215: [applicable to sparc64 only]
uart(4) is the default serial console now. When using the
GENERIC kernel, make sure to start getty(8) processes on
ttyu0 and/or ttyu1. Either run mergemaster(8) or edit
/etc/ttys manually.
20050203:
ppp(8) no longer reverts to sending ECHO requests if LQR is
enabled but fails negotiation. To enable the old behaviour,
add ``enable echo'' to your config.
Additionally, when RADIUS is enabled, ppp now sends both
NAS-IP-Address and NAS-Identifier by default. This behaviour
can be modified with the ``enable/disable
NAS-IP-Address/NAS-Identifier'' command.
20041126:
The numbers of arguments for ng_timeout() and ng_untimeout()
have changed. If netgraph.ko is rebuilt or if netgraph is
statically compiled in kernel, then the following modules
must also be rebuilt:
ng_hci
ng_l2cap
ng_source
ng_sscop
ng_uni
20041024:
FreeBSD 5.3-RELEASE
20041023:
GENERIC kernel config files for amd64 and i386 no longer have
"options SMP". That has been moved to a new config file named
SMP for users who want an easy way to build an SMP kernel.
20041010:
The FreeBSD keyword is no longer a requirement for a valid
rc.d script. The rc(8) and rc.shutdown(8) scripts no longer check
for the existence of this keyword when ordering rc.d scripts.
This change touches most of the file in /etc/rc.d; therefore,
if you have not modified any files in that directory it may
be easier to rm -rf /etc/rc.d and then use the -i switch with
mergemaster(8).
20041009:
One of the syscalls the 1:1 threading library libthr uses has
changed, thus breaking ABI compatibility. Make sure you rebuild
this library with the kernel.
20041003:
The pfil API has gained an additional argument to pass an inpcb.
You should rebuild all pfil consuming modules: ipfw, ipfilter
and pf.
20041001:
The following libraries had their version number bumped up:
/lib/libm.so.2 -> libm.so.3
/lib/libreadline.so.4 -> libreadline.so.5
/usr/lib/libhistory.so.4 -> libhistory.so.5
/usr/lib/libopie.so.2 -> libopie.so.3
/usr/lib/libpcap.so.2 -> libpcap.so.3
FreeBSD 4.10 versions of these libraries will be added to the
compat4x collection. If you expect to be able to run old 4.X
executables you will need to remove the old versions of these
libraries. However note that any 5.X executables you have built
will stop working once you remove those old libraries. You should
have all your ports/packages rebuilt before removing the old
libraries.
20040928:
If enabled, the default is now to run named in a chroot
"sandbox." For users with existing configurations in
/etc/namedb the migration should be simple. Upgrade your
world as usual, then after installworld but before
mergemaster do the following:
If named is running: /etc/rc.d/named stop
cd /etc
mv namedb namedb.bak
mkdir -p /var/named/etc/namedb
cp -Rp namedb.bak/* /var/named/etc/namedb/
mergemaster (with your usual options)
If using the generated localhost* files:
cd /var/named/etc/namedb
/bin/sh make-localhost
rm -f localhost-v6.rev localhost.rev
/etc/rc.d/syslogd restart
/etc/rc.d/named start
If you are using a custom configuration, or if you have
customised the named_* variables in /etc/rc.conf[.local]
then you may have to adjust the instructions accordingly.
It is suggested that you carefully examine the new named
variables in /etc/defaults/rc.conf and the options in
/var/named/etc/namedb/named.conf to see if they might
now be more suitable.
20040925:
BIND 9 has been imported into the base, and is now fully
functional. BIND 8 has now been removed. There are numerous
differences between BIND 8 and 9, and users with critical
named installations should read the migration documentation
in /usr/share/doc/bind9/misc/migration. There is also a
new instruction manual in /usr/share/doc/bind9/arm.
The key differences that most users will experience are in
how picky BIND 9 is about zone file format. If you are using
named as a resolving (caching) name server, you will likely
not have trouble.
The following files are part of the old BIND 8 installation
and should be removed:
/usr/bin/dnskeygen /usr/bin/dnsquery /usr/libexec/named-xfer
/usr/sbin/named.restart /usr/sbin/ndc
The following files have moved to /usr/bin, and should be
removed from their old locations:
/usr/sbin/nslookup /usr/sbin/nsupdate
20040922:
PFIL_HOOKS are a fixed part of the network stack now and do not
need to be specified in the kernel configuration file anymore.
Remove 'options PFIL_HOOKS' from your kernel config file.
20040914:
The format of the pflogd(8) logfile "/var/log/pflog" has changed for
architectures that have a 64 bit long type to make it compatible to
the standard pcap format. In order to prevent corruption move away
any old logfile before using a new pflogd(8).
20040913:
debug.witness_* has been renamed to debug.witness.*. There are
compatibility tunables left in for a few days. Update loader.conf
as necessary.
20040907:
The kernel and userland debugging options have been turned off
by default.
20040902:
The default configuration for the network stack has been changed
such that it now runs without the Giant lock unless configured
otherwise. If you experience network-related instability, you
may wish to try setting "debug.mpsafenet=0" or compiling the
kernel with "options NET_WITH_GIANT". Details on the netperf
project may be found at:
http://www.watson.org/~robert/freebsd/netperf/
Including the 20040828 announcement of configuration change
details.
20040826:
Netgraph changed its message format slightly to align the data
portion well on 64 bit machines.
Netgraph using utilities (e.g. ngctl, nghook, ppp, mpd,
pppoed, bluetooth, ATM) should be recompiled when a new kernel
is installed.
20040817:
IPFW has been converted to use PFIL_HOOKS. This change is
transparent to userland and preserves the ipfw ABI. The ipfw
core packet inspection and filtering functions have not been
changed, only how ipfw is invoked is different. Note that
"option PFIL_HOOKS" is required to use IPFIREWALL compiled
into the kernel or as KLD.
20040814:
The RANDOM_IP_ID option has been replaced by the sysctl
@@ -1635,10 +1869,10 @@ COMMON ITEMS:
<reboot>
To upgrade in-place from 4.x-stable to current
To upgrade in-place from 4.x-stable to 5.x
----------------------------------------------
# 5.x uses more space than 4.x. Also, the location of kernel
# modules has changed. If you are installing 5.0 onto a 4.x
# modules has changed. If you are installing 5.x onto a 4.x
# system, you'll need about 30MB of free disk space on your /
# partition. If you have less than this, you may encounter difficult
# to back out of problems with this procedure. If /tmp is on
@@ -1647,99 +1881,140 @@ COMMON ITEMS:
# space on /.
<make sure you have good level 0 dumps>
<maybe fix /etc/fstab> [7]
make buildworld [9]
make buildkernel KERNCONF=YOUR_KERNEL_HERE [8]
cp sys/${MACHINE}/conf/GENERIC.hints /boot/device.hints [2]
<maybe fix /etc/fstab> [1]
make buildworld [2]
make buildkernel KERNCONF=YOUR_KERNEL_HERE [3]
cp sys/${MACHINE}/conf/GENERIC.hints /boot/device.hints [4]
make installkernel KERNCONF=YOUR_KERNEL_HERE
cd sys/boot ; make STRIP="" install [6]
[1]
<reboot in single user> [3]
/usr/src/etc/rc.d/preseedrandom [10]
mergemaster -p [5]
cd sys/boot ; make STRIP= install [5]
[6]
<reboot in single user> [7]
/usr/src/etc/rc.d/preseedrandom [8]
mergemaster -p [9]
rm -rf /usr/include/g++
make installworld
mergemaster -i [4]
rm -f /sbin/mountd
make installworld [11]
mergemaster -i [12]
<reboot>
Make sure that you've read the UPDATING file to understand the
tweaks to various things you need. At this point in the life
cycle of current, things change often and you are on your own
to cope. The defaults can also change, so please read ALL of
the UPDATING entries.
cycle of stable, things change fairly rarely. However, many
changes from 4.x to 5.x are not reflected in this breif section.
The defaults can also change, so please read ALL of the UPDATING
entries.
Also, if you are tracking -current, you must be subscribed to
[email protected]. Make sure that before you update
your sources that you have read and understood all the recent
messages there. If in doubt, please track -stable which has
much fewer pitfalls.
If you have any ports or packages installed on the system, please
see /usr/ports/UPDATING. The following items are known to cause
problems with the upgrade:
(a) Kerberos upgrades are hard, and evidentally don't work. More
on this later.
(b) Old ports and packages can sometimes have subtle problems with
newer libraries. portupgrade -f is recommended where possible
after the upgrade. portupgrade -P will be faster since it uses
packages. There are many known issues with running a mix of
4.x built packages and 5.x built packages, and this avoids them.
(c) Perl based ports may also have the wrong version of perl hard
coded into the headers. Spamassassin is one such port.
(d) Startup scripts have significantly changed. Make sure that you
verify that all expected daemons start. Modifications of /etc/rc*
(except rc.conf) may cause problems.
(e) Device names have changed and MAKEDEV is gone.
(f) The boot loader defaults have changed, which may cause confusion.
(g) If the build dies for some reason and you reboot, you'll be booting
with new libraries, but old paths. You will need to tell ldconfig
about them with
ldconfig /lib /usr/lib /usr/local/lib
(h) If the system appears to hang, try toggling the scroll lock. Many
kvm switches use Scroll Lock to switch screens and on such systems
a hang can often just be scroll lock active.
(i) named now runs in a chroot unless you disable this. See
named_chrootdir in /etc/defaults/rc.conf for details on restoring
4.x behavior.
(j) Ports that use PAM on 4.x should be recompiled. This is especially
true for sudo. know thy root password before the upgrade!
[1] If you have third party modules, such as vmware, you
should disable them at this point so they don't crash your
system on reboot.
[1] Before you upgrade, please make sure that you are not using
compatibility slices. These are device names of the form, on i386 and
other architectures that use MBR slicing, /dev/ad0a without the actual
slice name. Chances are excellent that these will break. You
generally must update these entries to use the post FreeBSD 2.x form
of /dev/ad0s1a.
[2] If you have legacy ISA devices, you may need to create
your own device.hints to reflect your unique hardware
configuration.
[2] When checking out sources, you must include the -P flag to have
cvs prune empty directories. Also, if CPUTYPE is defined in your
/etc/make.conf, make sure to use the "?=" instead of the "="
assignment operator, so that buildworld can override the CPUTYPE if it
needs to. In case you would like to avoid installing new packages of
everything, you might want to uncomment the "COMPAT4X= YES" entry, so
that 4.x compatibility libraries are built which should allow you to
continue using your existing software for a while.
[3] From the bootblocks, boot -s, and then do
fsck -p
mount -u /
mount -a
cd /usr/src
adjkerntz -i # if CMOS is wall time
Also, when doing a major release upgrade, it is required that
you boot into single user mode to do the installworld.
For the 4.x -> 5.x upgrade, you will also see many messages about
needing to recompile your userland. These are harmless and can
be ignored while you proceed to the next step.
[4] Note: This step is non-optional. Failure to do this step
can result in a significant reduction in the functionality of the
system. Attempting to do it by hand is not recommended and those
that pursue this avenue should read this file carefully, as well
as the archives of freebsd-current and freebsd-hackers mailing lists
for potential gotchas.
[5] Usually this step is a noop. However, from time to time
you may need to do this if you get unknown user in the following
step. It never hurts to do it all the time. You may need to
install a new mergemaster (cd src/usr.sbin/mergemaster && make
install) after the buildworld before this step if you last updated
from current before 20020224 or from -stable before 20020408.
[6] 4.x boot loader can be used to boot a 5.x system, however
it is difficult to do that at best. If you wish to try, then
you should interrupt the boot and at the ok prompt type:
ok unload
ok boot /boot/kernel/kernel
If this fails to work, you must install a new boot loader as
described here.
[7] Before you upgrade, please make sure that you are not using
compatibility slices. These are device names of the form, on i386
and other architectures that use MBR slicing, /dev/ad0a without the
actual slice name. Chances are excellent that these will break.
You generally must update these entries to use the post FreeBSD
2.x form of /dev/ad0s1a.
[8] In order to have a kernel that can run the 4.x binaries
[3] In order to have a kernel that can run the 4.x or earlier binaries
needed to do an installworld, you must include the COMPAT_FREEBSD4
option in your kernel. Failure to do so may leave you with a system
that is hard to boot to recover.
that is hard to boot to recover. If you have a.out binaries, then you
need to add COMPAT_AOUT option too. If you are updating a system
that's been updated from 2.x and/or 3.x in the past, enable both of
these to be safe.
[9] When checking out sources, you must include the -P flag to have
cvs prune empty directories. Also, if CPUTYPE is defined in your
/etc/make.conf, make sure to use the "?=" instead of the "=" assignment
operator, so that buildworld can override the CPUTYPE if it needs to.
In case you would like to avoid installing new packages of everything,
you might want to uncomment the "COMPAT4X= YES" entry, so that 4.x
compatibility libraries are built which should allow you to continue
using your existing software for a while.
[4] If you have legacy ISA devices, you may need to create your own
device.hints to reflect your unique hardware configuration.
[10] In order to create temporary files, /dev/random must be
[5] Since make installkernel also does a make heirarchy, PAM will
stop working because /etc/pam.d's existance overrides /etc/pam.conf.
If you want to login to your system after the install kernel, or if
you have accidentally rebooted a remote system into multi-user, the
existance of /etc/pam.d will cause remote logins to fail. It is
safe to remove it at this step as it will be recreated later.
[6] 4.x boot loader can be used to boot a 5.x system, however it is
difficult to do that at best. If you wish to try, then you should
interrupt the boot and at the ok prompt type:
ok unload
ok boot /boot/kernel/kernel
If this fails to work, you must install a new boot loader as described
here.
[7] If you have third party modules, such as vmware, you should
disable them at this point so they don't crash your system on reboot.
[8] From the bootblocks, boot -s, and then do
fsck -p
mount -a -t ufs
cd /usr/src
adjkerntz -i # if CMOS is wall time
Also, when doing a major release upgrade, it is required that you boot
into single user mode to do the installworld. For the 4.x -> 5.x
upgrade, you will also see many messages about needing to recompile
your userland. These are harmless and can be ignored while you
proceed to the next step.
[9] In order to create temporary files, /dev/random must be
initialized by feeding data into it. /usr/src/etc/rc.d/preseedrandom
takes care of this.
[10] Usually this step is a noop. However, from time to time you may
need to do this if you get unknown user in the following step. It
never hurts to do it all the time. You may need to install a new
mergemaster (cd src/usr.sbin/mergemaster && make install) after the
buildworld before this step if you last updated from current before
20020224 or from -stable before 20020408. If you are installing not
from /usr/src, don't forget the -m option.
[11] If you are using a non-standard /usr/obj, you need to set
an appropriate MAKEOBJDIRPREFIX before this step.
[12] Note: This step is non-optional. Failure to do this step can
result in a significant reduction in the functionality of the system.
Attempting to do it by hand is not recommended and those that pursue
this avenue should read this file carefully, as well as the archives
of freebsd-current and freebsd-hackers mailing lists for potential
gotchas. Also, if you are installing not from /usr/src, don't
forget the -m option. Also note: since many libraries moved into
/lib with 5.x, failure to run mergemaster will result in many
shared libraries that should be there not being found.
FORMAT:
This file contains a list, in reverse chronological order, of major
+26 -14
View File
@@ -31,7 +31,7 @@
.\" @(#)chflags.1 8.4 (Berkeley) 5/2/95
.\" $FreeBSD$
.\"
.Dd March 24, 2003
.Dd February 24, 2005
.Dt CHFLAGS 1
.Os
.Sh NAME
@@ -78,30 +78,25 @@ The flags are specified as an octal number or a comma separated list
of keywords.
The following keywords are currently defined:
.Pp
.Bl -tag -offset indent -width "opaque" -compact
.It Ar arch
.Bl -tag -offset indent -width ".Ar opaque"
.It Ar arch , archived
set the archived flag (super-user only)
.It Ar opaque
set the opaque flag (owner or super-user only)
.It Ar nodump
set the nodump flag (owner or super-user only)
.It Ar sappnd
.It Ar sappnd , sappend
set the system append-only flag (super-user only)
.It Ar schg
.It Ar schg , schange , simmutable
set the system immutable flag (super-user only)
.It Ar sunlnk
.It Ar sunlnk , sunlink
set the system undeletable flag (super-user only)
.It Ar uappnd
.It Ar uappnd , uappend
set the user append-only flag (owner or super-user only)
.It Ar uchg
.It Ar uchg , uchange , uimmutable
set the user immutable flag (owner or super-user only)
.It Ar uunlnk
.It Ar uunlnk , uunlink
set the user undeletable flag (owner or super-user only)
.It Ar archived , sappend , schange , Xo
.Ar simmutable , uappend , uchange , uimmutable ,
.Ar sunlink , uunlink
.Xc
aliases for the above
.El
.Pp
Putting the letters
@@ -145,6 +140,23 @@ You can use "ls -lo" to see the flags of existing files.
.Xr stat 2 ,
.Xr fts 3 ,
.Xr symlink 7
.Sh BUGS
Only a limited number of utilities are
.Nm
aware.
Some of these tools include
.Xr ls 1 ,
.Xr cp 1 ,
.Xr find 1 ,
.Xr install 1 ,
.Xr dump 8 ,
and
.Xr restore 8 .
In particular a tool which is not currently
.Nm
aware is the
.Xr pax 1
utility.
.Sh HISTORY
The
.Nm
+7 -1
View File
@@ -31,7 +31,7 @@
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
.Dd July 23, 2002
.Dd February 23, 2005
.Dt CP 1
.Os
.Sh NAME
@@ -93,6 +93,12 @@ If
designates a directory,
.Nm
copies the directory and the entire subtree connected at that point.
If the
.Ar source_file
ends in a
.Pa / ,
the contents of the directory are copied rather than the
directory itself.
This option also causes symbolic links to be copied, rather than
indirected through, and for
.Nm
+2
View File
@@ -130,6 +130,8 @@
/* we want to use the system malloc when we install as /bin/csh */
#define SYSMALLOC
#define BSD_STYLE_COLORLS
/* Use LC_MESSAGES locale category to open the message catalog */
#define MCLoadBySet NL_CAT_LOCALE
#endif
#if defined(__NetBSD__)
-166
View File
@@ -1,166 +0,0 @@
/* config.h. Generated by configure. */
/*
* config.h -- configure various defines for tcsh
*
* All source files should #include this FIRST.
*
* Edit this to match your system type.
*/
/* $FreeBSD$ */
#ifndef _h_config
#define _h_config
/****************** System dependant compilation flags ****************/
/*
* POSIX This system supports IEEE Std 1003.1-1988 (POSIX).
*/
#define POSIX
/*
* POSIXJOBS This system supports the optional IEEE Std 1003.1-1988 (POSIX)
* job control facilities.
*/
#define POSIXJOBS
/*
* POSIXSIGS Use the POSIX signal facilities to emulate BSD signals.
*/
/* #undef POSIXSIGS */
/*
* VFORK This machine has a vfork().
* It used to be that for job control to work, this define
* was mandatory. This is not the case any more.
* If you think you still need it, but you don't have vfork,
* define this anyway and then do #define vfork fork.
* I do this anyway on a Sun because of yellow pages brain damage,
* [should not be needed under 4.1]
* and on the iris4d cause SGI's fork is sufficiently "virtual"
* that vfork isn't necessary. (Besides, SGI's vfork is weird).
* Note that some machines eg. rs6000 have a vfork, but not
* with the berkeley semantics, so we cannot use it there either.
*/
#define VFORK
/*
* BSDJOBS You have BSD-style job control (both process groups and
* a tty that deals correctly
*/
#define BSDJOBS
/*
* BSDSIGS You have 4.2-style signals, rather than USG style.
* Note: POSIX systems should not define this unless they
* have sigvec() and friends (ie: 4.3BSD-RENO, HP-UX).
*/
#define BSDSIGS
/*
* BSDTIMES You have BSD-style process time stuff (like rusage)
* This may or may not be true. For example, Apple Unix
* (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
*/
#define BSDTIMES
/*
* BSDLIMIT You have BSD-style resource limit stuff (getrlimit/setrlimit)
*/
#define BSDLIMIT
/*
* BSDNICE Your system uses setpriority() instead of nice, to
* change a processes scheduling priority
*/
#define BSDNICE
/*
* TERMIO You have struct termio instead of struct sgttyb.
* This is usually the case for SYSV systems, where
* BSD uses sgttyb. POSIX systems should define this
* anyway, even though they use struct termios.
*/
#define TERMIO
/*
* SYSVREL Your machine is SYSV based (HPUX, A/UX)
* NOTE: don't do this if you are on a Pyramid -- tcsh is
* built in a BSD universe.
* Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
* you are running. Or set it to 0 if you are not SYSV based
*/
#define SYSVREL 0
/*
* YPBUGS Work around Sun YP bugs that cause expansion of ~username
* to send command output to /dev/null
*/
/* #undef YPBUGS */
/*
* SIGVOID Define this if your signal handlers return void. On older
* systems, signal returns int, but on newer ones, it returns void.
*/
#define SIGVOID
/*
* HAVEDUP2 Define this if your system supports dup2().
*/
#define HAVEDUP2
/*
* UTHOST Does the utmp file have a host field?
*/
#define UTHOST
/*
* DIRENT Your system has <dirent.h> instead of <sys/dir.h>
*/
#define DIRENT
/****************** local defines *********************/
/****************** configurable hacks ****************/
#include <stdlib.h>
/* have been moved to config_f.h */
#include "config_f.h"
#if defined(__FreeBSD__)
#define NLS_BUGS
/* we want to use the system malloc when we install as /bin/csh */
#define SYSMALLOC
#define BSD_STYLE_COLORLS
#endif
#if defined(__NetBSD__)
#include <sys/param.h>
#if __NetBSD_Version__ >= 106030000 /* NetBSD 1.6C */
#define HAVEUTMPX
#endif
#endif
#if defined(__bsdi__)
/*
* _PATH_TCSHELL if you've change the installation location (vix)
*/
#include <sys/param.h>
# ifdef _BSDI_VERSION >= 199701
# define _PATH_TCSHELL "/bin/tcsh"
/* # undef SYSMALLOC */
# define SYSMALLOC
# else
# define _PATH_TCSHELL "/usr/contrib/bin/tcsh"
# endif
/* # undef NLS */
/* # undef NLS_CATALOGS */
#elif defined(__APPLE__)
# define SYSMALLOC
#else
# define NLS_CATALOGS
#endif
#endif /* _h_config */
/* config.h.in. Generated automatically from configure.in by autoheader. */
+2 -2
View File
@@ -355,9 +355,9 @@ Finally the command:
.Pp
.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`date`"" ""+%s"""
.Pp
can be used to parse the ouput from
can be used to parse the output from
.Nm
and express it in epoch time.
and express it in Epoch time.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
+8 -5
View File
@@ -31,7 +31,7 @@
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
.\" $FreeBSD$
.\"
.Dd March 5, 2004
.Dd August 15, 2004
.Dt DD 1
.Os
.Sh NAME
@@ -89,8 +89,10 @@ When padding a block in conversion mode or due to use of
.Cm noerror
and
.Cm sync
modes, fill with the specified ASCII character, rather than using a space
or nul.
modes, fill with the specified
.Tn ASCII
character, rather than using a space or
.Dv NUL .
.It Cm ibs Ns = Ns Ar n
Set the input block size to
.Ar n
@@ -255,8 +257,9 @@ bytes (or with spaces if a block oriented conversion value was
specified) and processed as a normal input buffer.
If the
.Cm fillchar
option is specified, the fill char provided on the command line will override
the automatic selection of fill character.
option is specified, the fill character provided on the command line
will override
the automatic selection of the fill character.
If the
.Cm sync
conversion is not specified, the input block is omitted from the output.
+2 -1
View File
@@ -149,7 +149,8 @@ is set, the block counts will be displayed in units of that size block.
.Sh BUGS
The
.Fl n
flag is ignored if a file or file system is specified. Also, if a mount
flag is ignored if a file or file system is specified.
Also, if a mount
point is not accessible by the user, it is possible that the file system
information could be stale.
.Sh SEE ALSO
+3 -2
View File
@@ -1,3 +1,4 @@
.\"-
.\" Copyright (c) 1983, 1988, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -28,7 +29,7 @@
.\" @(#)hostname.1 8.2 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
.Dd April 28, 1995
.Dd May 12, 2005
.Dt HOSTNAME 1
.Os
.Sh NAME
@@ -45,7 +46,7 @@ utility prints the name of the current host.
The super-user can
set the hostname by supplying an argument; this is usually done in the
network initialization script
.Pa /etc/rc.network ,
.Pa /etc/rc.d/hostname ,
normally run at boot
time.
This script uses the
+8 -1
View File
@@ -31,10 +31,12 @@
.Nd dump or modify the kernel environment
.Sh SYNOPSIS
.Nm
.Op Fl h
.Op Fl hq
.Nm
.Op Fl q
.Ar variable Ns Op = Ns Ar value
.Nm
.Op Fl q
.Fl u
.Ar variable
.Sh DESCRIPTION
@@ -59,6 +61,11 @@ If the environment variable is followed by an optional
.Ar value ,
.Nm
will set the environment variable to this value.
.Pp
If the
.Fl q
option is set, warnings normally printed as a result of being unable to
perform the requested operation will be suppressed.
.Sh SEE ALSO
.Xr kenv 2 ,
.Xr loader 8
+12 -8
View File
@@ -42,15 +42,16 @@ static int ksetenv(char *, char *);
static int kunsetenv(char *);
static int hflag = 0;
static int qflag = 0;
static int uflag = 0;
static void
usage(void)
{
(void)fprintf(stderr, "%s\n%s\n%s\n",
"usage: kenv [-h]",
" kenv variable[=value]",
" kenv -u variable");
"usage: kenv [-hq]",
" kenv [-q] variable[=value]",
" kenv [-q] -u variable");
exit(1);
}
@@ -63,11 +64,14 @@ main(int argc, char **argv)
error = 0;
val = NULL;
env = NULL;
while ((ch = getopt(argc, argv, "hu")) != -1) {
while ((ch = getopt(argc, argv, "hqu")) != -1) {
switch (ch) {
case 'h':
hflag++;
break;
case 'q':
qflag++;
break;
case 'u':
uflag++;
break;
@@ -93,21 +97,21 @@ main(int argc, char **argv)
usage();
if (env == NULL) {
error = kdumpenv();
if (error)
if (error && !qflag)
warn("kdumpenv");
} else if (val == NULL) {
if (uflag) {
error = kunsetenv(env);
if (error)
if (error && !qflag)
warnx("unable to unset %s", env);
} else {
error = kgetenv(env);
if (error)
if (error && !qflag)
warnx("unable to get %s", env);
}
} else {
error = ksetenv(env, val);
if (error)
if (error && !qflag)
warnx("unable to set %s to %s", env, val);
}
return (error);
+49 -51
View File
@@ -31,7 +31,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
.Dd May 2, 2004
.Dd January 11, 2005
.Dt LS 1
.Os
.Sh NAME
@@ -176,27 +176,17 @@ using base 2 for sizes.
.It Fl i
For each file, print the file's file serial number (inode number).
.It Fl k
If the
.Fl s
option is specified, print the file size allocation in kilobytes,
not blocks.
This option overrides the environment variable
.Ev BLOCKSIZE .
Note that
.Fl k
is mutually exclusive to
.Fl h ,
and later
.Fl k
will nullify earlier
.Fl h .
This has the same effect as setting environment variable
.Ev BLOCKSIZE
to 1024, except that it also nullifies any
.Fl h
options to its left.
.It Fl l
(The lowercase letter
.Dq ell . )
List in long format.
(See below.)
If the output is to a terminal, a total sum for all the file
sizes is output on a line before the long listing.
List files in the long format, as described in the
.Sx The Long Format
subsection below.
.It Fl m
Stream output format; list files across the page, separated by commas.
.It Fl n
@@ -221,13 +211,12 @@ this is the default when output is to a terminal.
Reverse the order of the sort to get reverse
lexicographical order or the oldest entries first.
.It Fl s
Display the number of file system blocks actually used by each file, in units
of 512 bytes, where partial units are rounded up to the next integer value.
If the output is to a terminal, a total sum for all the file
sizes is output on a line before the listing.
The environment variable
.Ev BLOCKSIZE
overrides the unit size of 512 bytes.
Display the number of blocks used in the file system by each file.
Block sizes and directory totals are handled as described in
.Sx The Long Format
subsection below, except (if the long format is not also requested)
the directory totals are not output when the output is in a
single column, even if multi-column output is requested.
.It Fl t
Sort by time modified (most recently modified
first) before sorting the operands by lexicographical
@@ -313,10 +302,6 @@ number of bytes in the file, abbreviated
month, day-of-month file was last modified,
hour file last modified, minute file last
modified, and the pathname.
In addition, for each directory whose contents are displayed, the total
number of 512-byte blocks used by the files in the directory is displayed
on a line by itself immediately before the information for the files in the
directory.
.Pp
If the modification time of the file is more than 6 months
in the past or future, then the year of the last modification
@@ -335,6 +320,24 @@ If the file is a symbolic link the pathname of the
linked-to file is preceded by
.Dq Li -> .
.Pp
The listing of a directory's contents is preceded
by a labeled total number of blocks used in the file system by the files
which are listed as the directory's contents
(which may or may not include
.Pa \&.
and
.Pa ..
and other files which start with a dot, depending on other options).
.Pp
The default block size is 512 bytes.
The block size may be set with option
.Fl k
or environment variable
.Ev BLOCKSIZE .
Numbers of blocks in the output will have been rounded up so the
numbers of bytes is at least as many as used by the corresponding
file system blocks (which might have a different size).
.Pp
The file mode printed under the
.Fl l
option consists of the
@@ -436,21 +439,6 @@ utility does not show the actual ACL;
use
.Xr getfacl 1
to do this.
.Sh EXAMPLES
The following is how to do an
.Nm
listing sorted by size (and shows why
.Nm
does not need a separate option for this):
.Pp
.Dl "ls -l | sort -n +4"
.Pp
Additionally, the
.Fl r
flag to
.Xr sort 1
may be used
to get the results sorted from largest to smallest (a reverse sort).
.Sh DIAGNOSTICS
.Ex -std
.Sh ENVIRONMENT
@@ -458,12 +446,15 @@ The following environment variables affect the execution of
.Nm :
.Bl -tag -width ".Ev CLICOLOR_FORCE"
.It Ev BLOCKSIZE
If the environment variable
.Ev BLOCKSIZE
is set, the block counts
(see
.Fl s )
will be displayed in units of that size block.
If this is set, its value, rounded up to 512 or down to a
multiple of 512, will be used as the block size in bytes by the
.Fl l
and
.Fl s
options.
See
.Sx The Long Format
subsection for more information.
.It Ev CLICOLOR
Use
.Tn ANSI
@@ -673,3 +664,10 @@ command appeared in
.Sh BUGS
To maintain backward compatibility, the relationships between the many
options are quite complex.
.Pp
The exception mentioned in the
.Fl s
option description might be a feature that was
based on the fact that single-column output
usually goes to something other than a terminal.
It is debatable whether this is a design bug.
+1 -1
View File
@@ -147,7 +147,7 @@ build(char *path, mode_t omode)
else if (p[0] != '/')
continue;
*p = '\0';
if (p[1] == '\0')
if (!last && p[1] == '\0')
last = 1;
if (first) {
/*
+6 -2
View File
@@ -400,8 +400,10 @@ wr_archive(ARCHD *arcn, int is_app)
/*
* check if this file meets user specified options match.
*/
if (sel_chk(arcn) != 0)
if (sel_chk(arcn) != 0) {
ftree_notsel();
continue;
}
fd = -1;
if (uflag) {
/*
@@ -785,8 +787,10 @@ copy(void)
/*
* check if this file meets user specified options
*/
if (sel_chk(arcn) != 0)
if (sel_chk(arcn) != 0) {
ftree_notsel();
continue;
}
/*
* if there is already a file in the destination directory with
+1
View File
@@ -155,6 +155,7 @@ int set_crc(ARCHD *, int);
int ftree_start(void);
int ftree_add(char *, int);
void ftree_sel(ARCHD *);
void ftree_notsel(void);
void ftree_chk(void);
int next_file(ARCHD *);
+12
View File
@@ -213,6 +213,18 @@ ftree_sel(ARCHD *arcn)
(void)fts_set(ftsp, ftent, FTS_SKIP);
}
/*
* ftree_notsel()
* this entry has not been selected by pax.
*/
void
ftree_notsel()
{
if (ftent != NULL)
(void)fts_set(ftsp, ftent, FTS_SKIP);
}
/*
* ftree_chk()
* called at end on pax execution. Prints all those file args that did not
+30 -18
View File
@@ -387,7 +387,13 @@ tar_rd(ARCHD *arcn, char *buf)
* copy out the name and values in the stat buffer
*/
hd = (HD_TAR *)buf;
arcn->nlen = l_strncpy(arcn->name, hd->name, sizeof(arcn->name) - 1);
/*
* old tar format specifies the name always be null-terminated,
* but let's be robust to broken archives.
* the same applies to handling links below.
*/
arcn->nlen = l_strncpy(arcn->name, hd->name,
MIN(sizeof(hd->name), sizeof(arcn->name)) - 1);
arcn->name[arcn->nlen] = '\0';
arcn->sb.st_mode = (mode_t)(asc_ul(hd->mode,sizeof(hd->mode),OCT) &
0xfff);
@@ -417,7 +423,7 @@ tar_rd(ARCHD *arcn, char *buf)
*/
arcn->type = PAX_SLK;
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
sizeof(arcn->ln_name) - 1);
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name)) - 1);
arcn->ln_name[arcn->ln_nlen] = '\0';
arcn->sb.st_mode |= S_IFLNK;
break;
@@ -429,7 +435,7 @@ tar_rd(ARCHD *arcn, char *buf)
arcn->type = PAX_HLK;
arcn->sb.st_nlink = 2;
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
sizeof(arcn->ln_name) - 1);
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name)) - 1);
arcn->ln_name[arcn->ln_nlen] = '\0';
/*
@@ -533,7 +539,7 @@ tar_wr(ARCHD *arcn)
case PAX_SLK:
case PAX_HLK:
case PAX_HRG:
if (arcn->ln_nlen > (int)sizeof(hd->linkname)) {
if (arcn->ln_nlen >= (int)sizeof(hd->linkname)) {
paxwarn(1,"Link name too long for tar %s", arcn->ln_name);
return(1);
}
@@ -749,12 +755,19 @@ ustar_rd(ARCHD *arcn, char *buf)
*/
dest = arcn->name;
if (*(hd->prefix) != '\0') {
cnt = l_strncpy(dest, hd->prefix, sizeof(arcn->name) - 2);
cnt = l_strncpy(dest, hd->prefix,
MIN(sizeof(hd->prefix), sizeof(arcn->name) - 2));
dest += cnt;
*dest++ = '/';
cnt++;
}
arcn->nlen = cnt + l_strncpy(dest, hd->name, sizeof(arcn->name) - cnt);
/*
* ustar format specifies the name may be unterminated
* if it fills the entire field. this also applies to
* the prefix and the linkname.
*/
arcn->nlen = cnt + l_strncpy(dest, hd->name,
MIN(sizeof(hd->name), sizeof(arcn->name) - cnt - 1));
arcn->name[arcn->nlen] = '\0';
/*
@@ -848,7 +861,7 @@ ustar_rd(ARCHD *arcn, char *buf)
* copy the link name
*/
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
sizeof(arcn->ln_name) - 1);
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name) - 1));
arcn->ln_name[arcn->ln_nlen] = '\0';
break;
case CONTTYPE:
@@ -900,7 +913,7 @@ ustar_wr(ARCHD *arcn)
*/
if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
(arcn->type == PAX_HRG)) &&
(arcn->ln_nlen >= (int)sizeof(hd->linkname))) {
(arcn->ln_nlen > (int)sizeof(hd->linkname))) {
paxwarn(1, "Link name too long for ustar %s", arcn->ln_name);
return(1);
}
@@ -925,17 +938,16 @@ ustar_wr(ARCHD *arcn)
* occur, we remove the / and copy the first part to the prefix
*/
*pt = '\0';
l_strncpy(hd->prefix, arcn->name, sizeof(hd->prefix) - 1);
l_strncpy(hd->prefix, arcn->name, sizeof(hd->prefix));
*pt++ = '/';
} else
memset(hd->prefix, 0, sizeof(hd->prefix));
/*
* copy the name part. this may be the whole path or the part after
* the prefix
* the prefix. both the name and prefix may fill the entire field.
*/
l_strncpy(hd->name, pt, sizeof(hd->name) - 1);
hd->name[sizeof(hd->name) - 1] = '\0';
l_strncpy(hd->name, pt, sizeof(hd->name));
/*
* set the fields in the header that are type dependent
@@ -978,8 +990,8 @@ ustar_wr(ARCHD *arcn)
hd->typeflag = SYMTYPE;
else
hd->typeflag = LNKTYPE;
l_strncpy(hd->linkname,arcn->ln_name, sizeof(hd->linkname) - 1);
hd->linkname[sizeof(hd->linkname) - 1] = '\0';
/* the link name may occupy the entire field in ustar */
l_strncpy(hd->linkname,arcn->ln_name, sizeof(hd->linkname));
memset(hd->devmajor, 0, sizeof(hd->devmajor));
memset(hd->devminor, 0, sizeof(hd->devminor));
if (ul_oct((u_long)0L, hd->size, sizeof(hd->size), 3))
@@ -1072,9 +1084,9 @@ name_split(char *name, int len)
* check to see if the file name is small enough to fit in the name
* field. if so just return a pointer to the name.
*/
if (len < TNMSZ)
if (len <= TNMSZ)
return(name);
if (len > (TPFSZ + TNMSZ))
if (len > (TPFSZ + TNMSZ + 1))
return(NULL);
/*
@@ -1083,7 +1095,7 @@ name_split(char *name, int len)
* to find the biggest piece to fit in the name field (or the smallest
* prefix we can find)
*/
start = name + len - TNMSZ;
start = name + len - TNMSZ - 1;
while ((*start != '\0') && (*start != '/'))
++start;
@@ -1101,7 +1113,7 @@ name_split(char *name, int len)
* the file would then expand on extract to //str. The len == 0 below
* makes this special case follow the spec to the letter.
*/
if ((len >= TPFSZ) || (len == 0))
if ((len > TPFSZ) || (len == 0))
return(NULL);
/*
+1 -3
View File
@@ -3,7 +3,7 @@
PROG= ps
SRCS= fmt.c keyword.c nlist.c print.c ps.c
WARNS?= 5
#
# To support "lazy" ps for non root/wheel users
# add -DLAZY_PS to the cflags. This helps
@@ -13,7 +13,5 @@ WARNS?= 5
CFLAGS+=-DLAZY_PS
DPADD= ${LIBM} ${LIBKVM}
LDADD= -lm -lkvm
#BINGRP= kmem
#BINMODE=2555
.include <bsd.prog.mk>
+1 -1
View File
@@ -157,7 +157,7 @@ static VAR var[] = {
UINT, UIDFMT, 0},
{"rgroup", "RGROUP", NULL, LJUST|DSIZ, rgroupname, s_rgroupname,
USERLEN, 0, CHAR, NULL, 0},
{"rss", "RSS", NULL, 0, kvar, NULL, 4, KOFF(ki_rssize), PGTOK, "ld", 0},
{"rss", "RSS", NULL, 0, kvar, NULL, 5, KOFF(ki_rssize), PGTOK, "ld", 0},
{"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR,
NULL, 0},
{"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid),
+8 -10
View File
@@ -1,3 +1,4 @@
.\"-
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -37,14 +38,13 @@
.Sh SYNOPSIS
.Nm
.Op Fl aCcefHhjlmrSTuvwXxZ
.Op Fl O Ar fmt | Fl o Ar fmt
.Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
.Op Fl M Ar core
.Op Fl N Ar system
.Op Fl O Ar fmt
.Op Fl o Ar fmt
.Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ...
.Op Fl t Ar tty Ns Op , Ns Ar tty Ns Ar ...
.Op Fl U Ar username Ns Op , Ns Ar username Ns Ar ...
.Op Fl U Ar user Ns Op , Ns Ar user Ns Ar ...
.Nm
.Op Fl L
.Sh DESCRIPTION
@@ -103,7 +103,7 @@ The options are as follows:
.Bl -tag -width indent
.It Fl a
Display information about other users' processes as well as your own.
This will skip any processes which do not have a controlling teminal,
This will skip any processes which do not have a controlling terminal,
unless the
.Fl x
option is also specified.
@@ -249,7 +249,9 @@ are specified in the same command, then
.Nm
will use the one which was specified last.
.It Fl Z
Add label to the list of keywords for which
Add
.Xr mac 4
label to the list of keywords for which
.Nm
will display information.
.El
@@ -601,10 +603,6 @@ attempts to automatically determine the terminal width.
.El
.Sh FILES
.Bl -tag -width ".Pa /boot/kernel/kernel" -compact
.It Pa /dev/lomac
interface used to query the
.Xr lomac 4
KLD
.It Pa /boot/kernel/kernel
default system namelist
.It Pa /proc
@@ -618,7 +616,7 @@ the mount point of
.Xr w 1 ,
.Xr kvm 3 ,
.Xr strftime 3 ,
.Xr lomac 4 ,
.Xr mac 4 ,
.Xr procfs 5 ,
.Xr pstat 8 ,
.Xr sysctl 8 ,
+25 -3
View File
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/sysctl.h>
#include <sys/mount.h>
#include <ctype.h>
#include <err.h>
@@ -128,6 +129,7 @@ struct listinfo {
} l;
};
static int check_procfs(void);
static int addelem_gid(struct listinfo *, const char *);
static int addelem_pid(struct listinfo *, const char *);
static int addelem_tty(struct listinfo *, const char *);
@@ -403,6 +405,14 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
/*
* If the user specified ps -e then they want a copy of the process
* environment kvm_getenvv(3) attempts to open /proc/<pid>/mem.
* Check to make sure that procfs is mounted on /proc, otherwise
* print a warning informing the user that output will be incomplete.
*/
if (needenv == 1 && check_procfs() == 0)
warnx("Process environment requires procfs(5)");
/*
* If there arguments after processing all the options, attempt
* to treat them as a list of process ids.
@@ -1176,15 +1186,27 @@ kludge_oldps_options(const char *optlist, char *origval, const char *nextarg)
return (newopts);
}
static int
check_procfs(void)
{
struct statfs mnt;
if (statfs("/proc", &mnt) < 0)
return (0);
if (strcmp(mnt.f_fstypename, "procfs") != 0)
return (0);
return (1);
}
static void
usage(void)
{
#define SINGLE_OPTS "[-aCc" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
#define SINGLE_OPTS "[-aCce" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
"usage: ps " SINGLE_OPTS " [-G gid[,gid]] [-O|o fmt]",
" [-p pid[,pid]] [-t tty[,tty]] [-U user[,user]]",
"usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]",
" [-M core] [-N system]",
" [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]",
" ps [-L]");
exit(1);
}
-1
View File
@@ -2,7 +2,6 @@
# $FreeBSD$
PROG= rm
SRCS= rm.c
LINKS= ${BINDIR}/rm ${BINDIR}/unlink
MLINKS= rm.1 unlink.1
+33 -20
View File
@@ -1,3 +1,4 @@
.\"-
.\" Copyright (c) 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -31,7 +32,7 @@
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
.\" $FreeBSD$
.\"
.Dd January 28, 1999
.Dd September 29, 2005
.Dt RM 1
.Os
.Sh NAME
@@ -40,7 +41,8 @@
.Nd remove directory entries
.Sh SYNOPSIS
.Nm
.Op Fl dfiPRrvW
.Op Fl f | i
.Op Fl dIPRrvW
.Ar
.Nm unlink
.Ar file
@@ -76,10 +78,20 @@ The
option overrides any previous
.Fl f
options.
.It Fl I
Request confirmation once if more than three files are being removed or if a
directory is being recursively removed.
This is a far less intrusive option than
.Fl i
yet provides almost the same level of protection against mistakes.
.It Fl P
Overwrite regular files before deleting them.
Files are overwritten three times, first with the byte pattern 0xff,
then 0x00, and then 0xff again, before they are deleted.
Specifying this flag for a read only file will cause
.Nm
to generate an error message and exit.
The file will not be removed or overwritten.
.It Fl R
Attempt to remove the file hierarchy rooted in each file argument.
The
@@ -111,9 +123,10 @@ The
utility removes symbolic links, not the files referenced by the links.
.Pp
It is an error to attempt to remove the files
.Dq .\&
.Pa / ,
.Pa .\&
or
.Dq .. .
.Pa .. .
.Pp
When the utility is called as
.Nm unlink ,
@@ -155,22 +168,6 @@ path reference.
For example:
.Dl rm /home/user/-filename
.Dl rm ./-filename
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.
.Sh COMPATIBILITY
The
.Nm
@@ -186,6 +183,14 @@ Also, historical
.Bx
implementations prompted on the standard output,
not the standard error output.
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh STANDARDS
The
.Nm
@@ -201,3 +206,11 @@ A
.Nm
command appeared in
.At v1 .
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.
+100 -12
View File
@@ -58,10 +58,13 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok;
int rflag, Iflag;
uid_t uid;
int check(char *, char *, struct stat *);
int check2(char **);
void checkdot(char **);
void checkslash(char **);
void rm_file(char **);
int rm_overwrite(char *, struct stat *);
void rm_tree(char **);
@@ -70,14 +73,14 @@ void usage(void);
/*
* rm --
* This rm is different from historic rm's, but is expected to match
* POSIX 1003.2 behavior. The most visible difference is that -f
* POSIX 1003.2 behavior. The most visible difference is that -f
* has two specific effects now, ignore non-existent files and force
* file removal.
* file removal.
*/
int
main(int argc, char *argv[])
{
int ch, rflag;
int ch;
char *p;
/*
@@ -101,7 +104,7 @@ main(int argc, char *argv[])
}
Pflag = rflag = 0;
while ((ch = getopt(argc, argv, "dfiPRrvW")) != -1)
while ((ch = getopt(argc, argv, "dfiIPRrvW")) != -1)
switch(ch) {
case 'd':
dflag = 1;
@@ -114,6 +117,9 @@ main(int argc, char *argv[])
fflag = 0;
iflag = 1;
break;
case 'I':
Iflag = 1;
break;
case 'P':
Pflag = 1;
break;
@@ -140,11 +146,17 @@ main(int argc, char *argv[])
}
checkdot(argv);
if (getenv("POSIXLY_CORRECT") == NULL)
checkslash(argv);
uid = geteuid();
if (*argv) {
stdin_ok = isatty(STDIN_FILENO);
if (Iflag) {
if (check2(argv) == 0)
exit (1);
}
if (rflag)
rm_tree(argv);
else
@@ -180,8 +192,11 @@ rm_tree(char **argv)
flags |= FTS_NOSTAT;
if (Wflag)
flags |= FTS_WHITEOUT;
if (!(fts = fts_open(argv, flags, NULL)))
if (!(fts = fts_open(argv, flags, NULL))) {
if (fflag && errno == ENOENT)
return;
err(1, "fts_open");
}
while ((p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_DNR:
@@ -292,6 +307,7 @@ err:
}
if (errno)
err(1, "fts_read");
fts_close(fts);
}
void
@@ -434,14 +450,11 @@ check(char *path, char *name, struct stat *sp)
else {
/*
* If it's not a symbolic link and it's unwritable and we're
* talking to a terminal, ask. Symbolic links are excluded
* talking to a terminal, ask. Symbolic links are excluded
* because their permissions are meaningless. Check stdin_ok
* first because we may not have stat'ed the file.
* Also skip this check if the -P option was specified because
* we will not be able to overwrite file contents and will
* barf later.
*/
if (!stdin_ok || S_ISLNK(sp->st_mode) || Pflag ||
if (!stdin_ok || S_ISLNK(sp->st_mode) ||
(!access(name, W_OK) &&
!(sp->st_flags & (SF_APPEND|SF_IMMUTABLE)) &&
(!(sp->st_flags & (UF_APPEND|UF_IMMUTABLE)) || !uid)))
@@ -449,11 +462,15 @@ check(char *path, char *name, struct stat *sp)
strmode(sp->st_mode, modep);
if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
err(1, "fflagstostr");
if (Pflag)
errx(1,
"%s: -P was specified, but file is not writable",
path);
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
modep + 1, modep[9] == ' ' ? "" : " ",
user_from_uid(sp->st_uid, 0),
group_from_gid(sp->st_gid, 0),
*flagsp ? flagsp : "", *flagsp ? " " : "",
*flagsp ? flagsp : "", *flagsp ? " " : "",
path);
free(flagsp);
}
@@ -465,6 +482,77 @@ check(char *path, char *name, struct stat *sp)
return (first == 'y' || first == 'Y');
}
#define ISSLASH(a) ((a)[0] == '/' && (a)[1] == '\0')
void
checkslash(char **argv)
{
char **t, **u;
int complained;
complained = 0;
for (t = argv; *t;) {
if (ISSLASH(*t)) {
if (!complained++)
warnx("\"/\" may not be removed");
eval = 1;
for (u = t; u[0] != NULL; ++u)
u[0] = u[1];
} else {
++t;
}
}
}
int
check2(char **argv)
{
struct stat st;
int first;
int ch;
int fcount = 0;
int dcount = 0;
int i;
const char *dname = NULL;
for (i = 0; argv[i]; ++i) {
if (lstat(argv[i], &st) == 0) {
if (S_ISDIR(st.st_mode)) {
++dcount;
dname = argv[i]; /* only used if 1 dir */
} else {
++fcount;
}
}
}
first = 0;
while (first != 'n' && first != 'N' && first != 'y' && first != 'Y') {
if (dcount && rflag) {
fprintf(stderr, "recursively remove");
if (dcount == 1)
fprintf(stderr, " %s", dname);
else
fprintf(stderr, " %d dirs", dcount);
if (fcount == 1)
fprintf(stderr, " and 1 file");
else if (fcount > 1)
fprintf(stderr, " and %d files", fcount);
} else if (dcount + fcount > 3) {
fprintf(stderr, "remove %d files", dcount + fcount);
} else {
return(1);
}
fprintf(stderr, "? ");
fflush(stderr);
first = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (ch == EOF)
break;
}
return (first == 'y' || first == 'Y');
}
#define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
void
checkdot(char **argv)
@@ -495,7 +583,7 @@ usage(void)
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: rm [-f | -i] [-dPRrvW] file ...",
"usage: rm [-f | -i] [-dIPRrvW] file ...",
" unlink file");
exit(EX_USAGE);
}
+8 -7
View File
@@ -78,15 +78,14 @@ main(int argc, char *argv[])
usage();
for (errors = 0; *argv; argv++) {
if (pflag) {
errors |= rm_path(*argv);
if (rmdir(*argv) < 0) {
warn("%s", *argv);
errors = 1;
} else {
if (rmdir(*argv) < 0) {
warn("%s", *argv);
errors = 1;
}
if (vflag)
printf("%s\n", *argv);
if (pflag)
errors |= rm_path(*argv);
}
}
@@ -104,9 +103,11 @@ rm_path(char *path)
*++p = '\0';
while ((p = strrchr(path, '/')) != NULL) {
/* Delete trailing slashes. */
while (--p > path && *p == '/')
while (--p >= path && *p == '/')
;
*++p = '\0';
if (p == path)
break;
if (rmdir(path) < 0) {
warn("%s", path);
+1 -1
View File
@@ -242,7 +242,7 @@ unaliascmd(int argc __unused, char **argv __unused)
}
}
for (i = 0; *argptr; argptr++)
i = unalias(*argptr);
i |= unalias(*argptr);
return (i);
}
+1
View File
@@ -77,6 +77,7 @@ returncmd return
setcmd set
setvarcmd setvar
shiftcmd shift
timescmd times
trapcmd trap
truecmd : true
typecmd type
+55 -13
View File
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
#include <sys/wait.h> /* For WIFSIGNALED(status) */
#include <errno.h>
@@ -90,8 +91,8 @@ int exitstatus; /* exit status of last command */
int oexitstatus; /* saved exit status */
STATIC void evalloop(union node *);
STATIC void evalfor(union node *);
STATIC void evalloop(union node *, int);
STATIC void evalfor(union node *, int);
STATIC void evalcase(union node *, int);
STATIC void evalsubshell(union node *, int);
STATIC void expredir(union node *);
@@ -182,6 +183,9 @@ evalstring(char *s)
void
evaltree(union node *n, int flags)
{
int do_etest;
do_etest = 0;
if (n == NULL) {
TRACE(("evaltree(NULL) called\n"));
exitstatus = 0;
@@ -193,7 +197,7 @@ evaltree(union node *n, int flags)
TRACE(("evaltree(0x%lx: %d) called\n", (long)n, n->type));
switch (n->type) {
case NSEMI:
evaltree(n->nbinary.ch1, 0);
evaltree(n->nbinary.ch1, flags & ~EV_EXIT);
if (evalskip)
goto out;
evaltree(n->nbinary.ch2, flags);
@@ -219,6 +223,7 @@ evaltree(union node *n, int flags)
break;
case NSUBSHELL:
evalsubshell(n, flags);
do_etest = !(flags & EV_TESTED);
break;
case NBACKGND:
evalsubshell(n, flags);
@@ -237,10 +242,10 @@ evaltree(union node *n, int flags)
}
case NWHILE:
case NUNTIL:
evalloop(n);
evalloop(n, flags & ~EV_EXIT);
break;
case NFOR:
evalfor(n);
evalfor(n, flags & ~EV_EXIT);
break;
case NCASE:
evalcase(n, flags);
@@ -256,9 +261,11 @@ evaltree(union node *n, int flags)
case NPIPE:
evalpipe(n);
do_etest = !(flags & EV_TESTED);
break;
case NCMD:
evalcommand(n, flags, (struct backcmd *)NULL);
do_etest = !(flags & EV_TESTED);
break;
default:
out1fmt("Node type = %d\n", n->type);
@@ -268,15 +275,13 @@ evaltree(union node *n, int flags)
out:
if (pendingsigs)
dotrap();
if ((flags & EV_EXIT) || (eflag && exitstatus
&& !(flags & EV_TESTED) && (n->type == NCMD ||
n->type == NSUBSHELL)))
if ((flags & EV_EXIT) || (eflag && exitstatus != 0 && do_etest))
exitshell(exitstatus);
}
STATIC void
evalloop(union node *n)
evalloop(union node *n, int flags)
{
int status;
@@ -300,7 +305,7 @@ skipping: if (evalskip == SKIPCONT && --skipcount <= 0) {
if (exitstatus == 0)
break;
}
evaltree(n->nbinary.ch2, 0);
evaltree(n->nbinary.ch2, flags);
status = exitstatus;
if (evalskip)
goto skipping;
@@ -312,7 +317,7 @@ skipping: if (evalskip == SKIPCONT && --skipcount <= 0) {
STATIC void
evalfor(union node *n)
evalfor(union node *n, int flags)
{
struct arglist arglist;
union node *argp;
@@ -333,7 +338,7 @@ evalfor(union node *n)
loopnest++;
for (sp = arglist.list ; sp ; sp = sp->next) {
setvar(n->nfor.var, sp->text, 0);
evaltree(n->nfor.body, 0);
evaltree(n->nfor.body, flags);
if (evalskip) {
if (evalskip == SKIPCONT && --skipcount <= 0) {
evalskip = 0;
@@ -972,6 +977,7 @@ commandcmd(int argc, char **argv)
struct strlist *sp;
char *path;
int ch;
int cmd = -1;
for (sp = cmdenviron; sp ; sp = sp->next)
setvareq(sp->text, VEXPORT|VSTACK);
@@ -979,11 +985,17 @@ commandcmd(int argc, char **argv)
optind = optreset = 1;
opterr = 0;
while ((ch = getopt(argc, argv, "p")) != -1) {
while ((ch = getopt(argc, argv, "pvV")) != -1) {
switch (ch) {
case 'p':
path = stdpath;
break;
case 'v':
cmd = TYPECMD_SMALLV;
break;
case 'V':
cmd = TYPECMD_BIGV;
break;
case '?':
default:
error("unknown option: -%c", optopt);
@@ -992,6 +1004,11 @@ commandcmd(int argc, char **argv)
argc -= optind;
argv += optind;
if (cmd != -1) {
if (argc != 1)
error("wrong number of arguments");
return typecmd_impl(2, argv - 1, cmd);
}
if (argc != 0) {
old = handler;
handler = &loc;
@@ -1062,3 +1079,28 @@ execcmd(int argc, char **argv)
}
return 0;
}
int
timescmd(int argc __unused, char **argv __unused)
{
struct rusage ru;
long shumins, shsmins, chumins, chsmins;
double shusecs, shssecs, chusecs, chssecs;
if (getrusage(RUSAGE_SELF, &ru) < 0)
return 1;
shumins = ru.ru_utime.tv_sec / 60;
shusecs = ru.ru_utime.tv_sec % 60 + ru.ru_utime.tv_usec / 1000000.;
shsmins = ru.ru_stime.tv_sec / 60;
shssecs = ru.ru_stime.tv_sec % 60 + ru.ru_stime.tv_usec / 1000000.;
if (getrusage(RUSAGE_CHILDREN, &ru) < 0)
return 1;
chumins = ru.ru_utime.tv_sec / 60;
chusecs = ru.ru_utime.tv_sec % 60 + ru.ru_utime.tv_usec / 1000000.;
chsmins = ru.ru_stime.tv_sec / 60;
chssecs = ru.ru_stime.tv_sec % 60 + ru.ru_stime.tv_usec / 1000000.;
out1fmt("%ldm%.3fs %ldm%.3fs\n%ldm%.3fs %ldm%.3fs\n", shumins,
shusecs, shsmins, shssecs, chumins, chusecs, chsmins, chssecs);
return 0;
}
+1
View File
@@ -56,6 +56,7 @@ int returncmd(int, char **);
int falsecmd(int, char **);
int truecmd(int, char **);
int execcmd(int, char **);
int timescmd(int, char **);
int commandcmd(int, char **);
/* in_function returns nonzero if we are currently evaluating a function */
+48 -13
View File
@@ -701,15 +701,16 @@ unsetfunc(char *name)
delete_cmd_entry();
return (0);
}
return (1);
return (0);
}
/*
* Locate and print what a word is...
* Shared code for the following builtin commands:
* type, command -v, command -V
*/
int
typecmd(int argc, char **argv)
typecmd_impl(int argc, char **argv, int cmd)
{
struct cmdentry entry;
struct tblentry *cmdp;
@@ -720,20 +721,28 @@ typecmd(int argc, char **argv)
extern char *const parsekwd[];
for (i = 1; i < argc; i++) {
out1str(argv[i]);
if (cmd != TYPECMD_SMALLV)
out1str(argv[i]);
/* First look at the keywords */
for (pp = (char **)parsekwd; *pp; pp++)
if (**pp == *argv[i] && equal(*pp, argv[i]))
break;
if (*pp) {
out1str(" is a shell keyword\n");
if (cmd == TYPECMD_SMALLV)
out1fmt("%s\n", argv[i]);
else
out1str(" is a shell keyword\n");
continue;
}
/* Then look at the aliases */
if ((ap = lookupalias(argv[i], 1)) != NULL) {
out1fmt(" is an alias for %s\n", ap->val);
if (cmd == TYPECMD_SMALLV)
out1fmt("alias %s='%s'\n", argv[i], ap->val);
else
out1fmt(" is an alias for %s\n", ap->val);
continue;
}
@@ -756,29 +765,55 @@ typecmd(int argc, char **argv)
name = padvance(&path, argv[i]);
stunalloc(name);
} while (--j >= 0);
out1fmt(" is%s %s\n",
cmdp ? " a tracked alias for" : "", name);
if (cmd == TYPECMD_SMALLV)
out1fmt("%s\n", name);
else
out1fmt(" is%s %s\n",
(cmdp && cmd == TYPECMD_TYPE) ?
" a tracked alias for" : "",
name);
} else {
if (access(argv[i], X_OK) == 0)
out1fmt(" is %s\n", argv[i]);
if (access(argv[i], X_OK) == 0) {
if (cmd == TYPECMD_SMALLV)
out1fmt("%s\n", argv[i]);
else
out1fmt(" is %s\n", argv[i]);
}
else
out1fmt(": %s\n", strerror(errno));
}
break;
}
case CMDFUNCTION:
out1str(" is a shell function\n");
if (cmd == TYPECMD_SMALLV)
out1fmt("%s\n", argv[i]);
else
out1str(" is a shell function\n");
break;
case CMDBUILTIN:
out1str(" is a shell builtin\n");
if (cmd == TYPECMD_SMALLV)
out1fmt("%s\n", argv[i]);
else
out1str(" is a shell builtin\n");
break;
default:
out1str(": not found\n");
if (cmd != TYPECMD_SMALLV)
out1str(": not found\n");
error |= 127;
break;
}
}
return error;
}
/*
* Locate and print what a word is...
*/
int
typecmd(int argc, char **argv)
{
return typecmd_impl(argc, argv, TYPECMD_TYPE);
}
+7
View File
@@ -39,6 +39,12 @@
#define CMDBUILTIN 1 /* command is a shell builtin */
#define CMDFUNCTION 2 /* command is a shell function */
/* values for typecmd_impl's third parameter */
enum {
TYPECMD_SMALLV, /* command -v */
TYPECMD_BIGV, /* command -V */
TYPECMD_TYPE /* type */
};
struct cmdentry {
int cmdtype;
@@ -63,5 +69,6 @@ void deletefuncs(void);
void addcmdentry(char *, struct cmdentry *);
void defun(char *, union node *);
int unsetfunc(char *);
int typecmd_impl(int, char **, int);
int typecmd(int, char **);
void clearcmdentry(int);
+1 -1
View File
@@ -1162,7 +1162,7 @@ expmeta(char *enddir, char *name)
if (*p == '\0')
break;
}
if (metaflag == 0 || stat(expdir, &statb) >= 0)
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
addfname(expdir);
return;
}
+2 -1
View File
@@ -926,7 +926,8 @@ dowait(int block, struct job *job)
in_dowait--;
if (breakwaitcmd != 0) {
breakwaitcmd = 0;
return -1;
if (pid <= 0)
return -1;
}
if (pid <= 0)
return pid;
+16 -2
View File
@@ -57,7 +57,10 @@ ckmalloc(int nbytes)
{
pointer p;
if ((p = malloc(nbytes)) == NULL)
INTOFF;
p = malloc(nbytes);
INTON;
if (p == NULL)
error("Out of space");
return p;
}
@@ -70,11 +73,22 @@ ckmalloc(int nbytes)
pointer
ckrealloc(pointer p, int nbytes)
{
if ((p = realloc(p, nbytes)) == NULL)
INTOFF;
p = realloc(p, nbytes);
INTON;
if (p == NULL)
error("Out of space");
return p;
}
void
ckfree(pointer p)
{
INTOFF;
free(p);
INTON;
}
/*
* Make a copy of a string in safe storage.
+1 -2
View File
@@ -48,6 +48,7 @@ extern int herefd;
pointer ckmalloc(int);
pointer ckrealloc(pointer, int);
void ckfree(pointer);
char *savestr(char *);
pointer stalloc(int);
void stunalloc(pointer);
@@ -72,5 +73,3 @@ void ungrabstackstr(char *, char *);
#define STTOPC(p) p[-1]
#define STADJUST(amount, p) (p += (amount), sstrnleft -= (amount))
#define grabstackstr(p) stalloc(stackblocksize() - sstrnleft)
#define ckfree(p) free((pointer)(p))
+3 -1
View File
@@ -270,18 +270,20 @@ umaskcmd(int argc __unused, char **argv)
mask = 0;
do {
if (*ap >= '8' || *ap < '0')
error("Illegal number: %s", argv[1]);
error("Illegal number: %s", *argptr);
mask = (mask << 3) + (*ap - '0');
} while (*++ap != '\0');
umask(mask);
} else {
void *set;
INTOFF;
if ((set = setmode (ap)) == 0)
error("Illegal number: %s", ap);
mask = getmode (set, ~mask & 0777);
umask(~mask & 0777);
free(set);
INTON;
}
}
return 0;
+8 -11
View File
@@ -196,7 +196,7 @@ options(int cmdline)
STATIC void
minus_o(char *name, int val)
{
int doneset, i;
int i;
if (name == NULL) {
if (val) {
@@ -207,16 +207,13 @@ minus_o(char *name, int val)
optlist[i].val ? "on" : "off");
} else {
/* Output suitable for re-input to shell. */
for (doneset = i = 0; i < NOPTS; i++)
if (optlist[i].val) {
if (!doneset) {
out1str("set");
doneset = 1;
}
out1fmt(" -o %s", optlist[i].name);
}
if (doneset)
out1c('\n');
for (i = 0; i < NOPTS; i++) {
if (i % 6 == 0)
out1str(i == 0 ? "set" : "\nset");
out1fmt(" %co %s", optlist[i].val ? '-' : '+',
optlist[i].name);
}
out1c('\n');
}
} else {
for (i = 0; i < NOPTS; i++)
+4
View File
@@ -134,6 +134,10 @@ outqstr(const char *p, struct output *file)
{
char ch;
if (p[0] == '\0') {
outstr("''", file);
return;
}
if (p[strcspn(p, "|&;<>()$`\\\"'")] == '\0' && (!ifsset() ||
p[strcspn(p, ifsval())] == '\0')) {
outstr(p, file);
+91 -4
View File
@@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$");
* Shell command parser.
*/
#define EOFMARKLEN 79
#define EOFMARKLEN 79
#define PROMPTLEN 128
/* values returned by readtoken */
#include "token.h"
@@ -1562,14 +1563,100 @@ setprompt(int which)
char *
getprompt(void *unused __unused)
{
static char ps[PROMPTLEN];
char *fmt;
int i, j, trim;
/*
* Select prompt format.
*/
switch (whichprompt) {
case 0:
return "";
fmt = "";
break;
case 1:
return ps1val();
fmt = ps1val();
break;
case 2:
return ps2val();
fmt = ps2val();
break;
default:
return "<internal prompt error>";
}
/*
* Format prompt string.
*/
for (i = 0; (i < 127) && (*fmt != '\0'); i++, fmt++)
if (*fmt == '\\')
switch (*++fmt) {
/*
* Hostname.
*
* \h specifies just the local hostname,
* \H specifies fully-qualified hostname.
*/
case 'h':
case 'H':
ps[i] = '\0';
gethostname(&ps[i], PROMPTLEN - i);
/* Skip to end of hostname. */
trim = (*fmt == 'h') ? '.' : '\0';
while ((ps[i+1] != '\0') && (ps[i+1] != trim))
i++;
break;
/*
* Working directory.
*
* \W specifies just the final component,
* \w specifies the entire path.
*/
case 'W':
case 'w':
ps[i] = '\0';
getcwd(&ps[i], PROMPTLEN - i);
if (*fmt == 'W') {
/* Final path component only. */
trim = 1;
for (j = i; ps[j] != '\0'; j++)
if (ps[j] == '/')
trim = j + 1;
memmove(&ps[i], &ps[trim],
j - trim + 1);
}
/* Skip to end of path. */
while (ps[i + 1] != '\0')
i++;
break;
/*
* Superuser status.
*
* '$' for normal users, '#' for root.
*/
case '$':
ps[i] = (geteuid() != 0) ? '$' : '#';
break;
/*
* A literal \.
*/
case '\\':
ps[i] = '\\';
break;
/*
* Emit unrecognized formats verbatim.
*/
default:
ps[i++] = '\\';
ps[i] = *fmt;
break;
}
else
ps[i] = *fmt;
ps[i] = '\0';
return (ps);
}
+234 -60
View File
@@ -1,3 +1,4 @@
.\"-
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -31,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
.Dd July 3, 2004
.Dd December 8, 2005
.Dt SH 1
.Os
.Sh NAME
@@ -97,7 +98,7 @@ generally prompts before each command and handles programming
and command errors differently (as described below).
When first starting, the shell inspects argument 0, and
if it begins with a dash
.Pq Li - ,
.Pq Ql - ,
the shell is also considered a login shell.
This is normally done automatically by the system
when the user first logs in.
@@ -171,15 +172,15 @@ built-in command
(described later in the section called
.Sx Built-in Commands ) .
Introducing an option with a dash
.Pq Li -
.Pq Ql -
enables the option,
while using a plus
.Pq Li +
.Pq Ql +
disables the option.
A
.Dq Li --
or plain
.Dq Li -
.Dq Ql -
will stop option processing and will force the remaining
words on the command line to be treated as arguments.
The
@@ -207,13 +208,22 @@ option if it has been set).
.It Fl e Li errexit
Exit immediately if any untested command fails in non-interactive mode.
The exit status of a command is considered to be
explicitly tested if the command is used to control
an if, elif, while, or until; or if the command is the left
explicitly tested if the command is part of the list used to control
an
.Ic if , elif , while ,
or
.Ic until ;
if the command is the left
hand operand of an
.Dq Li &&
or
.Dq Li ||
operator; or if the command is a pipeline preceded by the
.Ic !\&
operator.
If a shell function is executed and its exit status is explicitly
tested, all commands of the function are considered to be tested as
well.
.It Fl f Li noglob
Disable pathname expansion.
.It Fl I Li ignoreeof
@@ -269,7 +279,7 @@ When waiting for a child, execute traps immediately.
If this option is not set,
traps are executed after the child exits,
as specified in
.St -p1003.2
.St -p1003.2 .
This nonstandard option is useful for putting guarding shells around
children that block signals.
The surrounding shell may kill the child
@@ -296,15 +306,16 @@ Useful for debugging.
.It Fl x Li xtrace
Write each command
(preceded by
.Dq Li +\ )
.Dq Li "+ " )
to standard error before it is executed.
Useful for debugging.
.El
.Pp
The
.Fl c
option may be used to pass its string argument to the shell
to be interpreted as input.
option causes the commands to be read from the
.Ar string
operand instead of from the standard input.
Keep in mind that this option only accepts a single string as its
argument, hence multi-word strings must be quoted.
.Pp
@@ -353,8 +364,9 @@ The following is a list of valid operators:
.El
.Ss Quoting
Quoting is used to remove the special meaning of certain characters
or words to the shell, such as operators, whitespace, or
keywords.
or words to the shell, such as operators, whitespace, keywords,
or alias names.
.Pp
There are three types of quoting: matched single quotes,
matched double quotes, and backslash.
.Bl -tag -width indent
@@ -365,11 +377,11 @@ it impossible to put single-quotes in a single-quoted string).
.It Double Quotes
Enclosing characters within double quotes preserves the literal
meaning of all characters except dollarsign
.Pq Li $ ,
.Pq Ql $ ,
backquote
.Pq Li ` ,
.Pq Ql ` ,
and backslash
.Pq Li \e .
.Pq Ql \e .
The backslash inside double quotes is historically weird.
It remains literal unless it precedes the following characters,
which it serves to quote:
@@ -379,7 +391,7 @@ which it serves to quote:
.It Backslash
A backslash preserves the literal meaning of the following
character, with the exception of the newline character
.Pq Li \en .
.Pq Ql \en .
A backslash preceding a newline is treated as a line continuation.
.El
.Ss Reserved Words
@@ -420,6 +432,16 @@ to create functions with arguments.
They can also be
used to create lexically obscure code.
This use is discouraged.
.Pp
An alias name may be escaped in a command line, so that it is not
replaced by its alias value, by using quoting characters within or
adjacent to the alias name.
This is most often done by prefixing
an alias name with a backslash to execute a function, built-in, or
normal program with the same name.
See the
.Sx Quoting
subsection.
.Ss Commands
The shell interprets the words it reads according to a
language, the specification of which is outside the scope
@@ -702,7 +724,7 @@ They are executed in the current shell, although they do not affect its
environment when used in pipelines.
.Ss Background Commands (&)
If a command is terminated by the control operator ampersand
.Pq Li & ,
.Pq Ql & ,
the shell executes the command asynchronously;
the shell does not wait for the command to finish
before executing the next command.
@@ -774,10 +796,15 @@ repeat until the exit status of the first list is zero.
The syntax of the
.Ic for
command is:
.Dl Ic for Ar variable Ic in Ar word ...
.Dl Ic for Ar variable Op Ic in Ar word ...
.Dl Ic do Ar list
.Dl Ic done
.Pp
If
.Ic in
and the following words are omitted,
.Ic in Li $@
is used instead.
The words are expanded, and then the list is executed
repeatedly with the variable set to each word in turn.
The
@@ -870,7 +897,7 @@ and the syntax is:
.Bd -ragged -offset indent
.Ic local
.Op Ar variable ...
.Op Ar -
.Op Fl
.Ed
.Pp
The
@@ -900,7 +927,7 @@ declared inside
not to the global variable named
.Em x .
.Pp
The only special parameter than can be made local is
The only special parameter that can be made local is
.Dq Li - .
Making
.Dq Li -
@@ -947,12 +974,16 @@ The
.Ic set
built-in command can also be used to set or reset them.
.Ss Special Parameters
A special parameter is a parameter denoted by one of the following
special characters.
The value of the parameter is listed
next to its character.
A special parameter is a parameter denoted by a special one-character
name.
The special parameters recognized by the
.Nm
shell of
.Fx
are shown in the following list, exactly as they would appear in input
typed by the user or in the source of a shell script.
.Bl -hang
.It Li *
.It Li $*
Expands to the positional parameters, starting from one.
When
the expansion occurs within a double-quoted string
@@ -965,7 +996,7 @@ or by a
if
.Ev IFS
is unset.
.It Li @
.It Li $@
Expands to the positional parameters, starting from one.
When
the expansion occurs within double-quotes, each positional
@@ -988,26 +1019,26 @@ the two arguments:
.Bd -literal -offset indent
"abc" "def ghi"
.Ed
.It Li #
.It Li $#
Expands to the number of positional parameters.
.It Li \&?
.It Li $\&?
Expands to the exit status of the most recent pipeline.
.It Li -
.It Li $-
(hyphen) Expands to the current option flags (the single-letter
option names concatenated into a string) as specified on
invocation, by the set built-in command, or implicitly
by the shell.
.It Li $
.It Li $$
Expands to the process ID of the invoked shell.
A subshell
retains the same value of $ as its parent.
.It Li \&!
.It Li $\&!
Expands to the process ID of the most recent background
command executed from the current shell.
For a
pipeline, the process ID is that of the last command in the
pipeline.
.It Li 0
.It Li $0
(zero) Expands to the name of the shell or shell script.
.El
.Ss Word Expansions
@@ -1052,11 +1083,11 @@ character is used to introduce parameter expansion, command
substitution, or arithmetic evaluation.
.Ss Tilde Expansion (substituting a user's home directory)
A word beginning with an unquoted tilde character
.Pq Li ~
.Pq Ql ~
is
subjected to tilde expansion.
All the characters up to a slash
.Pq Li /
.Pq Ql /
or the end of the word are treated as a username
and are replaced with the user's home directory.
If the
@@ -1285,13 +1316,13 @@ variable or the output of the command is scanned for these
characters and they are turned into meta-characters.
.Pp
An asterisk
.Pq Li *
.Pq Ql *
matches any string of characters.
A question mark
.Pq Li \&?
.Pq Ql \&?
matches any single character.
A left bracket
.Pq Li [
.Pq Ql [
introduces a character class.
The end of the character class is indicated by a
.Dq Li \&] ;
@@ -1305,7 +1336,7 @@ rather than introducing a character class.
A character class matches any of the characters between the square brackets.
A range of characters may be specified using a minus sign.
The character class may be complemented by making an exclamation point
.Pq Li !\&
.Pq Ql !\&
the first character of the character class.
.Pp
To include a
@@ -1346,8 +1377,7 @@ for the file.
If it is not found in the
.Ev PATH ,
it is sought in the current working directory.
.It Ic alias Op Ar name ...
.It Ic alias Op Ar name Ns = Ns Ar string ...
.It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc ... Oc
If
.Ar name Ns = Ns Ar string
is specified, the shell defines the alias
@@ -1366,6 +1396,9 @@ built-in command prints the names and values of all defined aliases
.Ic unalias ) .
Alias values are written with appropriate quoting so that they are
suitable for re-input to the shell.
Also see the
.Sx Aliases
subsection.
.It Ic bg Op Ar job ...
Continue the specified jobs
(or the current job if no jobs are given)
@@ -1433,7 +1466,8 @@ A synonym for the
.Ic cd
built-in command.
.It Ic command Oo Fl p Oc Op Ar utility Op Ar argument ...
Execute the specified
.It Ic command Oo Fl v | V Oc Op Ar utility
The first form of invocation executes the specified
.Ar utility
as a simple command (see the
.Sx Simple Commands
@@ -1445,10 +1479,39 @@ option is specified, the command search is performed using a
default value of
.Ev PATH
that is guaranteed to find all of the standard utilities.
.It Ic echo Oo Fl e | n Oc Op Ar string
Print
.Ar string
to the standard output with a newline appended.
.Pp
If the
.Fl v
option is specified,
.Ar utility
is not executed but a description of its interpretation by the shell is
printed.
For ordinary commands the output is the path name; for shell built-in
commands, shell functions and keywords only the name is written.
Aliases are printed as
.Dq Ic alias Ar name Ns = Ns Ar value .
.Pp
The
.Fl V
option is identical to
.Fl v
except for the output.
It prints
.Dq Ar utility Ic is Ar description
where
.Ar description
is either
the path name to
.Ar utility ,
a shell builtin,
a shell function,
a shell keyword
or
an alias for
. Ar value .
.It Ic echo Oo Fl e | n Oc Op Ar string ...
Print a space-separated list of the arguments to the standard output
and append a newline character.
.Bl -tag -width indent
.It Fl n
Suppress the output of the trailing newline.
@@ -1528,7 +1591,8 @@ If
is given
it is used as the exit status of the shell;
otherwise the exit status of the preceding command is used.
.It Ic export Oo Fl p Oc Op Ar name ...
.It Ic export Ar name ...
.It Ic export Op Fl p
The specified names are exported so that they will
appear in the environment of subsequent commands.
The only way to un-export a variable is to
@@ -1638,9 +1702,9 @@ the string form of the first operand cannot contain an embedded equal sign.
.Pp
The following environment variables affect the execution of
.Ic fc :
.Bl -tag -width indent
.Bl -tag -width ".Ev HISTSIZE"
.It Ev FCEDIT
Name of the editor to use.
Name of the editor to use for history editing.
.It Ev HISTSIZE
The number of previous commands that are accessible.
.El
@@ -1713,6 +1777,10 @@ option is specified, the PID of each job is also printed.
If the
.Fl s
option is specified, only the PIDs of the jobs are printed, one per line.
.It Ic local Oo Ar variable ... Oc Op Fl
See the
.Sx Functions
subsection.
.It Ic pwd Op Fl L | P
Print the path of the current directory.
The built-in command may
@@ -1778,7 +1846,7 @@ option is specified and the
elapses before any input is supplied,
the
.Ic read
command will return without assigning any values.
command will return an exit status of 1 without assigning any values.
The
.Ar timeout
value may optionally be followed by one of
@@ -1814,6 +1882,10 @@ If the
option is specified, the read-only variables are printed as
.Dq Ic readonly Ar name Ns = Ns Ar value
lines, suitable for re-input to the shell.
.It Ic return Op Ar exitstatus
See the
.Sx Functions
subsection.
.It Ic set Oo Fl /+abCEefIimnpTuVvx Oc Oo Fl /+o Ar longname Oc Oo
.Fl c Ar string Oc Op Fl - Ar arg ...
The
@@ -1848,9 +1920,9 @@ flag may be omitted when specifying arguments to be used
as positional replacement parameters.
This is not recommended,
because the first argument may begin with a dash
.Pq Li -
.Pq Ql -
or a plus
.Pq Li + ,
.Pq Ql + ,
which the
.Ic set
command will interpret as a request to enable or disable options.
@@ -1879,7 +1951,13 @@ A shift sets the value of $1 to the value of $2,
the value of $2 to the value of $3, and so on,
decreasing the value of $# by one.
If there are zero positional parameters, shifting does not do anything.
.It Ic times
Print the amount of time spent executing the shell and its children.
The first output line shows the user and system times for the shell
itself, the second one contains the user and system times for the
children.
.It Ic trap Oo Ar action Oc Ar signal ...
.It Ic trap Fl l
Cause the shell to parse and execute
.Ar action
when any specified
@@ -1891,14 +1969,25 @@ In addition, the pseudo-signal
may be used to specify an action that is performed when the shell terminates.
The
.Ar action
may be null or omitted;
may be an empty string or a dash
.Pq Ar - ;
the former causes the specified signal to be ignored
and the latter causes the default action to be taken.
Omitting the
.Ar action
is another way to request the default action, for compatibility reasons this
usage is not recommended though.
When the shell forks off a subshell,
it resets trapped (but not ignored) signals to the default action.
The
.Ic trap
command has no effect on signals that were ignored on entry to the shell.
.Pp
Option
.Fl l
causes the
.Ic trap
command to display a list of valid signal names.
.It Ic type Op Ar name ...
Interpret each
.Ar name
@@ -1972,16 +2061,19 @@ The maximal number of simultaneous processes for this user ID.
.It Fl v Ar virtualmem
The maximal virtual size of a process, in kilobytes.
.El
.It Ic umask Op Ar mask
.It Ic umask Oo Fl S Oc Op Ar mask
Set the file creation mask (see
.Xr umask 2 )
to the octal value specified by
to the octal or symbolic (see
.Xr chmod 1 )
value specified by
.Ar mask .
If the argument is omitted, the current mask value is printed.
.It Ic unalias Oo Fl a Oc Op Ar name
If
.Ar name
is specified, the shell removes that alias.
If the
.Fl S
option is specified, the output is symbolic, otherwise the output is octal.
.It Ic unalias Oo Fl a Oc Op Ar name ...
The specified alias names are removed.
If
.Fl a
is specified, all aliases are removed.
@@ -2038,12 +2130,94 @@ Similarly, the
.Dq Li set -E )
command can be used to enable a subset of
emacs-style command line editing features.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width ".Ev HISTSIZE"
.It Ev CDPATH
The search path used with the
.Ic cd
built-in.
.It Ev EDITOR
The fallback editor used with the
.Ic fc
built-in.
If not set, the default editor is
.Xr ed 1 .
.It Ev FCEDIT
The default editor used with the
.Ic fc
built-in.
.It Ev HISTSIZE
The number of previous commands that are accessible.
.It Ev HOME
The starting directory of
.Nm .
.It Ev IFS
Input Field Separators.
This is normally set to
.Aq space ,
.Aq tab ,
and
.Aq newline .
See the
.Sx White Space Splitting
section for more details.
.It Ev MAIL
The name of a mail file, that will be checked for the arrival of new
mail.
Overridden by
.Ev MAILPATH .
.It Ev MAILPATH
A colon
.Pq Ql \&:
separated list of file names, for the shell to check for incoming
mail.
This environment setting overrides the
.Ev MAIL
setting.
There is a maximum of 10 mailboxes that can be monitored at once.
.It Ev PATH
The default search path for executables.
See the
.Sx Path Search
section for details.
.It Ev PS1
The primary prompt string, which defaults to
.Dq Li "$ " ,
unless you are the superuser, in which case it defaults to
.Dq Li "# " .
.It Ev PS2
The secondary prompt string, which defaults to
.Dq Li "> " .
.It Ev TERM
The default terminal setting for the shell.
This is inherited by children of the shell, and is used in the history
editing modes.
.El
.Sh EXIT STATUS
Errors that are detected by the shell, such as a syntax error, will
cause the shell to exit with a non-zero exit status.
If the shell is not an interactive shell, the execution of the shell
file will be aborted.
Otherwise the shell will return the exit status of the last command
executed, or if the exit builtin is used with a numeric argument, it
will return the argument.
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr chsh 1 ,
.Xr echo 1 ,
.Xr ed 1 ,
.Xr emacs 1 ,
.Xr expr 1 ,
.Xr getopt 1 ,
.Xr pwd 1 ,
.Xr test 1
.Xr test 1 ,
.Xr vi 1 ,
.Xr execve 2 ,
.Xr getrlimit 2 ,
.Xr umask 2 ,
.Xr editrc 5
.Sh HISTORY
A
.Nm
+6 -7
View File
@@ -153,15 +153,14 @@ trapcmd(int argc, char **argv)
if (argc <= 1) {
for (signo = 0 ; signo < sys_nsig ; signo++) {
if (signo < NSIG && trap[signo] != NULL) {
out1str("trap -- ");
out1qstr(trap[signo]);
if (signo == 0) {
out1fmt("trap -- '%s' %s\n",
trap[signo], "exit");
out1str(" exit\n");
} else if (sys_signame[signo]) {
out1fmt("trap -- '%s' %s\n",
trap[signo], sys_signame[signo]);
out1fmt(" %s\n", sys_signame[signo]);
} else {
out1fmt("trap -- '%s' %d\n",
trap[signo], signo);
out1fmt(" %d\n", signo);
}
}
}
@@ -382,7 +381,7 @@ onsig(int signo)
*/
if (Tflag &&
trap[signo] != NULL &&
! trap[signo][0] == '\0' &&
! (trap[signo][0] == '\0') &&
! (trap[signo][0] == ':' && trap[signo][1] == '\0'))
breakwaitcmd = 1;
+4 -2
View File
@@ -541,9 +541,11 @@ exportcmd(int argc, char **argv)
argc -= optind;
argv += optind;
if (values && argc != 0)
error("-p requires no arguments");
listsetvar(cmdenviron);
if (argc != 0) {
while ((name = *argptr++) != NULL) {
while ((name = *argv++) != NULL) {
if ((p = strchr(name, '=')) != NULL) {
p++;
} else {
@@ -761,7 +763,7 @@ unsetvar(char *s)
}
}
return (1);
return (0);
}
+2 -2
View File
@@ -142,8 +142,8 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
put("-onlcr", ONLCR, 1);
put("-ocrnl", OCRNL, 0);
put("-oxtabs", OXTABS, 1);
put("-onocr", OXTABS, 0);
put("-onlret", OXTABS, 0);
put("-onocr", ONOCR, 0);
put("-onlret", ONLRET, 0);
/* control flags (hardware state) */
tmp = tp->c_cflag;
-6
View File
@@ -1,6 +0,0 @@
# $FreeBSD$
PROG= uuidgen
WARNS?= 6
.include <bsd.prog.mk>
-79
View File
@@ -1,79 +0,0 @@
.\" Copyright (c) 2002 Marcel Moolenaar
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd May 23, 2002
.Dt UUIDGEN 1
.Os
.Sh NAME
.Nm uuidgen
.Nd generate universally unique identifiers
.Sh SYNOPSIS
.Nm
.Op Fl 1
.Op Fl n Ar count
.Op Fl o Ar filename
.Sh DESCRIPTION
The
.Nm
utility by default generates a single universally unique identifier (UUID),
also known as a globally unique identifier (GUID).
The UUID is written to stdout by default.
The following options can be used to change the behaviour of
.Nm :
.Bl -tag -width indent
.It Fl 1
This option only has effect if multiple identifiers are to be generated and
instructs
.Nm
to not generate them in batch, but one at a time.
.It Fl n
This option controls the number of identifiers generated.
By default, multiple
identifiers are generated in batch.
.It Fl o
Redirect output to
.Ar filename
instead of stdout.
.El
.Pp
Batched generation yields a dense set of identifiers in such a way that there
is no identifier that is larger than the smallest identifier in the set and
smaller than the largest identifier in the set and that is not already in the
set.
.Pp
When generating the identifiers one at a time, the identifiers will be close
to each other, but operating system latency and processing time will be
reflected in the distance between two successive identifiers.
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr uuidgen 2 ,
.Xr uuid 3
.Sh HISTORY
The
.Nm
command first appeared in
.Fx 5.0 .
-113
View File
@@ -1,113 +0,0 @@
/*
* Copyright (c) 2002 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <uuid.h>
static void
usage(void)
{
(void)fprintf(stderr, "usage: uuidgen [-1] [-n count] [-o filename]\n");
exit(1);
}
int
main(int argc, char *argv[])
{
FILE *fp;
uuid_t *store, *uuid;
char *p;
int ch, count, i, iterate;
count = -1; /* no count yet */
fp = stdout; /* default output file */
iterate = 0; /* not one at a time */
while ((ch = getopt(argc, argv, "1n:o:")) != -1)
switch (ch) {
case '1':
iterate = 1;
break;
case 'n':
if (count > 0)
usage();
count = strtol(optarg, &p, 10);
if (*p != 0 || count < 1)
usage();
break;
case 'o':
if (fp != stdout)
errx(1, "multiple output files not allowed");
fp = fopen(optarg, "w");
if (fp == NULL)
err(1, "fopen");
break;
default:
usage();
}
argv += optind;
argc -= optind;
if (argc)
usage();
if (count == -1)
count = 1;
store = (uuid_t*)malloc(sizeof(uuid_t) * count);
if (store == NULL)
err(1, "malloc()");
if (!iterate) {
/* Get them all in a single batch */
if (uuidgen(store, count) != 0)
err(1, "uuidgen()");
} else {
uuid = store;
for (i = 0; i < count; i++) {
if (uuidgen(uuid++, 1) != 0)
err(1, "uuidgen()");
}
}
uuid = store;
while (count--) {
uuid_to_string(uuid++, &p, NULL);
fprintf(fp, "%s\n", p);
free(p);
}
free(store);
if (fp != stdout)
fclose(fp);
return (0);
}
+77 -52
View File
@@ -50,7 +50,7 @@
.Sh SYNOPSIS
.Nm amd
.Fl H
.Nm amd
.Nm amd
.Op Fl F Ar conf_file
.Nm amd
.Op Fl nprvHS
@@ -83,7 +83,8 @@
.Sh DESCRIPTION
.Nm Amd
is a daemon that automatically mounts file systems whenever a file or directory
within that file system is accessed. File systems are automatically unmounted
within that file system is accessed.
File systems are automatically unmounted
when they appear to be quiescent.
.Pp
.Nm Amd
@@ -96,17 +97,19 @@ are handled by
.Nm amd ,
which uses the map defined by
.Ar mapname
to determine how to resolve the lookup. Generally, this will be a host name,
to determine how to resolve the lookup.
Generally, this will be a host name,
some file system information and some mount options for the given file system.
.Pp
In the first form depicted above,
.Nm amd
will print a short help string. In the second form, if no options are
will print a short help string.
In the second form, if no options are
specified, or if the
.Fl F
is used,
.Nm amd
will read configuration parameters from the file
is used,
.Nm amd
will read configuration parameters from the file
.Ar conf_file
which defaults to
.Pa /etc/amd.conf .
@@ -121,12 +124,15 @@ The default is
Specify a
.Ar duration ,
in seconds, that a looked up name remains
cached when not in use. The default is 5 minutes.
cached when not in use.
The default is 5 minutes.
.It Fl d Ar domain
Specify the local domain name. If this option is not
Specify the local domain name.
If this option is not
given the domain name is determined from the hostname.
.It Fl k Ar kernel-arch
Specifies the kernel architecture. This is used solely
Specifies the kernel architecture.
This is used solely
to set the ${karch} selector.
.It Fl l Ar logfile
Specify a logfile in which to record mount and unmount events.
@@ -136,31 +142,32 @@ is the string
.Em syslog ,
the log messages will be sent to the system log daemon by
.Xr syslog 3 .
The default syslog facility used is LOG_DAEMON.
The default syslog facility used is LOG_DAEMON.
If you wish to change it, append its name to the log file name,
delimited by a single colon.
For example, if
For example, if
.Ar logfile
is the string
.Dq Li syslog:local7
then
.Nm amd
will log messages via
will log messages via
.Xr syslog 3
using the LOG_LOCAL7 facility (if it exists on the system).
.It Fl n
Normalize hostnames.
The name referred to by ${rhost} is normalized relative to the
host database before being used. The effect is to translate
host database before being used.
The effect is to translate
aliases into ``official'' names.
.It Fl o Ar op_sys_ver
Override the compiled-in version number of the operating system.
Useful when the built in version is not desired for backward
Useful when the built in version is not desired for backward
compatibility reasons.
For example, if the build in version is
.Dq 2.5.1 ,
For example, if the build in version is
.Dq 2.5.1 ,
you can override it to
.Dq 5.5.1 ,
.Dq 5.5.1 ,
and use older maps that were written with the latter in mind.
.It Fl p
Print
@@ -172,7 +179,8 @@ to standard output where it can be saved into a file.
Restart existing mounts.
.Nm Amd
will scan the mount file table to determine which file systems
are currently mounted. Whenever one of these would have
are currently mounted.
Whenever one of these would have
been auto-mounted,
.Nm amd
.Em inherits
@@ -182,25 +190,33 @@ Specify the NFS timeout
.Ar interval ,
in tenths of a second, between
.Tn NFS/RPC
retries (for UDP only). The default
is 0.8 seconds. The second value alters the retransmit counter, which
defaults to 11 retransmissions. Both of these values are used by the kernel
to communicate with amd. Useful defaults are supplied if either or both
retries (for UDP only).
The default
is 0.8 seconds.
The second value alters the retransmit counter, which
defaults to 11 retransmissions.
Both of these values are used by the kernel
to communicate with amd.
Useful defaults are supplied if either or both
values are missing.
.Pp
Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
The values of these parameters change the overall retry interval. Too long
The values of these parameters change the overall retry interval.
Too long
an interval gives poor interactive response; too short an interval causes
excessive retries.
.It Fl v
Version. Displays version and configuration information on standard error.
Version.
Displays version and configuration information on standard error.
.It Fl w Ar interval
Specify an
.Ar interval ,
in seconds, between attempts to dismount file systems that have exceeded their
cached times. The default is 2 minutes.
cached times.
The default is 2 minutes.
.It Fl x Ar options
Specify run-time logging options. The options are a comma separated list
Specify run-time logging options.
The options are a comma separated list
chosen from: fatal, error, user, warn, info, map, stats, all.
.It Fl y Ar domain
Specify an alternative
@@ -215,10 +231,12 @@ support is not available.
.It Fl C Ar cluster-name
Specify an alternative HP-UX cluster name to use.
.It Fl D Ar option
Select from a variety of debug options. Prefixing an
Select from a variety of debug options.
Prefixing an
option with the string
.Em no
reverses the effect of that option. Options are cumulative.
reverses the effect of that option.
Options are cumulative.
The most useful option is
.Ar all .
.Pp
@@ -232,40 +250,47 @@ and a fuller description is available in the program source.
.It Fl F Ar conf_file
Specify an
.Nm amd
configuration file to use. See
configuration file to use.
See
.Xr amd.conf 5
for description of this file's format. This configuration file is used to
specify any options in lieu of typing many of them on the command line. The
for description of this file's format.
This configuration file is used to
specify any options in lieu of typing many of them on the command line.
The
.Nm amd.conf
file includes directives for every command line option amd has,
and many more that are only available via the configuration file
facility. The configuration file specified by this option is
facility.
The configuration file specified by this option is
processed after all other options have been processed, regardless
of the actual location of this option on the command line.
.It Fl H
Print help and usage string.
.It Fl O Ar op_sys_name
Override the compiled-in name of the operating system.
Override the compiled-in name of the operating system.
Useful when the built in name is not desired for backward
compatibility reasons.
For example, if the build in name is
.Dq sunos5 ,
.Dq sunos5 ,
you can override it to
.Dq sos5
and use older maps which were written with the latter in mind.
.It Fl S
Do not lock the running executable pages of
.Nm amd
into memory. To improve
into memory.
To improve
.Nm amd's
performance, systems that support the
performance, systems that support the
.Xr plock 3
call, could lock the
.Nm amd
process into memory. This way there is less chance the operating system will
process into memory.
This way there is less chance the operating system will
schedule, page out, and swap the
.Nm amd
process as needed. This tends to improve
process as needed.
This tends to improve
.Nm amd's
performance, at the cost of reserving the memory used by the
.Nm amd
@@ -277,7 +302,7 @@ option.
.It Fl T Ar tag
Specify a tag to use with
.Xr amd.conf 5 .
All Map entries tagged with tag will be processed.
All Map entries tagged with tag will be processed.
Map entries that are not tagged are always processed.
Map entries that are tagged with a tag other than
.Ar tag
@@ -330,20 +355,20 @@ the features.
.%T Amd \- The 4.4 BSD Automounter
.Re
.Pp
.Pa http://www.cs.columbia.edu/~ezk/am-utils/
.Sh AUTHORS
.An Jan-Simon Pendry Aq [email protected] ,
Department of Computing, Imperial College, London, UK.
.Pp
.An Erez Zadok Aq [email protected] ,
Department of Computer Science, Columbia University,
New York, USA.
.Pp
Other authors and contributors to am-utils are listed in the
.Pa AUTHORS
file distributed with am-utils.
.Pa http://www.am-utils.org/
.Sh HISTORY
The
.Nm amd
utility first appeared in
.Bx 4.4 .
.Sh AUTHORS
.An Jan-Simon Pendry Aq [email protected] ,
Department of Computing, Imperial College, London, UK.
.Pp
.An Erez Zadok Aq [email protected] ,
Department of Computer Science, Columbia University,
New York, USA.
.Pp
Other authors and contributors to am-utils are listed in the
.Pa AUTHORS
file distributed with am-utils.
+2 -2
View File
@@ -64,9 +64,9 @@ The
.Nm
utility takes a set of system configuration information, and generates
a coordinated set of
.I amd
.Xr amd 8
,
.I mount
.Xr mount 8
and
.Xr mountd 8
configuration files.
-4157
View File
File diff suppressed because it is too large. Load diff
-39
View File
@@ -1,39 +0,0 @@
$Id: DNSSEC,v 8.2 1999/10/12 18:23:27 ogud Exp $
DNSSEC Notes:
This file contains description of two interoperabilty problems related
to DNSSEC that only affect sites using DNSSEC.
1. All versions of bind-8 older than 8.2.2
Between versions 8.2.1 and 8.2.2 the printed format of SIG records
changed. As a result, using a signer, named and named-xfer of
differrent versions will cause parsing errors on signed zonefiles.
Included is an AWK program that converts old signed zone files to new
new format, see contrib/dns_signer/add_labels.awk
Usage: awk -f <path>/contrib/dns_signer/add_labels.awk <signed_zone >fixed_zone
2. BIND-8.1 BIND-8.1.1 BIND-8.1.2 Interoperability
If you wish to use BIND-8.1.x as a master server (either primary or
secondary) for DNSSEC signed zone you MUST apply the following patch
to the file src/bin/named/db_load.c. It fixes a bug that rejects
valid RSA signatures on load.
You can patch the file by running following command from this directory
patch -d bin/named <DNSSEC
--- db_load.c.old Mon Oct 11 15:21:24 1999
+++ db_load.c Mon Oct 11 15:21:38 1999
@@ -1123,9 +1123,6 @@
ERRTO("Signature too short");
if (siglen > (NS_MD5RSA_MAX_BITS + 7) / 8)
ERRTO("Signature too long");
- /* We rely on cp from parse */
- if (*cp == 0)
- ERRTO("Signature starts with zeroes");
break;
case NS_ALG_EXPIRE_ONLY:
-24
View File
@@ -1,24 +0,0 @@
$FreeBSD$
1. Create clean import directory.
2. Un-tar bind-{src|doc}.tar.gz.
3. rm Makefile; mv doc src/
(Don't un-tar doc in src, you'll spam the real Makefile.)
4. while read pattern; do rm -r src/${pattern} ; done < FREEBSD-Xlist
5. find . -name .cvsignore -delete
6. chmod 644 src/LICENSE
7. Create another clean directory.
8. cvs export -rHEAD src/contrib/bind
9. diff -ur the two directories and look for 'Only in' to see if
there are any new files, or anything gone missing.
10. Once you're satisfied, do the import. Replace version strings appropriately:
cvs import -m"Import of ISC BIND version 8.3.3" src/contrib/bind ISC v8_3_3
11. Resolve conflicts as needed.
cvs checkout -jISC:yesterday -jISC src/contrib/bind
Note: bin/nslookup/commands.l needs a different patch for the command line
editing customization in -current and RELENG_4.
-42
View File
@@ -1,42 +0,0 @@
$FreeBSD$
.cvsignore
LICENSE_RSA
OLD*
bin/named/ns_parser.[ch]
bin/nslookup/commands.c
conf*
doc/bog
doc/notes
doc/old
doc/rfc
doc/tmac
doc/*/*.[lp]s[ft][0-9]
doc/misc/*.ps
lib/bsd*
lib/cylink*
lib/dnssafe*
port/aix32*
port/aix4*
port/aux3*
port/bsdos*
port/cygwin*
port/darwin*
port/decunix*
port/hpux*
port/irix*
port/linux*
port/lynxos*
port/mpe*
port/netbsd*
port/next*
port/openbsd*
port/qnx*
port/rhapsody*
port/sco*
port/solaris*
port/sunos*
port/ultrix*
port/unixware20*
port/unixware212*
port/unixware7*
port/winnt*
-340
View File
@@ -1,340 +0,0 @@
Systems it is known to compile and run on:
BSD/OS 3.1, 4.0.1
FreeBSD 3.3, 3.4
RH Linux 5.2 (don't use "make links" when building, though)
Debian GNU/Linux 2.2.9 ("unreleased")
Digital UNIX 3.2C, 4.0, 5.0
NetBSD/i386 1.3.2, 1.4
Darwin 1.x (Mac OS X)
SunOS 5.6 (Solaris 2.6), SunOS 5.7 (Solaris 7)
SCO UnixWare 7.0, 7.0.1, 7.1
IRIX 6.5
Systems it has been known in the past to compile and run on:
AIX 4.x
A/UX 3.1.1
Digital ULTRIX 4.5 (without Compaq's Y2K kit installed)
HP MPE
HP-UX 9.x, 10.20
IRIX 5.3, 6.2, 6.4
LynxOS
FreeBSD 3.1, 3.2
NetBSD 1.2, 1.3
OpenBSD 2.1
QNX
SCO UNIX 3.2v4.2, SCO OSE 5.0.4, UnixWare 2.0.x, 2.1.2
SunOS 4.1.4
SunOS 5.5 (Solaris 2.5)
See port/README for information on porting BIND 8 to other systems.
Building
If you do not have an ANSI/ISO C compiler, give up or get GCC. The
one exception is the ULTRIX compiler, which isn't full ANSI C but it
has function prototypes and BIND works around the rest. BIND 8 also
wants a C library that's ANSI/ISO standard, although it can work
around some common failings.
If you do not have yacc, get byacc or GNU bison. If you do not have
lex, get GNU flex. For information on where to get GNU software, see
http://www.fsf.org/order/ftp.html.
If you want to build outside the source pool, then
make DST=/your/destination/here SRC=`pwd` links
cd /your/destination/here
If you want to use DST=/var/obj/bind, you can simply type
make stdlinks
Next, make sure you have no stale trash laying about
make clean
Then, update the Makefile dependencies:
make depend
NOTE: "make depend" is a NO-OP for some platforms, but always harmless.
Finally,
make all
Installation
To install, type
make install
This will copy binaries to the appropriate locations for your system,
and install the BIND 8 library and header files under /usr/local/bind.
The following variables can be used to change where things get
installed:
DESTDIR prefix used in front of all other
DEST variables. The default is the
empty prefix. (for non-root installs;
not equivalent to autoconf's --prefix)
DESTLIB libraries
DESTINC include files
DESTBIN ordinary binaries (e.g. dig, nslookup)
DESTSBIN system binaries (e.g. named)
DESTEXEC helper binaries (e.g. named-xfer)
DESTHELP place to put nslookup's help file
DESTMAN man file location
DESTETC configuration file
DESTRUN PID file location and "ndc" control
channel location. This cannot be the
same directory as DESTSBIN.
These variables should be specified in the Makefile.set for your
port (e.g. if you use Solaris, in src/port/solaris/Makefile.set).
Before doing 'make install', you must
rm .settings
in the top level source directory because the build system caches
these variables.
Using BIND 8 Library Routines
Until a method to update the system's libraries is available,
applications wishing to use BIND 8 library routines must include
BIND 8 .h files, and must link with libbind.a. E.g.
cc -I/usr/local/bind/include -c sample.c
cc -o sample -L/usr/local/bind/lib sample.o -lbind
The default locations for libbind.a and .h files in BIND 8.1.1
and BIND 8.1.2 are different from those used in BIND 8.1-REL. If
you did a 'make install' for BIND 8.1-REL, then you should delete
the files it installed. They are:
/usr/local/lib/libbind.a
/usr/local/include/arpa/inet.h
/usr/local/include/arpa/nameser.h
/usr/local/include/arpa/nameser_compat.h
/usr/local/include/netdb.h
/usr/local/include/resolv.h
/usr/local/include/sys/bitypes.h (if it exists)
/usr/local/include/sys/cdefs.h (if it exists)
Operating System Notes
AIX
Build problems have been reported with the AIX "make".
We recommend using GNU "make" instead.
AIX4 with Linux Compatibility API
May need to define HAVE_STRNDUP in
port/aix4/include/port_after.h.
FreeBSD, NetBSD, OpenBSD and BSDI
The kit should compile even if you have intalled the KAME
IPv6 kit.
HPUX
If you are using gcc you may have to remove the '-ansi'
flag. This is gcc version dependent.
HPUX 10.20 early versions of the HP C/ANSI C compiler do
not work, version B.10.20.15 in known to work.
IRIX
build problems have been reported w/ IRIX 6.3, res_debug.c
and #include <stdlib.h>. You may need to comment out
the #include <stdlib.h> and declare
"void *malloc(size_t size)" to get named to compile on 6.3.
Linux
"make links" and "make stdlinks" cause problems on
some Linux kernels because there are too many levels of
symbolic links.
QNX
Read src/port/qnx/README before trying to build.
SCO 5.0.x
To build using gcc, copy "port/sco50/Makefile.set.gcc" to
"port/sco50/Makefile.set". To go back to using SCO's
compilers, copy "port/sco50/Makefile.set.sco" to
"port/sco50/Makefile.set".
Solaris
We've tested with Sun's compilers, yacc, and lex, and also
with gcc, byacc, and flex. By default, the build will try
to use gcc. If you want to use the Sun compilers, simply
copy "port/solaris/Makefile.set.sun" to
"port/solaris/Makefile.set". To go back to using gcc, copy
"port/solaris/Makefile.set.gcc" to "port/solaris/Makefile.set".
If you're using a Solaris release earlier than 2.5 and you have
a large number of interfaces on your system, you many need to
use a script to "limit descriptors N" (where 'N' is a
suitably large number) before execing "named". On Solaris
2.5 and later, the server will do this itself.
SunOS 4.1.4
An ANSI/ISO C compiler is required; we used gcc 2.7.2.1.
NeXT
Read src/port/next/README.FIRST before trying to build.
MPE/iX IPv6 is *not* supported. src/port/mpe/recvfrom.c needs to
be re-written to support IPv6 if and when the OS supports
IPv6.
Certain older versions of FreeBSD, NetBSD and BSD/OS
These systems have a /bin/sh based on "ash", which doesn't
handle POSIX-style quoting correctly. Using "bash" will fix
the problem. Either run make with "SH=bash" on the command
line, or edit src/Makefile and change "SH=sh" to "SH=bash".
FD_SETSIZE
The highest numbered file descriptor that the server and the resolver
can utilize is determined by the FD_SETSIZE value of the system. Some
systems set FD_SETSIZE much smaller than the actual number of files
that can be opened. On such systems, create an "fd_setsize.h" file
that sets FD_SETSIZE appropriately in the port's include directory.
User and Group ID
Specifying "-u" followed by a username or numeric user id on the
"named" command line will cause the server to give up all
privileges and become that user after the initial load of the
configuation file is complete. "-g" may be used similarly to set
the group id. If "-u" is specified but "-g" is not, the group
used will be the given user's primary group.
Here are some hints:
Because the server will have no privileges after changing
its user id, you must restart the server if you change the
interfaces and ports that the server is listening on, or if
you add an interface.
If you log to files, you should create all of the log files
in advance (e.g. with "touch"), and make sure they are owned
by the user and group "named" will be running as.
You'll have to edit "ndc" to get it to start the server
with the appropriate flags.
Note: this feature is still experimental.
Chroot
"-t" followed by a directory path on the "named" command line will
cause the server to chroot() to that directory before it starts
loading the configuration file.
Setting up a chrooted area varies somewhat by operating system. Some
experimentation may be necessary. Here are some hints:
Don't forget to install named-xfer.
Either don't use shared libraries when you build, or do
whatever is required on your OS to allow shared libraries
to be used after a chroot().
syslog() is often troublesome after chrooting. Use the
"logging" statement and log to a file instead.
/dev/null should be in the chroot directory hierarchy. You
can usually find out the mknod parameters for a null device by
looking in /dev/MAKEDEV.
You'll have to edit "ndc" to get it to start the server
with the appropriate flags, and to use the right pid file.
Note: this feature is still experimental.
Using the Server
Note that /etc/named.boot is long gone. You need to make yourself an
/etc/named.conf (note, that ends in "conf" rather than "boot") file.
This file looks a lot like a C program or a modern gated.conf file;
there are lots of {curly braces} and it takes some getting used to.
You may get a lot more help from the example file (which is
bin/named/named.conf) than from the documentation (see ../doc/html).
You can convert your named.boot file to a named.conf file using
bin/named-bootconf/named-bootconf.
e.g.
named-bootconf < /etc/named.boot > /etc/named.conf
All the files that used to be created in /var/tmp, e.g. named.run,
will now be created in the directory specified in the options
statement. If debugging is turned on using the "-d" flag on server
startup, then named.run will be created in the current directory.
Known Dynamic DNS Bugs
If the server is master for a zone and authoritative for a child of
that zone, then a dynamic update to the parent will destroy the
delegation to the child when the parent zone is written to disk.
This problem will be fixed in a future release. The only workaround
is to not be authoritative for child zones of a dynamic zone.
Slave servers do not forward update requests to the primary master
correctly. This will be fixed in a future release. In the meantime,
slaves will refuse dynamic updates.
Shared Libraries
Absolutely no support exists for editing the system's shared
libraries to update the resolver. If you want to do that you
probably want to look at BIND Version 4 (see http://www.isc.org/isc/)
or wait a while or help out a lot. This means you probably do not
want to install the library or include files into /usr/lib or
/usr/include, and this kit helpfully puts everything into
/usr/local/lib and /usr/local/include for that reason among others.
Notes about contrib and doc
The BIND 8 "doc" package includes HTML documentation as well as all
the RFC's, Internet Drafts, and "man" pages we can think of. You may
need to install the doc/tmac files in your nroff/troff support
directory since we use the newer BSD "mandoc" system for our "man"
pages.
The BIND 8 "contrib" package is full of junk that you may want to
take a look at. Feel free to send us more junk for future releases.
Bugs
Please report bugs to
[email protected]
-22
View File
@@ -1,22 +0,0 @@
## Copyright (c) 1993-2000 by Internet Software Consortium, Inc.
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
Internet Software Consortium
950 Charter Street
Redwood City, CA 94063
Tel: 1-888-868-1001 (toll free in U.S.)
Tel: 1-650-779-7091
Fax: 1-650-779-7055
Email: <[email protected]>
-68
View File
@@ -1,68 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium.
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.52 2000/11/21 12:54:37 marka Exp $
TOP=
SUBDIRS= include port lib bin
SH=sh
default: all
all clean depend install distclean:: FRC
@set -e; \
version=`cat ${TOP}Version`; \
systype=`${SH} ${TOP}port/systype ${TOP}.systype`; \
if [ $$systype = "unknown" ]; then \
echo "There is no BIND port for this system in this kit."; \
else \
settings=`${SH} ${TOP}port/settings ${TOP}.settings \
< ${TOP}port/$$systype/Makefile.set`; \
PATH=`pwd`/port/$$systype/bin:$$PATH; export PATH; \
for x in ${SUBDIRS}; do \
( cd $$x; pwd; \
eval "${MAKE} $$settings ${MARGS} SYSTYPE=$$systype \
VER=$$version \
$@"; \
) || exit 1; \
done \
fi
clean distclean::
rm -f .systype .settings
links: FRC
@set -e; mkdir ${DST}; cd ${DST}; pwd; ln -s ${SRC} SRC; \
ln -s SRC/Version .; cp SRC/Makefile .; chmod +w Makefile; \
systype=`${SH} SRC/port/systype`; \
for x in ${SUBDIRS} ; do \
( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \
cp SRC/Makefile Makefile; chmod +w Makefile; \
${MAKE} ${MARGS} SYSTYPE=$$systype links; \
) || exit 1; \
done
stdlinks: FRC
if [ ! -d /var/obj ]; then \
mkdir /var/obj; \
fi
${MAKE} ${MARGS} SRC=`pwd` DST=/var/obj/bind links
uplinks: FRC
@set -e; systype=`${SH} ${TOP}port/systype`; pwd=`pwd`; \
${MAKE} ${MARGS} SRC=../`basename $$pwd` "DST=../$$systype" links
FRC:
-259
View File
@@ -1,259 +0,0 @@
This is the source portion of BIND version 8. Its companions are "doc" and
"contrib" so you are probably not missing anything.
See the CHANGES file for a detailed listing of all changes. See the INSTALL
file for information on building and installing BIND.
See the SUPPORT file for information on obtaining commercial support for ISC
artifacts including BIND, INN, and DHCP.
Note that BIND 8 is in "end-of-life", having been replaced by BIND 9. See
http://www.isc.org/ for more details.
BIND 8.3.7 Highlights
Security release.
BIND 8.3.6 Highlights
Maintenance release.
BIND 8.3.5 Highlights
Maintenance release.
BIND 8.3.4 Highlights
Security Fix DoS and buffer overrun.
BIND 8.3.3 Highlights
Security Fix libbind. All applications linked against libbind
need to relinked.
'rndc restart' now preserves named's arguements
BIND 8.3.2 Highlights
dig, nslookup, host and nsupdate have improved IPv6 support.
BIND 8.3.1 Highlights
Critical bug fix to prevent DNS storms. If you have BIND 8.3.0 you
need to upgrade.
BIND 8.3.0 Highlights
IPv6 transport support in resolver (from KAME).
Opaque rdata support.
EDNS0 support.
Glue ordering to help non-ENDS0 aware clients (servers) cope with
larger responses as a result of IPv6 by allowing A records to be added
first to the additional section. IPv6 capable clients are expected to
use EDNS0 to allow larger responses to be sent.
Bug Fixes, includes BIND 8.2.5 changes.
BIND 8.2.4 Highlights
NSAP processing was not RFC 1706 compliant. NOTE: OLD MASTER FILES
NEED TO BE CORRECTED AND CACHE FILES REMOVED.
Fixes long-standing protocol incompatibility in DNSSEC support.
Avoids fwd'ing to root name servers if response will be rejected.
new port/cygwin contributed by [email protected].
new contrib/mdnkit (V1.3) from author.
new contrib/adm from official ftp site.
new contrib/host from author.
new contrib/dnsp from author.
fixed file descriptor leak in resolver.
fixed a major memory leak in the processing of dynamic updates.
numerous portability improvements.
numerous bug fixes.
BIND 8.2.3 Highlights
Improved support for Windows NT and Windows 2000.
Host stats are no longer required to track the source of a record.
IXFR improvements.
Forwarders track and use RTT to select fastest.
Unix domain sockets implementions that require the directory
to be secure, are now secured.
Many minor problems fixed.
Linux DoS removed.
BIND 8.2.2 patchlevel 5 Highlights
Bug in named-xfer (from patchlevel 4).
Portability to IPv6 versions of FreeBSD, OpenBSD, NetBSD.
Portability improvements (A/UX, AIX, IRIX, NetBSD, SCO, MPE/IX, NT).
"also-notify" option could cause memory allocation errors.
IXFR improvements (though client-side is still disabled).
Contributed software upgraded (including TIS's "dns_signer").
Several latent denial-of-service bugs fixed (from audits, not abuse).
New "make noesw" top-level target for removing encumbered components.
BIND 8.2.2 Highlights
Interoperability with MS-Win2K has been improved.
Server-side IXFR is now known to work even under high load.
Support for Windows/NT (thanks to BayNetworks).
More fixes, especially to DNSSEC, TSIG, IXFR, and selective forwarding.
More portability improvements and lint removal (A/UX 3.1.1, SCO 5.0).
Better NOTIFY behaviour, especially with large update volume.
Better UPDATE handling, including SRV RR support and RFC compliance.
Fix for "ndc reload ZONENAME" (specific zone reload) problems.
Fix for round robin when multiple CNAMEs are in use.
New "min-roots" (MINROOTS) and "serial-queries" (MAXQSERIAL) options.
Log files are no longer auto-rotated every time the server starts up.
New "ndc reconfig" command only finds new/deleted zones, no stat()ing.
New global options for "transfer-source" and "also-notify".
$GENERATE now supports more record types, and options.
BIND 8.2.1 Highlights
Bug fixes, especially to DNSSEC, TSIG, IXFR, and selective forwarding.
Portability improvements and lint removal.
Use best SOA rather than first-better when selecting an AXFR master.
$TTL now accepts symbolic time values (such as "$TTL 1h30m").
"ndc reload" now accepts a zone argument, for single-zone reloads.
ndc is better behaved; is verbose or quiet when appropriate.
event and error reporting improvements.
BIND 8.2 Highlights
RFC 2308 (Negative Caching)
RFC 2181 (DNS Clarifications)
RFC 2065 (DNS Security)
TSIG (Transaction SIGnatures)
support for multiple virtual name servers
NDC uses a "control channel" now (no more signals)
"Split DNS" via zone type "forward".
Many bug fixes
Documentation improvements
Performance enhancements
BIND 8.1.2 Highlights
Security fixes for a number of problems including:
An attacker could overwrite the stack if inverse query support
was enabled.
A number of denial of service attacks where malformed packets
could cause the server to crash.
The server was willing to answer queries on its forwarding
sockets.
Several memory leaks have been plugged.
The server no longer panics if a periodic interface scan fails due
to no file descriptors being available.
Updates to a number of ports. New ports for QNX, LynxOS, HP-UX 9.x,
and HP MPE.
"files unlimited" now works as expected on systems where setting
an infinite rlim_max for RLIMIT_NOFILE works.
Adding and deleting the same record in the same dynamic update no
longer crashes the server.
If a dynamic update fails, rollback is now done in LIFO order instead
of FIFO order.
Better behavior when priming of the root servers fails.
purge_zone() didn't work correctly for the root zone, allowing
old data to persist after loading the zone.
Improved handling of oversized UDP packets.
All hosts on the also-notify list are now notified.
The meaning of the count returned by select() varies somewhat by
operating system, and this could cause previous releases of the
server to spin.
Per-host statistics may be disabled by specifying 'host-statistics no'
in named.conf.
The maximum number of zones has been increased from 32768 to 65536.
query-source may specify an address and port that the server is
already listening on. BIND 8.1.1 required that either the address
or port be wild. E.g., you can now say:
listen-on port 53 { 10.0.0.1; };
query-source address 10.0.0.1 port 53;
The value of FD_SETSIZE to use may be specified.
Experimental -u (set user id), -g (set group id), and -t (chroot)
command line options. See the INSTALL file for details.
BIND 8 Features
-> DNS Dynamic Updates (RFC 2136)
-> DNS Change Notification (RFC 1996)
-> Completely new configuration syntax
-> Flexible, categorized logging system
-> IP-address-based access control for queries, zone transfers, and
updates that may be specified on a zone-by-zone basis
-> More efficient zone transfers
-> Improved performance for servers with thousands of zones
-> The server no longer forks for outbound zone transfers
-> Many bug fixes
File and Directory Overview
CHANGES history of added features and
fixed bugs
INSTALL how to build and install
README this file
TODO features planned but not yet written
Version the version number of this release
bin/* source for executables, including
the nameserver
include/* public .h files
lib/* the resolver and various BIND
support libraries
port/* ports to various operating systems
Kits, Questions, Comments, and Bug Reports
<URL:ftp://ftp.isc.org/isc/bind/src/cur> current non-test release
<URL:ftp://ftp.isc.org/isc/bind/src/testing> latest public test kit
<URL:usenet:comp.protocols.dns.bind> using BIND
<URL:usenet:comp.protocols.dns.ops> DNS operations in general
<URL:usenet:comp.protocols.dns.std> DNS standards in general
<URL:mailto:[email protected]> gw'd to u:c.p.d.bind
<URL:mailto:[email protected]> gw'd to u:c.p.d.std
<URL:mailto:[email protected]> code warriors only please
<URL:http://www.isc.org/bind.html> the BIND home page
<URL:mailto:[email protected]> bug reports
To Support the Effort
Note that BIND is supported by the Internet Software Consortium, and
although it is free for use and redistribution and incorporation into
vendor products and export and anything else you can think of, it
costs money to produce. That money comes from ISPs, hardware and
software vendors, companies who make extensive use of the software,
and generally kind hearted folk such as yourself.
The Internet Software Consortium has also commissioned a DHCP server
implementation, has taken over official support/release of the INN
system, and has supported the Kerberos Version 5 effort at MIT. You
can learn more about the ISC's goals and accomplishments from the web
page at <URL:http://www.isc.org/>.
-9
View File
@@ -1,9 +0,0 @@
The Internet Software Consortium offers, through certified providers, support,
training, and consulting for BIND and DHCP. These programs are documented on
our web page at:
http://www.isc.org/support.html
Discussion about programs to meet your needs is welcome at [email protected].
Please forward your questions there or call us at +1 650 779-7018 to speak
with the Director of Client Services.
-27
View File
@@ -1,27 +0,0 @@
These are not in priority order.
-> "make" should work in any subdirectory as it does in the top level.
-> "make distclean" should remove .depend files, "make clean" shouldn't.
-> NT port
-> DNS Security (RFC 2065)
-> IXFR
-> Enhanced forwarding
-> Command protocol
-> IPv6 transport
-> named-xfer elimination
-> asynchronous resolver
-> new database -- DB 2.0?
-> move man pages from doc/man/* into src/.
-> fix dynamic DNS delegation loss problem
-1
View File
@@ -1 +0,0 @@
8.3.7-REL
-94
View File
@@ -1,94 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.31 2001/08/14 05:57:57 marka Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ..
O=o
A=a
INCL = ${TOP}/include
LIBBIND = ${TOP}/lib/libbind.${A}
LIBPORT = ${TOP}/port/libport.${A}
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LEX = lex -I
YACC = yacc
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
AR= ar cru
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
MARGS = "SYSTYPE=${SYSTYPE}" "SHELL=${SHELL}" "A=${A}" "O=${O}" \
"CC=${CC}" "LEX=${LEX}" "YACC=${YACC}" "CDEBUG=${CDEBUG}" \
"SYSLIBS=${SYSLIBS}" "LDFLAGS=${LDFLAGS}" \
"DESTDIR=${DESTDIR}" "DESTMAN=${DESTMAN}" \
"DESTBIN=${DESTBIN}" "DESTSBIN=${DESTSBIN}" "DESTEXEC=${DESTEXEC}" \
"DESTLIB=${DESTLIB}" "DESTINC=${DESTINC}" "DESTETC=${DESTETC}" \
"DESTRUN=${DESTRUN}" "DESTHELP=${DESTHELP}" \
"RANLIB=${RANLIB}" "AR=${AR}" "ARPREF=${ARPREF}" "ARSUFF=${ARSUFF}" \
"INCL=../${INCL}" "PORTINCL=../${PORTINCL}" "EXE=${EXE}" \
"LIBBIND=../${LIBBIND}" "LIBPORT=../${LIBPORT}" \
"INSTALL=${INSTALL}" "TOP=../${TOP}" \
"VER=${VER}" "STRIP=${STRIP}" "PS=${PS}" "INSTALL_LIB=${INSTALL_LIB}" \
"INSTALL_EXEC=${INSTALL_EXEC}" "BOUNDS=${BOUNDS}"
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
SUBDIRS = addr nslookup dig dnsquery host named named-xfer ndc nsupdate \
mkservdb irpd dnskeygen named-bootconf
all:
@for x in ${SUBDIRS}; do \
(cd $$x; pwd; ${MAKE} ${MARGS} $@) || exit 1; \
done
install depend tags clean distclean::
@for x in ${SUBDIRS}; do \
(cd $$x; pwd; ${MAKE} ${MARGS} $@) || exit 1; \
done
distclean:: clean
clean::
rm -f *.BAK *.CKP *~ *.orig
links: FRC
@set -e; \
for x in $(SUBDIRS); do \
( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \
cp SRC/Makefile Makefile; chmod +w Makefile; \
$(MAKE) $(MARGS) links; \
) || exit 1; \
done
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-85
View File
@@ -1,85 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.27 2000/12/23 08:02:49 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= addr
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTBIN}:
mkdir -p ${DESTDIR}${DESTBIN}
install: ${DESTDIR}${DESTBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTBIN}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags *.[ch]
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-168
View File
@@ -1,168 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: addr.c,v 8.9 2002/05/21 02:26:21 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/param.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "port_after.h"
static const char *prog = "addr";
#define BIGGEST_ADDRESS IN6ADDRSZ
static void
usage() {
fprintf(stderr,
"usage: %s [-4] [-6] [-n hexstring] [-p address]\n",
prog);
exit(1);
}
/* Warning: this scribbles on `dst' even if it's going to return `0'. */
static int
hexstring(const char *src, u_char *dst, int len) {
static const char xdigits[] = "0123456789abcdef";
u_char *ptr = dst, *end = dst + len;
u_int val;
int ch, digits;
val = 0;
digits = 0;
memset(dst, 0, len);
while ((ch = *src++) != '\0') {
if (ch == '0' && (*src == 'x' || *src == 'X')) {
src++;
continue;
}
if (isascii(ch) && (isspace(ch) || ispunct(ch))) {
if (digits > 0) {
if (ptr == end)
return (0);
*ptr++ = (u_char) (val & 0xff);
val = 0;
digits = 0;
}
digits = 0;
continue;
}
if (!isascii(ch) || !isxdigit(ch))
return (0);
if (isupper(ch))
ch = tolower(ch);
/* Clock it in using little endian arithmetic. */
val <<= 4;
val |= (strchr(xdigits, ch) - xdigits);
if (++digits == 2) {
if (ptr == end)
return (0);
*ptr++ = (u_char) (val & 0xff);
digits = 0;
val = 0;
}
}
if (digits > 0) {
if (ptr == end)
return (0);
*ptr++ = (u_char) (val & 0xff);
}
return ((ptr - dst) == len);
}
static void
display(const char *input, int af, const u_char *addr, int len) {
static int before = 0;
char p[sizeof "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255"];
int i;
if (before)
putchar('\n');
else
before++;
printf("Input: \"%s\"\n", input);
printf("Network: [af%d len%d]", af, len);
for (i = 0; i < len; i++)
printf(" %02x", addr[i]);
putchar('\n');
printf("Presentation: \"%s\"\n", inet_ntop(af, addr, p, sizeof p));
}
int
main(argc, argv)
int argc;
char *argv[];
{
u_char addr[BIGGEST_ADDRESS];
int optchr, af, len, some;
prog = argv[0];
af = AF_INET;
len = INADDRSZ;
some = 0;
while ((optchr = getopt(argc, argv, "46n:p:")) != -1) {
switch (optchr) {
case '4':
af = AF_INET;
len = INADDRSZ;
break;
case '6':
af = AF_INET6;
len = IN6ADDRSZ;
break;
case 'n':
if (!hexstring(optarg, addr, len)) {
fprintf(stderr, "bad hex string: \"%s\"\n",
optarg);
usage();
/* NOTREACHED */
}
display(optarg, af, addr, len);
some++;
break;
case 'p':
if (inet_pton(af, optarg, addr) <= 0) {
fprintf(stderr, "bad address: \"%s\"\n",
optarg);
usage();
/* NOTREACHED */
}
display(optarg, af, addr, len);
some++;
break;
default:
usage();
/* NOTREACHED */
}
}
if (!some)
usage();
exit(0);
/* NOTREACHED */
}
-89
View File
@@ -1,89 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.27 2000/12/23 08:02:50 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
NSLOOKUP_OBJS= \
../nslookup/subr.${O} ../nslookup/send.${O} \
../nslookup/list.${O} ../nslookup/debug.${O}
PROG= dig
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${NSLOOKUP_OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${NSLOOKUP_OBJS} ${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTBIN}:
mkdir -p ${DESTDIR}${DESTBIN}
install: ${DESTDIR}${DESTBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTBIN}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags *.[ch]
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
File diff suppressed because it is too large. Load diff
-86
View File
@@ -1,86 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 1.7 2000/12/23 08:02:50 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
AR= ar cru
INSTALL= install
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= dnskeygen
SRCS= dnskeygen.c
OBJS= dnskeygen.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTEXEC}:
mkdir -p ${DESTDIR}${DESTEXEC}
install: ${DESTDIR}${DESTEXEC} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTEXEC}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags ${SRCS} *.h
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-321
View File
@@ -1,321 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: dnskeygen.c,v 1.14 2001/09/25 04:50:14 marka Exp $";
#endif /* not lint */
/*
* Portions Copyright (c) 1995-1999 by TISLabs at Network Associates, Inc.
*
* Permission to use, copy modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND NETWORK ASSOCIATES
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* TRUSTED INFORMATION SYSTEMS BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THE SOFTWARE.
*/
#include "port_before.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "arpa/nameser.h"
#include <isc/dst.h>
#include "port_after.h"
#define PRINT_SUPPORTED 2
#ifndef PATH_SEP
#define PATH_SEP '/'
#endif
static void usage(const char *str, int full);
static short dsa_sizes[] = {512, 576, 640, 704, 768, 832, 896, 960, 1024, 0};
static char *prog;
int
main(int argc, char **argv) {
DST_KEY *pubkey;
char *name=NULL;
int ch;
char str[128];
int alg = 0;
int zone_key = 0, user_key = 0, end_key = 0, key_type = 0;
int size = -1, exp = 0;
int no_auth = 0, no_conf = 0;
int sign_val = 0, flags = 0, protocol = -1;
int i, err = 0;
extern char *optarg;
dst_init();
if ((prog = strrchr(argv[0], PATH_SEP)) == NULL)
prog = strdup(argv[0]);
else
prog = strdup(++prog);
/* process input arguments */
while ((ch = getopt(argc, argv, "achiuzn:s:p:D:H:R:F"))!= -1) {
switch (ch) {
case 'a':
no_auth = NS_KEY_NO_AUTH;
break;
case 'c':
no_conf = NS_KEY_NO_CONF;
break;
case 'F':
exp=1;
break;
case 'n':
if (optarg)
name = strdup(optarg);
else
usage("-n not followed by name", 0);
i = strlen(name);
if (name[i-1] != '.') {
printf("** Adding dot to the name to make it"
" fully qualified domain name**\n");
free(name);
name = malloc(i+2);
strcpy(name, optarg);
strcat(name, ".");
}
break;
case 'p':
if (optarg && isdigit(optarg[0]))
protocol = atoi(optarg);
else
usage("-p flag not followed by a number", 0);
break;
case 's':
/* Default: not signatory key */
if (optarg && isdigit(optarg[0]))
sign_val = (int) atoi(optarg);
else
usage("-s flag requires a value",0);
break;
case 'h':
end_key = NS_KEY_NAME_ENTITY;
key_type++;
break;
case 'u' :
user_key = NS_KEY_NAME_USER;
key_type++;
break ;
case 'z':
zone_key = NS_KEY_NAME_ZONE;
key_type++;
break;
case 'H':
if (optarg && isdigit(optarg[0]))
size = (int) atoi(optarg);
else
usage("-H flag requires a size",0);
if (alg != 0)
usage("Only ONE alg can be specified", 1);
alg = KEY_HMAC_MD5;
if (!dst_check_algorithm(alg))
usage("Algorithm HMAC-MD5 not available",
PRINT_SUPPORTED);
break;
case 'R':
if (optarg && isdigit(optarg[0]))
size = (int) atoi(optarg);
else
usage("-R flag requires a size",0);
if (alg != 0)
usage("Only ONE alg can be specified", 1);
alg = NS_ALG_MD5RSA;
if (!dst_check_algorithm(alg))
usage("Algorithm RSA not available",
PRINT_SUPPORTED);
break;
case 'D':
if (optarg && isdigit(optarg[0]))
size = (int) atoi(optarg);
else
usage("-D flag requires a size", 0);
if (alg != 0)
usage("Only ONE alg can be specified", 1);
alg = NS_ALG_DSS;
if (dst_check_algorithm(alg) == 0)
usage("Algorithm DSS not available",
PRINT_SUPPORTED);
break;
default:
err++;
} /* switch */
} /* while (getopt) */
/*
* Command line parsed make sure required parameters are present
*/
if (name == NULL)
usage("No key name specified -n <name>", 1);
if (alg == 0)
usage("No algorithm specififed -{DHR}", 1);
if (key_type == 0)
usage("Key type -{zhu} must be specified", 1);
else if (key_type > 1)
usage("Only one key type -{zhu} must be specified", 1);
if (alg == NS_ALG_DSS)
no_conf = NS_KEY_NO_CONF; /* dss keys can not encrypt */
if (protocol == -1) {
if (zone_key || end_key)
protocol = NS_KEY_PROT_DNSSEC;
else
protocol = NS_KEY_PROT_EMAIL;
}
if (protocol < 0 || protocol > 255)
usage("Protocol value out of range [0..255]", 0);
if (sign_val < 0 || sign_val > 15) {
sprintf(str, "%s: Signatory value %d out of range[0..15]\n",
prog, sign_val);
usage(str, 0);
}
/* if any of bits 321 is set bit 0 can not be set*/
if (sign_val & 0xe)
sign_val &= 0xe;
/* if a zone key make sure at least one of the signer flags is set */
if ((protocol == NS_KEY_PROT_DNSSEC) && (sign_val == 0))
sign_val = 0x01;
if (no_auth && no_conf) { /* null key specified */
if (sign_val > 0)
sign_val = 0x0; /* null key can not sign */
if (size > 0)
size = 0; /* null key must have size 0 */
}
if (size > 0) {
if (alg == NS_ALG_MD5RSA){
if (size < 512 || size > 4096)
usage("Size out of range", 1);
}
else if (exp)
usage("-F can only be specified with -R", 0);
if (alg == NS_ALG_DSS) {
for (i = 0; dsa_sizes[i]; i++)
if (size <= dsa_sizes[i])
break;
if (size != dsa_sizes[i])
usage("Invalid DSS key size", 1);
}
}
else if (size < 0)
usage("No size specified", 0);
else /* size == 0 */
sign_val = 0;
if (err)
usage("errors encountered/unknown flag", 1);
flags = no_conf | no_auth | end_key | user_key | zone_key | sign_val;
/* process defaults */
#ifdef WARN_NONZONE_SIGNER
if (signer && (user_key | end_key))
printf("Warning: User/End key is allowed to sign\n");
#endif
/* create a public/private key pair */
if (alg == NS_ALG_MD5RSA)
printf("Generating %d bit RSA Key for %s\n\n",size, name);
else if (alg == NS_ALG_DSS)
printf("Generating %d bit DSS Key for %s\n\n",size, name);
else if (alg == KEY_HMAC_MD5)
printf("Generating %d bit HMAC-MD5 Key for %s\n\n",
size, name);
/* Make the key
* dst_generate_key_pair will place result in files that it
* knows about K<name><foot>.public and K<name><foot>.private
*/
pubkey = dst_generate_key(name, size, exp, flags, protocol, alg);
if (pubkey == NULL) {
printf("Failed generating key for %s\n", name);
exit(12);
}
if (dst_write_key(pubkey, DST_PRIVATE) < 0) {
printf ("Failed to write private key for %s %d %d\n",
name, pubkey->dk_id, pubkey->dk_alg);
exit(12);
}
if (dst_write_key(pubkey, DST_PUBLIC) <= 0) {
if (access(name, F_OK))
printf("Not allowed to overwrite existing file\n");
else
printf("Failed to write public key for %s %d %d\n",
name, pubkey->dk_id, pubkey->dk_alg);
exit(12);
}
printf("Generated %d bit Key for %s id=%d alg=%d flags=%d\n\n",
size, name, pubkey->dk_id, pubkey->dk_alg,
pubkey->dk_flags);
exit(0);
}
static void
usage(const char *str, int flag) {
int i;
printf("\nNo key generated\n");
if (*str != '\0')
printf("Usage:%s: %s\n",prog, str);
printf("Usage:%s -{DHR} <size> [-F] -{zhu} [-ac] [-p <no>]"
" [-s <no>] -n name\n", prog);
if (flag == 0)
exit(2);
printf("\t-D generate DSA/DSS KEY: size must be one of following:\n");
printf("\t\t");
for(i = 0; dsa_sizes[i] > 0; i++)
printf(" %d,", dsa_sizes[i]);
printf("\n");
printf("\t-H generate HMAC-MD5 KEY: size in the range [1..512]:\n");
printf("\t-R generate RSA KEY: size in the range [512..4096]\n");
printf("\t-F RSA KEYS only: use large exponent\n");
printf("\t-z Zone key \n");
printf("\t-h Host/Entity key \n");
printf("\t-u User key \n");
printf("\t-a Key CANNOT be used for authentication\n");
printf("\t-c Key CANNOT be used for encryption\n");
printf("\t-p Set protocol field to <no>\n");
printf("\t\t default: 2 (email) for Host keys, 3 (dnssec) for all others\n");
printf("\t-s Strength value this key signs DNS records with\n");
printf("\t\t default: 1 for Zone keys, 0 for all others\n");
printf("\t-n name: the owner of the key\n");
if (flag == PRINT_SUPPORTED) {
printf("Available algorithms are:");
if (dst_check_algorithm(NS_ALG_MD5RSA) == 1)
printf(" RSA");
if (dst_check_algorithm(NS_ALG_DSS) == 1)
printf(" DSS");
if (dst_check_algorithm(KEY_HMAC_MD5) == 1)
printf(" HMAC-MD5");
printf("\n");
}
exit (3);
}
-85
View File
@@ -1,85 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.26 2000/12/23 08:02:51 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= dnsquery
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTBIN}:
mkdir -p ${DESTDIR}${DESTBIN}
install: ${DESTDIR}${DESTBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTBIN}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags *.[ch]
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-232
View File
@@ -1,232 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: dnsquery.c,v 8.19.10.1 2003/06/02 09:15:45 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "port_after.h"
#include <resolv.h>
extern int errno;
extern int h_errno;
extern char *h_errlist[];
struct __res_state res;
static int
newserver(char *srv, union res_sockaddr_union *u, int ns, int max) {
struct addrinfo *answer = NULL;
struct addrinfo *cur = NULL;
struct addrinfo hint;
short port = htons(NAMESERVER_PORT);
memset(&hint, 0, sizeof(hint));
hint.ai_socktype = SOCK_DGRAM;
if (!getaddrinfo(srv, NULL, &hint, &answer)) {
for (cur = answer; cur != NULL; cur = cur->ai_next) {
if (ns >= max)
break;
switch (cur->ai_addr->sa_family) {
case AF_INET6:
u[ns].sin6 =
*(struct sockaddr_in6*)cur->ai_addr;
u[ns++].sin6.sin6_port = port;
break;
case AF_INET:
u[ns].sin = *(struct sockaddr_in*)cur->ai_addr;
u[ns++].sin6.sin6_port = port;
break;
}
}
freeaddrinfo(answer);
} else {
fprintf(stderr, "Bad nameserver (%s)\n", srv);
exit(1);
}
return (ns);
}
int
main(int argc, char *argv[]) {
char name[MAXDNAME];
u_char answer[8*1024];
int c, n;
int nameservers = 0, class, type, len;
union res_sockaddr_union q_nsaddr[MAXNS];
extern int optind;
extern char *optarg;
int stream = 0, debug = 0;
/* set defaults */
len = MAXDNAME;
gethostname(name, len);
class = C_IN;
type = T_ANY;
/* if no args, exit */
if (argc == 1) {
fprintf(stderr, "Usage: %s [-h] host [-n ns] [-t type] [-c class] [-r retry] [-p period] [-s] [-v] [-d] [-a]\n", argv[0]);
exit(1);
}
/* handle args */
while ((c = getopt(argc, argv, "c:dh:n:p:r:st:u:v")) != -1) {
switch (c) {
case 'r' : res.retry = atoi(optarg);
break;
case 'p' : res.retrans = atoi(optarg);
break;
case 'h' : if (strlen(optarg) >= sizeof(name)) {
fprintf(stderr,
"Domain name too long (%s)\n", optarg);
exit(1);
} else
strcpy(name, optarg);
break;
case 'c' : {
int success, proto_class;
proto_class = sym_ston(__p_class_syms,
optarg, &success);
if (success)
class = proto_class;
else {
fprintf(stderr, "Bad class (%s)\n", optarg);
exit(1);
}
}
break;
case 't' : {
int success, proto_type;
proto_type = sym_ston(__p_type_syms,
optarg, &success);
if (success)
type = proto_type;
else {
fprintf(stderr, "Bad type (%s)\n", optarg);
exit(1);
}
}
break;
case 'd' : debug++;
break;
case 's' :
case 'v' : stream++;
break;
case 'n' :
/*
* If we set some nameservers here without
* using gethostbyname() first, then they will
* get overwritten when we do the first query.
* So, we must init the resolver before any
* of this.
*/
if (!(res.options & RES_INIT))
if (res_ninit(&res) == -1) {
fprintf(stderr,
"res_ninit() failed\n"
);
exit(1);
}
nameservers = newserver(optarg, q_nsaddr,
nameservers, MAXNS);
break;
default : fprintf(stderr,
"\tUsage: %s [-n ns] [-h host] [-t type] [-c class] [-r retry] [-p period] [-s] [-v] [-d] [-a]\n", argv[0]);
exit(1);
}
}
if (optind < argc) {
if (strlen(argv[optind]) >= sizeof(name)) {
fprintf(stderr,
"Domain name too long (%s)\n", argv[optind]);
exit(1);
} else {
strcpy(name, argv[optind]);
}
}
len = sizeof(answer);
if (!(res.options & RES_INIT))
if (res_ninit(&res) == -1) {
fprintf(stderr, "res_ninit() failed\n");
exit(1);
}
/*
* set these here so they aren't set for a possible call to
* gethostbyname above
*/
if (debug)
res.options |= RES_DEBUG;
if (stream)
res.options |= RES_USEVC;
/* if the -n flag was used, add them to the resolver's list */
if (nameservers != 0)
res_setservers(&res, q_nsaddr, nameservers);
/*
* if the -h arg is fully-qualified, use res_query() since
* using res_search() will lead to use of res_querydomain()
* which will strip the trailing dot
*/
if (name[strlen(name) - 1] == '.') {
n = res_nquery(&res, name, class, type, answer, len);
if (n < 0) {
fprintf(stderr, "Query failed (h_errno = %d) : %s\n",
h_errno, h_errlist[h_errno]);
exit(1);
}
} else if ((n = res_nsearch(&res, name, class, type,
answer, len)) < 0) {
fprintf(stderr, "Query failed (h_errno = %d) : %s\n",
h_errno, h_errlist[h_errno]);
exit(1);
}
res_pquery(&res, answer, n, stdout);
exit(0);
}
-85
View File
@@ -1,85 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.26 2000/12/23 08:02:51 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= host
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTBIN}:
mkdir -p ${DESTDIR}${DESTBIN}
install: ${DESTDIR}${DESTBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTBIN}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags *.[ch]
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
File diff suppressed because it is too large. Load diff
-101
View File
@@ -1,101 +0,0 @@
## Copyright (c) 1996, 1997 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 1.7 2000/12/23 08:02:52 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
YACC = yacc -d
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
DESTETC= /etc
DESTRUN= /var/run
AR= ar cru
INSTALL= install
STRIP=-s
PS=ps
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL} -I${TOP}/lib/irs ${DEFS}
VER= LOCAL-`date +%y%m%d.%H%M%S`
HOSTNAMECMD= hostname || uname -n
PROG= irpd
HDRS=
SRCS= irpd.c
OBJS= irpd.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: irpd.${O} tmp_version.${O} ${LIBBIND}
${CC} ${CDEBUG} ${LDFLAGS} -o ${PROG}${EXE} ${OBJS} tmp_version.${O} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
tmp_version.${O}: tmp_version.c
tmp_version.c: version.c Makefile ../Makefile ${SRCS} ${HDRS}
(u=$${USER-root} d=`pwd` h=`${HOSTNAMECMD}` t=`date`; \
sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
< version.c > tmp_version.c); sleep 1
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
rm -f tmp_version.c tmp_version.${O}
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} -I${TOP}/lib/irs ${DEFS} ${SRCS}
${DESTDIR}${DESTSBIN}:
mkdir -p ${DESTDIR}${DESTSBIN}
install: ${DESTDIR}${DESTSBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c -m 755 ${PROG}${EXE} ${DESTDIR}${DESTSBIN}/${PROG}${EXE}
links: FRC
@ln -s SRC/*.[chy] SRC/test .; rm -f ns_parser.[ch]
tags: FRC
ctags ${SRCS} *.h
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
File diff suppressed because it is too large. Load diff
-11
View File
@@ -1,11 +0,0 @@
# Private irs config file for irpd so that it doesn't get configured to
# talk to itself.
passwd local
group local
services local
protocols local
hosts dns continue
hosts local
networks dns continue
networks local
netgroup local
-25
View File
@@ -1,25 +0,0 @@
/*
* Copyright (c) 1996 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef lint
char sccsid[] = "@(#)named %VERSION% %WHEN% %WHOANDWHERE%";
char rcsid[] = "$Id: version.c,v 1.1 1999/01/18 07:47:17 vixie Exp $";
#endif /* not lint */
char Version[] = "named %VERSION% %WHEN%\n\t%WHOANDWHERE%";
char ShortVersion[] = "%VERSION%";
-84
View File
@@ -1,84 +0,0 @@
## Copyright (c) 1998,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 1.8 2000/12/23 08:02:52 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= mkservdb
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTBIN}:
mkdir -p ${DESTDIR}${DESTBIN}
install: ${DESTDIR}${DESTBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTBIN}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags *.[ch]
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-176
View File
@@ -1,176 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: mkservdb.c,v 1.10 2001/06/18 14:42:46 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1998,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <ctype.h>
#ifdef IRS_LCL_SV_DB
#include <db.h>
#include <err.h>
#endif
#include <fcntl.h>
#include <limits.h>
#include <netdb.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../../include/irs.h"
#include "../../lib/irs/irs_p.h"
#include "../../include/isc/misc.h"
#include "port_after.h"
#ifdef SPRINTF_CHAR
# define SPRINTF(x) strlen(sprintf/**/x)
#else
# define SPRINTF(x) ((size_t)sprintf x)
#endif
#ifndef IRS_LCL_SV_DB
main(int argc, char **argv) {
fprintf(stderr, "%s: not supported on this architecture\n", argv[0]);
exit(1);
}
#else
#define _PATH_SERVICES_DB_TMP _PATH_SERVICES_DB ".new"
struct servent *getnextent(FILE *);
int
main(int argc, char **argv) {
DB *db;
DBT key;
DBT data;
const char *filename = _PATH_SERVICES;
const char *tmpdatabase = _PATH_SERVICES_DB_TMP;
const char *database = _PATH_SERVICES_DB;
char dbuf[1024];
char kbuf[512];
u_short *ports;
struct lcl_sv lcl_sv;
struct servent *sv;
int n, r;
char *p;
unlink(tmpdatabase);
if (argc > 1)
filename = argv[1];
lcl_sv.fp = fopen(filename, "r");
if (lcl_sv.fp == NULL)
err(1, "%s", filename);
db = dbopen(tmpdatabase, O_CREAT|O_RDWR, 0444, DB_BTREE, NULL);
if (db == NULL)
err(1, "%s", tmpdatabase);
while ((sv = irs_lclsv_fnxt(&lcl_sv)) != NULL) {
if (sv->s_proto == NULL)
continue;
key.data = kbuf;
data.data = dbuf;
/* Note that (sizeof "/") == 2. */
if (strlen(sv->s_name) + sizeof "/" + strlen(sv->s_proto)
> sizeof kbuf)
continue;
key.size = SPRINTF((kbuf, "%s/%s", sv->s_name, sv->s_proto))+1;
((u_short *)dbuf)[0] = sv->s_port;
p = dbuf;
p += sizeof(u_short);
if (sv->s_aliases)
for (n = 0; sv->s_aliases[n]; ++n) {
strcpy(p, sv->s_aliases[n]);
p += strlen(p) + 1;
}
data.size = p - dbuf;
if ((r = db->put(db, &key, &data, R_NOOVERWRITE))) {
if (r < 0)
errx(1, "failed to write %s", (char *)key.data);
else
warnx("will not overwrite %s", (char *)key.data);
}
for (n = 0; sv->s_aliases[n]; ++n) {
if (strlen(sv->s_aliases[n]) + sizeof "/"
+ strlen(sv->s_proto) > sizeof kbuf)
continue;
key.size = SPRINTF((kbuf, "%s/%s",
sv->s_aliases[n], sv->s_proto))+1;
if ((r = db->put(db, &key, &data, R_NOOVERWRITE))) {
if (r < 0)
errx(1, "failed to write %s",
(char *)key.data);
else
warnx("will not overwrite %s",
(char *)key.data);
}
}
ports = (u_short *)kbuf;
ports[0] = 0;
ports[1] = sv->s_port;
strcpy((char *)(ports+2), sv->s_proto);
key.size = sizeof(u_short) * 2 + strlen((char *)(ports+2)) + 1;
if (strlen(sv->s_name) + sizeof "/" + strlen(sv->s_proto)
> sizeof dbuf)
continue;
p = dbuf;
p += SPRINTF((p, "%s/%s", sv->s_name, sv->s_proto)) + 1;
if (sv->s_aliases != NULL)
for (n = 0; sv->s_aliases[n] != NULL; n++)
if ((p + strlen(sv->s_aliases[n]) + 1) - dbuf
<= (int)sizeof dbuf) {
strcpy(p, sv->s_aliases[n]);
p += strlen(p) + 1;
}
data.size = p - dbuf;
if ((r = db->put(db, &key, &data, R_NOOVERWRITE))) {
if (r < 0)
errx(1, "failed to write %d/%s",
ntohs(sv->s_port), sv->s_proto);
else
warnx("will not overwrite %d/%s",
ntohs(sv->s_port), sv->s_proto);
}
}
db->close(db);
if (isc_movefile(tmpdatabase, database))
err(1, "rename %s -> %s", tmpdatabase, database);
exit(0);
}
#endif
@@ -1,324 +0,0 @@
#!/usr/bin/perl
## Copyright (c) 1996-1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
## $Id: named-bootconf.pl,v 1.2 1999/01/08 19:27:35 vixie Exp $
# This is a filter. Input is a named.boot. Output is a named.conf.
$new_config = "";
$have_options = 0;
%options = ();
%options_comments = ();
@topology = ();
@topology_comments = ();
@bogus = ();
@bogus_comments = ();
@transfer_acl = ();
@transfer_comments = ();
$logging = "";
while(<>) {
next if /^$/;
# skip comment-only lines
if (/^\s*;+\s*(.*)$/) {
$new_config .= "// $1\n";
next;
}
# handle continued lines
while (/\\$/) {
s/\\$/ /;
$_ .= <>;
}
chop;
# deal with lines ending in a coment
if (s/\s*;+\s*(.*)$//) {
$comment = "// $1";
} else {
$comment = "";
}
($directive, @rest) = split;
$class = "";
if ($directive =~ /^(.*)\/(.*)$/) {
$directive = $1;
$class = $2;
}
if ($directive eq "primary") {
$zname = shift(@rest);
&maybe_print_comment("","\n");
$new_config .= "zone \"$zname\" ";
if ($class ne "") {
$new_config .= "$class ";
}
$new_config .= "{\n";
$new_config .= "\ttype master;\n";
$filename = shift(@rest);
$new_config .= "\tfile \"$filename\";\n";
$new_config .= "};\n\n";
} elsif ($directive eq "secondary" || $directive eq "stub") {
if ($directive eq "secondary") {
$type = "slave";
} else {
$type = "stub";
}
$zname = shift(@rest);
&maybe_print_comment("","\n");
$new_config .= "zone \"$zname\" ";
if ($class ne "") {
$new_config .= "$class ";
}
$new_config .= "{\n";
$new_config .= "\ttype $type;\n";
$filename = pop(@rest);
if ($filename =~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) {
push(@rest, $filename);
$filename = "";
} else {
$new_config .= "\tfile \"$filename\";\n";
}
$new_config .= "\tmasters {\n";
foreach $master (@rest) {
$new_config .= "\t\t$master;\n";
}
$new_config .= "\t};\n";
$new_config .= "};\n\n";
} elsif ($directive eq "cache") {
$zname = shift(@rest);
&maybe_print_comment("","\n");
$new_config .= "zone \"$zname\" {\n";
$new_config .= "\ttype hint;\n";
$filename = shift(@rest);
$new_config .= "\tfile \"$filename\";\n";
$new_config .= "};\n\n";
} elsif ($directive eq "directory") {
$options{"directory"} = "\"$rest[0]\"";
$options_comments{"directory"} = $comment;
$have_options = 1;
} elsif ($directive eq "check-names") {
$type = shift(@rest);
if ($type eq "primary") {
$type = "master";
} elsif ($type eq "secondary") {
$type = "slave";
}
$action = shift(@rest);
$options{"check-names $type"} = $action;
$options_comments{"check-names $type"} = $comment;
$have_options = 1;
} elsif ($directive eq "forwarders") {
$options{"forwarders"}="{\n";
foreach $forwarder (@rest) {
$options{"forwarders"} .= "\t\t$forwarder;\n";
}
$options{"forwarders"} .= "\t}";
$options_comments{"forwarders"} = $comment;
$have_options = 1;
} elsif ($directive eq "slave") {
&handle_options("forward-only");
} elsif ($directive eq "options") {
&handle_options(@rest);
} elsif ($directive eq "limit") {
&handle_limit(@rest);
} elsif ($directive eq "include") {
$new_config .=
"// make sure your include is still in the right place\n";
$comment = "\t" . $comment;
$new_config .= "include \"$rest[0]\";$comment\n\n";
} elsif ($directive eq "xfrnets" || $directive eq "tcplist") {
if ($comment ne "") {
$comment = "\t$comment";
}
foreach $elt (@rest) {
push(@transfer_acl, $elt);
push(@transfer_comments, $comment);
}
$have_options = 1;
} elsif ($directive eq "sortlist") {
if ($comment ne "") {
$comment = "\t$comment";
}
foreach $elt (@rest) {
push(@topology, $elt);
push(@topology_comments, $comment);
}
} elsif ($directive eq "bogusns") {
if ($comment ne "") {
$comment = "\t$comment";
}
foreach $elt (@rest) {
push(@bogus, $elt);
push(@bogus_comments, $comment);
}
} elsif ($directive eq "max-fetch") {
$options{"transfers-in"}=$rest[0];
$options_comments{"transfers-in"}=$comment;
$have_options = 1;
} else {
$new_config .= "// NOTE: unconverted directive '$directive @rest'\n\n";
}
}
print "// generated by named-bootconf.pl\n\n";
if ($have_options) {
print "options {\n";
foreach $option (sort(keys(%options))) {
print "\t$option $options{$option};";
if ($options_comments{$option} ne "") {
print "\t$options_comments{$option}";
}
print "\n";
}
if (@transfer_acl > 0) {
print "\tallow-transfer {\n";
for ($i = 0; $i <= $#transfer_acl; $i++) {
&print_maybe_masked("\t\t", $transfer_acl[$i],
$transfer_comments[$i]);
}
print "\t};\n";
}
print "\t/*
\t * If there is a firewall between you and nameservers you want
\t * to talk to, you might need to uncomment the query-source
\t * directive below. Previous versions of BIND always asked
\t * questions using port 53, but BIND 8.1 uses an unprivileged
\t * port by default.
\t */
\t// query-source address * port 53;
";
print "};\n\n";
}
if ($logging ne "") {
print "logging {\n$logging};\n\n";
}
if (@topology > 0) {
print "// Note: the following will be supported in a future release.\n";
print "/*\n";
print "host { any; } {\n\ttopology {\n";
for ($i = 0; $i <= $#topology; $i++) {
&print_maybe_masked("\t\t", $topology[$i],
$topology_comments[$i]);
}
print "\t};\n};\n";
print "*/\n";
print "\n";
}
if (@bogus > 0) {
for ($i = 0; $i <= $#bogus; $i++) {
print "server $bogus[$i] { bogus yes; };$bogus_comments[$i]\n";
}
print "\n";
}
print $new_config;
exit 0;
sub maybe_print_comment {
$prefix = shift;
$suffix = shift;
if ($comment ne "") {
$new_config .= sprintf("%s%s%s", $prefix, $comment, $suffix);
}
}
sub handle_options {
foreach $option (@_) {
if ($option eq "forward-only") {
$options{"forward"}="only";
$options_comments{"forward"}=$comment;
$have_options = 1;
} elsif ($option eq "no-recursion") {
$options{"recursion"}="no";
$options_comments{"recursion"}=$comment;
$have_options = 1;
} elsif ($option eq "no-fetch-glue") {
$options{"fetch-glue"}="no";
$options_comments{"fetch-glue"}=$comment;
$have_options = 1;
} elsif ($option eq "fake-iquery") {
$options{"fake-iquery"}="yes";
$options_comments{"fake-iquery"}=$comment;
$have_options = 1;
} elsif ($option eq "query-log") {
if ($comment ne "") {
$logging .= "\t$comment\n";
}
$logging .= "\tcategory queries { default_syslog; };\n";
} else {
$options{"// NOTE: unconverted option '$option'"}="";
$options_comments{"// NOTE: unconverted option '$option'"}=
$comment;
$have_options = 1;
}
}
}
sub handle_limit {
$limit = shift;
if ($limit eq "datasize" || $limit eq "transfers-in"
|| $limit eq "transfers-per-ns" || $limit eq "files") {
$options{$limit}=$_[0];
$options_comments{$limit}=$comment;
$have_options = 1;
} else {
$options{"// NOTE: unconverted limit '$limit @_'"}="";
$options_comments{"// NOTE: unconverted limit '$limit @_'"}=$comment;
$have_options = 1;
}
}
sub print_maybe_masked {
# this assumes a contiguous netmask starting at the MSB
$prefix = shift;
$elt = shift;
$elt_comment = shift;
if ($elt =~ /^(.*)&(.*)$/) {
$address = $1;
$mask = $2;
($m1,$m2,$m3,$m4) = split(/\./, $mask);
$mask_val = ($m1 << 24) + ($m2 << 16) +($m3 << 8) + $m4;
$zero_bits = 0;
while (($mask_val % 2) == 0) {
$mask_val /= 2;
$zero_bits++;
}
$mask_bits = 32 - $zero_bits;
} else {
$address = $elt;
($a1,$a2,$a3,$a4) = split(/\./, $address);
if ($a1 < 128) {
$mask_bits = 8;
} elsif ($a1 < 192) {
$mask_bits = 16;
} else {
$mask_bits = 24;
}
}
print "$prefix$address";
if ($mask_bits != 32) {
print "/$mask_bits";
}
print ";$elt_comment\n";
}
-77
View File
@@ -1,77 +0,0 @@
## Copyright (c) 1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 1.3 2000/12/23 08:02:53 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= named-bootconf
all: ${PROG}
${PROG}: ${PROG}.sh Makefile
cp ${PROG}.sh ${PROG}
chmod +x ${PROG}
distclean: clean
clean: FRC
rm -f ${PROG}
rm -f *.BAK *.CKP *~ *.orig
depend:
${DESTDIR}${DESTSBIN}:
mkdir -p ${DESTDIR}${DESTSBIN}
install: ${DESTDIR}${DESTSBIN} ${PROG}
${INSTALL} -c -m 755 ${PROG} ${DESTDIR}${DESTSBIN}/${PROG}
links: FRC
@set -e; ln -s SRC/*.sh .
tags:
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
@@ -1,321 +0,0 @@
#!/bin/sh
#
# $NetBSD: named-bootconf.sh,v 1.5 1998/12/15 01:00:53 tron Exp $
#
# Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Matthias Scheler.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
## Copyright (c) 1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
if [ ${OPTIONFILE-X} = X ]; then
OPTIONFILE=/tmp/.options.`date +%s`.$$
ZONEFILE=/tmp/.zones.`date +%s`.$$
COMMENTFILE=/tmp/.comments.`date +%s`.$$
export OPTIONFILE ZONEFILE COMMENTFILE
touch $OPTIONFILE $ZONEFILE $COMMENTFILE
DUMP=1
else
DUMP=0
fi
while read CMD ARGS; do
class=
CMD=`echo "${CMD}" | tr '[A-Z]' '[a-z]'`
case $CMD in
\; )
echo \# $ARGS >>$COMMENTFILE
;;
cache )
set - X $ARGS
shift
if [ $# -eq 2 ]; then
(echo ""
cat $COMMENTFILE
echo "zone \"$1\" {"
echo " type hint;"
echo " file \"$2\";"
echo "};") >>$ZONEFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
fi
;;
directory )
set - X $ARGS
shift
if [ $# -eq 1 ]; then
(cat $COMMENTFILE
echo " directory \"$1\";") >>$OPTIONFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
DIRECTORY=$1
export DIRECTORY
fi
;;
forwarders )
(cat $COMMENTFILE
echo " forwarders {"
for ARG in $ARGS; do
echo " $ARG;"
done
echo " };") >>$OPTIONFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
;;
include )
if [ "$ARGS" != "" ]; then
(cd ${DIRECTORY-.}; cat $ARGS) | $0
fi
;;
limit )
ARGS=`echo "${ARGS}" | tr '[A-Z]' '[a-z]'`
set - X $ARGS
shift
if [ $# -eq 2 ]; then
cat $COMMENTFILE >>$OPTIONFILE
case $1 in
datasize | files | transfers-in | transfers-per-ns )
echo " $1 $2;" >>$OPTIONFILE
;;
esac
rm -f $COMMENTFILE
touch $COMMENTFILE
fi
;;
options )
ARGS=`echo "${ARGS}" | tr '[A-Z]' '[a-z]'`
cat $COMMENTFILE >>$OPTIONFILE
for ARG in $ARGS; do
case $ARG in
fake-iquery )
echo " fake-iquery yes;" >>$OPTIONFILE
;;
forward-only )
echo " forward only;" >>$OPTIONFILE
;;
no-fetch-glue )
echo " fetch-glue no;" >>$OPTIONFILE
;;
no-recursion )
echo " recursion no;" >>$OPTIONFILE
;;
no-round-robin ) # HP extention
echo " rrset-order {" >>$OPTIONFILE
echo " class ANY type ANY name \"*\" order fixed;" >>$OPTIONFILE
echo " };" >>$OPTIONFILE
;;
esac
done
rm -f $COMMENTFILE
touch $COMMENTFILE
;;
primary|primary/* )
case $CMD in
primary/chaos )
class="chaos "
;;
primary/hs )
class="hesiod "
;;
esac
set - X $ARGS
shift
if [ $# -eq 2 ]; then
(echo ""
cat $COMMENTFILE
echo "zone \"$1\" ${class}{"
echo " type master;"
echo " file \"$2\";"
echo "};") >>$ZONEFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
fi
;;
secondary|secondary/* )
case $CMD in
secondary/chaos )
class="chaos "
;;
secondary/hs )
class="hesiod "
;;
esac
set - X $ARGS
shift
if [ $# -gt 1 ]; then
ZONE=$1
shift
PRIMARIES=""
while [ $# -gt 1 ]; do
PRIMARIES="$PRIMARIES $1"
shift
done
(echo ""
cat $COMMENTFILE
echo "zone \"$ZONE\" ${class}{"
echo " type slave;"
if expr x"$1" : '^x[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' > /dev/null
then
PRIMARIES="$PRIMARIES $1"
else
echo " file \"$1\";"
fi
echo " masters {"
for PRIMARY in $PRIMARIES; do
echo " $PRIMARY;"
done
echo " };"
echo "};") >>$ZONEFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
fi
;;
stub|stub/* )
case $CMD in
stub/chaos )
class="chaos "
;;
stub/hs )
class="hesiod "
;;
esac
set - X $ARGS
shift
if [ $# -gt 1 ]; then
ZONE=$1
shift
PRIMARIES=""
while [ $# -gt 1 ]; do
PRIMARIES="$PRIMARIES $1"
shift
done
(echo ""
cat $COMMENTFILE
echo "zone \"$ZONE\" ${class}{"
echo " type stub;"
if expr x"$1" : '^x[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' > /dev/null
then
PRIMARIES="$PRIMARIES $1"
else
echo " file \"$1\";"
fi
echo " masters {"
for PRIMARY in $PRIMARIES; do
echo " $PRIMARY;"
done
echo " };"
echo "};") >>$ZONEFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
fi
;;
slave )
cat $COMMENTFILE >>$OPTIONFILE
echo " forward only;" >>$OPTIONFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
;;
sortlist )
(cat $COMMENTFILE
echo " topology {"
for ARG in $ARGS; do
case $ARG in
*.0.0.0 )
echo " $ARG/8;"
;;
*.0.0 )
echo " $ARG/16;"
;;
*.0 )
echo " $ARG/24;"
;;
* )
echo " $ARG;"
;;
esac
done
echo " };") >>$OPTIONFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
;;
tcplist | xfrnets )
(cat $COMMENTFILE
echo " allow-transfer {"
for ARG in $ARGS; do
case $ARG in
*.0.0.0 )
echo " $ARG/8;"
;;
*.0.0 )
echo " $ARG/16;"
;;
*.0 )
echo " $ARG/24;"
;;
* )
echo " $ARG;"
;;
esac
done
echo " };") >>$OPTIONFILE
rm -f $COMMENTFILE
touch $COMMENTFILE
;;
esac
done
if [ $DUMP -eq 1 ]; then
echo ""
echo "options {"
cat $OPTIONFILE
echo "};"
cat $ZONEFILE $COMMENTFILE
rm -f $OPTIONFILE $ZONEFILE $COMMENTFILE
fi
exit 0
-30
View File
@@ -1,30 +0,0 @@
directory /var/named
forwarders 1.2.3.4 1.2.3.5
limit datasize 10000000
limit files 1000
limit transfers-in 100
limit transfers-per-ns 20
; no-round-robin in HP specific
options no-round-robin fake-iquery forward-only no-fetch-glue no-recursion
slave
tcplist 10.0.0.1
xfrnets 10.0.0.2
cache . rootservers
primary example.net example.net.db
secondary example.com 127.0.0.1 example.com.db
stub example.org 127.0.0.1 example.org.db
primary/IN example.net example.net.db
secondary/IN example.com 127.0.0.1 example.com.db
stub/IN example.org 127.0.0.1 example.org.db
secondary/IN example.com 127.0.0.1
stub/IN example.org 127.0.0.1
primary/CHAOS example.net example.net.db
secondary/CHAOS example.com 127.0.0.1 example.com.db
stub/CHAOS example.org 127.0.0.1 example.org.db
secondary/CHAOS example.com 127.0.0.1
stub/CHAOS example.org 127.0.0.1
primary/HS example.net example.net.db
secondary/HS example.com 127.0.0.1 example.com.db
stub/HS example.org 127.0.0.1 example.org.db
secondary/HS example.com 127.0.0.1
stub/HS example.org 127.0.0.1
-90
View File
@@ -1,90 +0,0 @@
## Copyright (c) 1996,1999 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.31 2000/12/23 08:02:54 vixie Exp $
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
LEX = lex -I
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
AR= ar cru
INSTALL= install
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL}
NAMED_OBJS= \
../named/db_glue.${O} ../named/ns_glue.${O} ../named/tmp_version.${O}
PROG= named-xfer
SRCS= ${PROG}.c
OBJS= ${PROG}.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: ${OBJS} ${NAMED_OBJS} ${LIBBIND} Makefile
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} ${NAMED_OBJS} \
${LIBBIND} ${SYSLIBS}
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
depend: ${SRCS}
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${SRCS}
${DESTDIR}${DESTEXEC}:
mkdir -p ${DESTDIR}${DESTEXEC}
install: ${DESTDIR}${DESTEXEC} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTEXEC}/${PROG}${EXE}
links: FRC
@set -e; ln -s SRC/*.[ch] .
tags: FRC
ctags ${SRCS} *.h
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
File diff suppressed because it is too large. Load diff
-134
View File
@@ -1,134 +0,0 @@
## Copyright (c) 1996-2000 by Internet Software Consortium
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
# $Id: Makefile,v 8.51 2000/12/23 08:02:53 vixie Exp $
# $FreeBSD$
DESTDIR=
CC= cc
SHELL= /bin/sh
CDEBUG= -g -Wall
#(net2 and its descendents)
SYSTYPE = freebsd
TOP = ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.a
A=a
O=o
EXE=
YACC = yacc -d
SYSLIBS = -ll -lutil
DESTBIN = /usr/local/bin
DESTSBIN = /usr/local/sbin
DESTEXEC = /usr/local/libexec
DESTMAN = /usr/share/man
DESTHELP= /usr/share/misc
DESTETC= /etc
DESTRUN= /var/run
AR= ar cru
INSTALL= install
STRIP=-s
INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL} ${DEFS}
VER= LOCAL-`date +%Y%m%d.%H%M%S`
HOSTNAMECMD= hostname || uname -n
PROG= named
HDRS= db_defs.h db_glob.h ns_defs.h ns_glob.h named.h pathnames.h
SRCS= db_dump.c db_load.c db_lookup.c db_save.c db_update.c \
db_glue.c db_ixfr.c db_sec.c db_tsig.c \
ns_parser.c ns_lexer.c ns_parseutil.c ns_ctl.c \
ns_forw.c ns_init.c ns_main.c ns_maint.c ns_req.c \
ns_resp.c ns_stats.c ns_ncache.c ns_xfr.c ns_glue.c \
ns_udp.c ns_config.c ns_update.c ns_ixfr.c ns_signal.c \
ns_sort.c ns_notify.c
OBJS= db_dump.${O} db_load.${O} db_lookup.${O} db_save.${O} db_update.${O} \
db_glue.${O} db_ixfr.${O} db_sec.${O} db_tsig.${O} \
ns_parser.${O} ns_lexer.${O} ns_parseutil.${O} ns_ctl.${O} \
ns_forw.${O} ns_init.${O} ns_main.${O} ns_maint.${O} ns_req.${O} \
ns_resp.${O} ns_stats.${O} ns_ncache.${O} ns_xfr.${O} ns_glue.${O} \
ns_udp.${O} ns_config.${O} ns_update.${O} ns_ixfr.${O} ns_signal.${O} \
ns_sort.${O} ns_notify.${O}
all: ${PROG}${EXE}
${PROG}${EXE}: pathnames.h ${OBJS} ${LIBBIND} Makefile tmp_version.${O}
${CC} ${CDEBUG} ${LDFLAGS} ${BOUNDS} -o ${PROG}${EXE} ${OBJS} \
tmp_version.${O} ${LIBBIND} ${SYSLIBS}
ns_parser.c ns_parser.h: ns_parser.y
${YACC} ns_parser.y
mv y.tab.c ns_parser.c
mv y.tab.h ns_parser.h
tmp_version.${O}: tmp_version.c
tmp_version.c: version.c Makefile ../Makefile ${SRCS} ${HDRS}
(u=$${USER-root} d=`pwd` h=`${HOSTNAMECMD}` t=`date`; \
sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
< version.c > tmp_version.c); sleep 1
pathnames.h: ${TOP}/.settings Makefile pathtemplate.h
rm -f pathnames.h
sed -e "s|%DESTSBIN%|${DESTSBIN}|" \
-e "s|%DESTEXEC%|${DESTEXEC}|" \
-e "s|%DESTETC%|${DESTETC}|" \
-e "s|%DESTRUN%|${DESTRUN}|" \
< pathtemplate.h > pathnames.h
ns_signal.${O}: ns_signal.c
${CC} ${CPPFLAGS} ${CFLAGS} -c $*.c
.c.${O}:
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
distclean: clean
rm -f ns_parser.c ns_parser.h
clean: FRC
rm -f ${PROG}${EXE} ${OBJS} core .depend
rm -f *.BAK *.CKP *~ *.orig
rm -f tmp_version.c tmp_version.${O}
rm -f pathnames.h y.tab.h y.tab.c
depend: ${SRCS} pathnames.h
mkdep ${CPPFLAGS} -I${INCL} -I${PORTINCL} ${DEFS} ${SRCS}
${DESTDIR}${DESTSBIN}:
mkdir -p ${DESTDIR}${DESTSBIN}
install: ${DESTDIR}${DESTSBIN} ${PROG}${EXE}
${INSTALL} ${STRIP} -c ${INSTALL_EXEC} -m 755 ${PROG}${EXE} ${DESTDIR}${DESTSBIN}/${PROG}${EXE}
links: FRC
@ln -s SRC/*.[chy] SRC/test .; rm -f ns_parser.[ch]
tags: FRC
ctags ${SRCS} *.h
FRC:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-341
View File
@@ -1,341 +0,0 @@
/*
* from db.h 4.16 (Berkeley) 6/1/90
* $Id: db_defs.h,v 8.48 2002/11/17 14:51:50 marka Exp $
*/
/*
* Copyright (c) 1985, 1990
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Global definitions for data base routines.
*/
/* max length of data in RR data field */
#define MAXDATA (3*MAXDNAME + 5*INT32SZ)
/* max length of data in a TXT RR segment */
#define MAXCHARSTRING 255
#define DB_ROOT_TIMBUF 3600
#define TIMBUF 300
#define DICT_INDEXBITS 24
#define DICT_MAXLENGTH 127
#define DICT_INSERT_P 0x0001
/* Average hash chain depths. */
#define AVGCH_MARSHAL 5
#define AVGCH_NLOOKUP 3
/* Nonstandard maximum class to force better packing. */
#define ZONE_BITS 24
#define CLASS_BITS 8
#define ZONE_MAX ((1<<ZONE_BITS)-1)
#define CLASS_MAX ((1<<CLASS_BITS)-1)
/*
* Hash table structures.
*/
/*
* XXX
* For IPv6 transport support we need a seperate reference counted
* database of source addresses and d_addr should become a union with
* a pointer into that database. A bit can be robbed from d_rode to
* indicate what the union is being used for. This should require less
* memory than making d_addr a union of struct in6_addr and struct in_addr.
*/
#ifdef CHECK_MAGIC
#define DATABUF_MAGIC (('D'<<24)|('A'<<16)|('T'<<8)|'A')
#endif
struct databuf {
#ifdef CHECK_MAGIC
u_int32_t d_magic; /* magic number */
#endif
struct databuf *d_next; /* linked list */
struct in_addr d_addr; /* NS from whence this came */
u_int32_t d_ttl; /* time to live */
/* if d_zone == DB_Z_CACHE, then
* d_ttl is actually the time when
* the record will expire.
* otherwise (for authoritative
* master and slave zones),
* d_ttl is the time to live.
*/
unsigned d_zone :ZONE_BITS; /* zone number or 0 for the cache */
unsigned d_class :CLASS_BITS; /* class number (nonstandard limit) */
unsigned d_flags :4; /* DB_F_{??????} */
unsigned d_secure :2; /* DB_S_{??????} */
unsigned d_cred :3; /* DB_C_{??????} */
unsigned d_clev :6;
unsigned d_rcode :4; /* rcode for negative caching */
unsigned d_mark :3; /* place to mark data */
unsigned d_noedns :1; /* this server does not support edns */
int16_t d_type; /* type number */
int16_t d_size; /* size of data area */
u_int32_t d_rcnt;
#ifdef HITCOUNTS
u_int32_t d_hitcnt; /* Number of requests for this data. */
#endif /* HITCOUNTS */
u_int16_t d_nstime; /* NS response time, milliseconds */
u_char d_data[sizeof(void*)]; /* dynamic (padded) */
};
#define BIND_DATASIZE(n) (sizeof(struct databuf) - sizeof(void*) + n)
#ifdef HITCOUNTS
extern u_int32_t db_total_hits;
#endif /* HITCOUNTS */
#ifdef BIND_UPDATE
/*
* d_mark definitions
*/
#define D_MARK_DELETED 0x01
#define D_MARK_ADDED 0x02
#define D_MARK_FOUND 0x04
#endif
/*
* d_flags definitions
*/
#define DB_F_HINT 0x01 /* databuf belongs to fcachetab */
#define DB_F_ACTIVE 0x02 /* databuf is linked into a cache */
#define DB_F_FREE 0x04 /* databuf has been freed */
#define DB_F_LAME 0x08 /* databuf may refer to lame server */
/*
* d_cred definitions
*/
#define DB_C_ZONE 4 /* authoritative zone - best */
#define DB_C_AUTH 3 /* authoritative answer */
#define DB_C_ANSWER 2 /* non-authoritative answer */
#define DB_C_ADDITIONAL 1 /* additional data */
#define DB_C_CACHE 0 /* cache - worst */
/*
* d_secure definitions
*/
#define DB_S_SECURE 2 /* secure (verified) data */
#define DB_S_INSECURE 1 /* insecure data */
#define DB_S_FAILED 0 /* data that failed a security check */
struct namebuf {
u_int n_hashval; /* hash value of _n_name */
struct namebuf *n_next; /* linked list */
struct databuf *n_data; /* data records */
struct namebuf *n_parent; /* parent domain */
struct hashbuf *n_hash; /* hash table for children */
union {
char _n_name[sizeof(void*)];
unsigned char _n_len[sizeof(void*)];
} _n; /* Counted str (dynamic). */
};
#define NAMESIZE(n) (sizeof(struct namebuf) - sizeof(void*) + 1 + n + 1)
#define NAMELEN(nb) ((((nb)._n._n_len))[0])
#define NAME(nb) ((nb)._n._n_name + 1)
struct hashbuf {
int h_size; /* size of hash table */
int h_cnt; /* number of entries */
struct namebuf *h_tab[1]; /* allocated as needed */
};
#define HASHSIZE(s) (sizeof(struct hashbuf) + (s-1) * sizeof(struct namebuf *))
#define HASHSHIFT 3
#define HASHMASK 0x1f
#define HASHROTATE(v) \
(((v) << HASHSHIFT) | ((v) >> ((sizeof(v) * 8) - HASHSHIFT)))
#define HASHLOWER(c) ((isascii(c) && isupper(c)) ? tolower(c) : (c))
#define HASHIMILATE(v,c) ((v) = (HASHROTATE(v)) + (HASHLOWER(c) & HASHMASK))
#define TSIG_BUF_SIZE 640
#define TSIG_SIG_SIZE 20
struct tsig_record {
u_int8_t sig[TSIG_SIG_SIZE];
struct dst_key *key;
int siglen;
int tsig_size;
};
struct sig_record {
u_int16_t sig_type_n;
u_int8_t sig_alg_n, sig_labels_n;
u_int32_t sig_ottl_n, sig_exp_n, sig_time_n;
u_int16_t sig_keyid_n;
};
/* This is the wire format size of "struct sig_record", i.e., no padding. */
#define SIG_HDR_SIZE 18
struct dnode {
struct databuf *dp;
struct dnode *dn_next;
int line;
const char *file;
};
typedef struct dnode * dlist;
struct db_rrset {
dlist rr_list;
dlist rr_sigs;
char *rr_name;
int16_t rr_class;
int16_t rr_type;
struct db_rrset *rr_next;
};
#define DBHASHSIZE(s) (sizeof(struct hashbuf) + \
(s-1) * sizeof(struct db_rrset *))
#define SIG_COVERS(dp) (ns_get16(dp->d_data))
/*
* Flags to updatedb
*/
#define DB_NODATA 0x01 /* data should not exist */
#define DB_MEXIST 0x02 /* data must exist */
#define DB_DELETE 0x04 /* delete data if it exists */
#define DB_NOTAUTH 0x08 /* must not update authoritative data */
#define DB_NOHINTS 0x10 /* don't reflect update in fcachetab */
#define DB_PRIMING 0x20 /* is this update the result of priming? */
#define DB_MERGE 0x40 /* make no control on rr in db_update (for ixfr) */
#define DB_REPLACE 0x80 /* replace data if it exists */
#define DB_Z_CACHE 0 /* cache-zone-only db_dump() */
#define DB_Z_ALL 65535 /* normal db_dump() */
#define DB_Z_SPECIAL(z) ((z) == DB_Z_CACHE || (z) == DB_Z_ALL)
/*
* Error return codes
*/
#define OK 0
#define NONAME (-1)
#define NOCLASS (-2)
#define NOTYPE (-3)
#define NODATA (-4)
#define DATAEXISTS (-5)
#define NODBFILE (-6)
#define TOOMANYZONES (-7)
#define GOODDB (-8)
#define NEWDB (-9)
#define AUTH (-10)
#ifdef BIND_UPDATE
#define SERIAL (-11)
#endif
#define CNAMEANDOTHER (-12)
#define DNSSECFAIL (-13) /* db_set_update */
#define NONGLUE (-14)
/*
* getnum() options
*/
#define GETNUM_NONE 0x00 /* placeholder */
#define GETNUM_SERIAL 0x01 /* treat as serial number */
#define GETNUM_SCALED 0x02 /* permit "k", "m" suffixes, scale result */
/*
* db_load() options
*/
#define ISNOTIXFR 0
#define ISIXFR 1
#define ISAXFRIXFR 2
/*
* Database access abstractions.
*/
#define foreach_rr(dp, np, ty, cl, zn) \
for ((dp) = (np)->n_data; (dp) != NULL; (dp) = (dp)->d_next) \
if (!match(dp, (cl), (ty))) \
continue; \
else if (((zn) == DB_Z_CACHE) \
? stale(dp) \
: (zn) != (dp)->d_zone) \
continue; \
else if ((dp)->d_rcode) \
continue; \
else \
/* Caller code follows in sequence. */
#define DRCNTINC(x) \
do { \
if (++((x)->d_rcnt) == 0) \
ns_panic(ns_log_db, 1, "++d_rcnt == 0"); \
} while (0)
#define DRCNTDEC(x) \
do { \
if (((x)->d_rcnt)-- == 0) \
ns_panic(ns_log_db, 1, "d_rcnt-- == 0"); \
} while (0)
#define ISVALIDGLUE(xdp) ((xdp)->d_type == T_NS || (xdp)->d_type == T_A \
|| (xdp)->d_type == T_AAAA || (xdp)->d_type == ns_t_a6)
-702
View File
@@ -1,702 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
static const char rcsid[] = "$Id: db_dump.c,v 8.51 2001/06/18 14:42:49 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1986, 1988, 1990
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1995 by International Business Machines, Inc.
*
* International Business Machines, Inc. (hereinafter called IBM) grants
* permission under its copyrights to use, copy, modify, and distribute this
* Software with or without fee, provided that the above copyright notice and
* all paragraphs of this notice appear in all copies, and that the name of IBM
* not be used in connection with the marketing of any product incorporating
* the Software or modifications thereof, without specific, written prior
* permission.
*
* To the extent it has a right to do so, IBM grants an immunity from suit
* under its patents, if any, for the use, sale or manufacture of products to
* the extent that such products are used for performing Domain Name System
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
* granted for any product per se or for any other function of any product.
*
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include <isc/misc.h>
#include "port_after.h"
#include "named.h"
#ifdef HITCOUNTS
u_int32_t db_total_hits;
#endif /* HITCOUNTS */
static const char *MkCredStr(int);
static int fwd_dump(FILE *fp);
/*
* Dump current data base in a format similar to RFC 883.
*/
void
doadump(void) {
FILE *fp;
ns_notice(ns_log_db, "dumping nameserver data");
if ((fp = write_open(server_options->dump_filename)) == NULL)
return;
gettime(&tt);
#ifdef HITCOUNTS
if (NS_OPTION_P(OPTION_HITCOUNT))
fprintf(fp, "; Total hits: %d\n",db_total_hits);
#endif /* HITCOUNTS */
fprintf(fp, "; Dumped at %s", ctimel(tt.tv_sec));
if (zones != NULL && nzones != 0)
zt_dump(fp);
if (fwddata != NULL && fwddata_count != 0)
fwd_dump(fp);
fputs(
"; Note: Cr=(auth,answer,addtnl,cache) tag only shown for non-auth RR's\n",
fp);
fputs(
"; Note: NT=milliseconds for any A RR which we've used as a nameserver\n",
fp);
fprintf(fp, "; --- Cache & Data ---\n");
if (hashtab != NULL)
(void) db_dump(hashtab, fp, DB_Z_ALL, "");
fprintf(fp, "; --- Hints ---\n");
if (fcachetab != NULL)
(void) db_dump(fcachetab, fp, DB_Z_ALL, "");
(void) my_fclose(fp);
ns_notice(ns_log_db, "finished dumping nameserver data");
}
int
zt_dump(FILE *fp) {
struct zoneinfo *zp;
fprintf(fp, ";; ++zone table++\n");
for (zp = &zones[0]; zp < &zones[nzones]; zp++) {
const char *pre;
char buf[64];
u_int cnt;
if (!zp->z_origin)
continue;
fprintf(fp, "; %s (type %d, class %d, source %s)\n",
zp->z_origin
? (*zp->z_origin ? zp->z_origin : ".")
: "Nil",
zp->z_type, zp->z_class,
zp->z_source ? zp->z_source : "Nil");
fprintf(fp, ";\ttime=%lu, lastupdate=%lu, serial=%u,\n",
(u_long)zp->z_time, (u_long)zp->z_lastupdate,
zp->z_serial);
fprintf(fp, ";\trefresh=%u, retry=%u, expire=%u, minimum=%u\n",
zp->z_refresh, zp->z_retry,
zp->z_expire, zp->z_minimum);
fprintf(fp, ";\tftime=%lu, xaddrcnt=%d, state=%04x, pid=%d\n",
(u_long)zp->z_ftime, zp->z_xaddrcnt,
zp->z_flags, (int)zp->z_xferpid);
sprintf(buf, ";\tz_addr[%d]: ", zp->z_addrcnt);
pre = buf;
for (cnt = 0; cnt < zp->z_addrcnt; cnt++) {
fprintf(fp, "%s[%s]", pre, inet_ntoa(zp->z_addr[cnt]));
pre = ", ";
}
if (zp->z_addrcnt)
fputc('\n', fp);
if (zp->z_axfr_src.s_addr != 0)
fprintf(fp, ";\tupdate source [%s]\n",
inet_ntoa(zp->z_axfr_src));
}
fprintf(fp, ";; --zone table--\n");
return (0);
}
static int
fwd_dump(FILE *fp) {
int i;
fprintf(fp, ";; ++forwarders table++\n");
for (i = 0; i < fwddata_count; i++) {
if (fwddata[i] != NULL)
fprintf(fp,"; %s rtt=%d\n",
inet_ntoa(fwddata[i]->fwdaddr.sin_addr),
fwddata[i]->nsdata->d_nstime);
}
fprintf(fp, ";; --forwarders table--\n");
return (0);
}
int
db_dump(struct hashbuf *htp, FILE *fp, int zone, const char *origin) {
struct databuf *dp = NULL;
struct namebuf *np;
struct namebuf **npp, **nppend;
char dname[MAXDNAME];
u_int32_t n;
int j, i, found_data, tab, printed_origin;
u_char *cp, *end;
const char *proto, *sep;
int16_t type;
u_int16_t keyflags;
u_char *sigdata, *certdata;
u_char *savecp;
char temp_base64[NS_MD5RSA_MAX_BASE64];
found_data = 0;
printed_origin = 0;
npp = htp->h_tab;
nppend = npp + htp->h_size;
while (npp < nppend) {
for (np = *npp++; np != NULL; np = np->n_next) {
if (np->n_data == NULL)
continue;
/* Blecch - can't tell if there is data here for the
* right zone, so can't print name yet
*/
found_data = 0;
/* we want a snapshot in time... */
for (dp = np->n_data; dp != NULL; dp = dp->d_next) {
/* Is the data for this zone? */
if (zone != DB_Z_ALL && dp->d_zone != zone)
continue;
/* XXX why are we not calling stale() here? */
if (dp->d_zone == DB_Z_CACHE &&
dp->d_ttl <= (u_int32_t)tt.tv_sec &&
(dp->d_flags & DB_F_HINT) == 0)
continue;
if (!printed_origin) {
fprintf(fp, "$ORIGIN %s.\n", origin);
printed_origin++;
}
tab = 0;
if (dp->d_rcode == NXDOMAIN ||
dp->d_rcode == NOERROR_NODATA) {
fputc(';', fp);
} else if (found_data == 0 || found_data == 1) {
found_data = 2;
}
if (found_data == 0 || found_data == 2) {
if (NAME(*np)[0] == '\0') {
if (origin[0] == '\0')
fprintf(fp, ".\t");
else
fprintf(fp, ".%s.\t", origin); /* ??? */
} else
fprintf(fp, "%s\t", NAME(*np));
if (NAMELEN(*np) < (unsigned)8)
tab = 1;
found_data++;
} else {
(void) putc('\t', fp);
tab = 1;
}
if (dp->d_zone == DB_Z_CACHE) {
if (dp->d_flags & DB_F_HINT &&
(int32_t)(dp->d_ttl - tt.tv_sec)
< DB_ROOT_TIMBUF)
fprintf(fp, "%d\t", DB_ROOT_TIMBUF);
else
fprintf(fp, "%d\t",
(int)(dp->d_ttl - tt.tv_sec));
} else if (dp->d_ttl != USE_MINIMUM)
fprintf(fp, "%u\t", dp->d_ttl);
else
fprintf(fp, "%u\t",
zones[dp->d_zone].z_minimum);
fprintf(fp, "%s\t%s\t",
p_class(dp->d_class),
p_type(dp->d_type));
cp = (u_char *)dp->d_data;
sep = "\t;";
type = dp->d_type;
if (dp->d_rcode == NXDOMAIN ||
dp->d_rcode == NOERROR_NODATA) {
#ifdef RETURNSOA
if (dp->d_size == 0) {
#endif
fprintf(fp, "%s%s-$",
(dp->d_rcode == NXDOMAIN)
?"NXDOMAIN" :"NODATA",
sep);
goto eoln;
#ifdef RETURNSOA
} else {
type = T_SOA;
}
#endif
}
/*
* Print type specific data
*/
/* XXX why are we not using ns_sprintrr() here? */
switch (type) {
case T_A:
switch (dp->d_class) {
case C_IN:
case C_HS:
fputs(inet_ntoa(ina_get(cp)), fp);
break;
}
if (dp->d_nstime) {
fprintf(fp, "%sNT=%d",
sep, dp->d_nstime);
sep = " ";
}
break;
case T_CNAME:
case T_MB:
case T_MG:
case T_MR:
case T_PTR:
fprintf(fp, "%s.", cp);
break;
case T_NS:
cp = (u_char *)dp->d_data;
if (cp[0] == '\0')
fprintf(fp, ".\t");
else
fprintf(fp, "%s.", cp);
break;
case T_HINFO:
case T_ISDN: {
char buf[256];
if ((n = *cp++) != '\0') {
memcpy(buf, cp, n); buf[n] = '\0';
fprintf(fp, "\"%.*s\"", (int)n, buf);
cp += n;
} else
fprintf(fp, "\"\"");
if ((n = *cp++) != '\0') {
memcpy(buf, cp, n); buf[n] = '\0';
fprintf(fp, " \"%.*s\"", (int)n, buf);
} else
fprintf(fp, " \"\"");
break;
}
case T_SOA:
fprintf(fp, "%s.", cp);
cp += strlen((char *)cp) + 1;
fprintf(fp, " %s. (\n", cp);
#if defined(RETURNSOA)
if (dp->d_rcode)
fputs(";", fp);
#endif
cp += strlen((char *)cp) + 1;
NS_GET32(n, cp);
fprintf(fp, "\t\t%u", n);
NS_GET32(n, cp);
fprintf(fp, " %u", n);
NS_GET32(n, cp);
fprintf(fp, " %u", n);
NS_GET32(n, cp);
fprintf(fp, " %u", n);
NS_GET32(n, cp);
fprintf(fp, " %u )", n);
#if defined(RETURNSOA)
if (dp->d_rcode) {
fprintf(fp,";%s.;%s%s-$",cp,
(dp->d_rcode == NXDOMAIN) ?
"NXDOMAIN" : "NODATA",
sep);
}
#endif
break;
case T_MX:
case T_AFSDB:
case T_RT:
NS_GET16(n, cp);
fprintf(fp, "%u", n);
fprintf(fp, " %s.", cp);
break;
case T_PX:
NS_GET16(n, cp);
fprintf(fp, "%u", n);
fprintf(fp, " %s.", cp);
cp += strlen((char *)cp) + 1;
fprintf(fp, " %s.", cp);
break;
case T_X25:
if ((n = *cp++) != '\0')
fprintf(fp, " \"%.*s\"", (int)n, cp);
else
fprintf(fp, " \"\"");
break;
case T_TXT:
end = (u_char *)dp->d_data + dp->d_size;
while (cp < end) {
(void) putc('"', fp);
if ((n = *cp++) != '\0') {
for (j = n ; j > 0 && cp < end ; j--) {
if (*cp == '\n' || *cp == '"' || *cp == '\\')
(void) putc('\\', fp);
(void) putc(*cp++, fp);
}
}
(void) putc('"', fp);
if (cp < end)
(void) putc(' ', fp);
}
break;
case T_NSAP:
(void) fputs(inet_nsap_ntoa(dp->d_size,
dp->d_data, NULL),
fp);
break;
case T_AAAA: {
char t[sizeof
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"
];
(void) fputs(inet_ntop(AF_INET6, dp->d_data,
t, sizeof t),
fp);
break;
}
case T_LOC: {
char t[256];
(void) fputs(loc_ntoa(dp->d_data, t), fp);
break;
}
case T_NAPTR: {
u_int32_t order, preference;
NS_GET16(order, cp);
fprintf(fp, "%u", order);
NS_GET16(preference, cp);
fprintf(fp, "%u", preference);
n = *cp++;
fprintf(fp, "\"%.*s\"", (int)n, cp);
cp += n;
n = *cp++;
fprintf(fp, "\"%.*s\"", (int)n, cp);
cp += n;
n = *cp++;
fprintf(fp, " \"%.*s\"", (int)n, cp);
cp += n;
fprintf(fp, " %s.", cp);
break;
}
case T_SRV: {
u_int priority, weight, port;
NS_GET16(priority, cp);
NS_GET16(weight, cp);
NS_GET16(port, cp);
fprintf(fp, "\t%u %u %u %s.",
priority, weight, port, cp);
break;
}
case T_WKS:
fputs(inet_ntoa(ina_get(cp)), fp);
cp += INADDRSZ;
proto = protocolname(*cp);
cp += sizeof(char);
fprintf(fp, " %s ", proto);
i = 0;
while(cp < (u_char *)dp->d_data + dp->d_size) {
j = *cp++;
do {
if (j & 0200)
fprintf(fp, " %s",
servicename(i, proto));
j <<= 1;
} while (++i & 07);
}
break;
case T_MINFO:
case T_RP:
fprintf(fp, "%s.", cp);
cp += strlen((char *)cp) + 1;
fprintf(fp, " %s.", cp);
break;
case T_KEY:
savecp = cp; /* save the beginning */
/*>>> Flags (unsigned_16) */
NS_GET16(keyflags,cp);
fprintf(fp, "0x%04x ", keyflags);
/*>>> Protocol (8-bit decimal) */
fprintf(fp, "%3u ", *cp++);
/*>>> Algorithm id (8-bit decimal) */
fprintf(fp, "%3u ", *cp++);
/*>>> Public-Key Data (multidigit BASE64) */
/* containing ExponentLen, Exponent, and Modulus */
i = b64_ntop(cp, dp->d_size - (cp - savecp),
temp_base64,
sizeof temp_base64);
if (i < 0)
fprintf(fp, "; BAD BASE64");
else
fprintf(fp, "%s", temp_base64);
break;
case T_SIG:
sigdata = cp;
/* RRtype (char *) */
NS_GET16(n,cp);
fprintf(fp, "%s ", p_type(n));
/* Algorithm id (8-bit decimal) */
fprintf(fp, "%d ", *cp++);
/* Labels (8-bit decimal) */
fprintf(fp, "%d ", *cp++);
/* OTTL (u_long) */
NS_GET32(n, cp);
fprintf(fp, "%u ", n);
/* Texp (u_long) */
NS_GET32(n, cp);
fprintf(fp, "%s ", p_secstodate (n));
/* Tsig (u_long) */
NS_GET32(n, cp);
fprintf(fp, "%s ", p_secstodate (n));
/* Kfootprint (unsigned_16) */
NS_GET16(n, cp);
fprintf(fp, "%u ", n);
/* Signer's Name (char *) */
fprintf(fp, "%s ", cp);
cp += strlen((char *)cp) + 1;
/* Signature (base64 of any length) */
i = b64_ntop(cp, dp->d_size - (cp - sigdata),
temp_base64,
sizeof temp_base64);
if (i < 0)
fprintf(fp, "; BAD BASE64");
else
fprintf(fp, "%s", temp_base64);
break;
case T_NXT:
fprintf(fp, "%s.", cp);
n = strlen ((char *)cp) + 1;
cp += n;
i = 8 * (dp->d_size - n); /* How many bits? */
for (n = 0; n < (u_int32_t)i; n++) {
if (NS_NXT_BIT_ISSET(n, cp))
fprintf(fp," %s", p_type(n));
}
break;
case ns_t_cert:
certdata = cp;
NS_GET16(n,cp);
fprintf(fp, "%d ", n); /* cert type */
NS_GET16(n,cp);
fprintf(fp, "%d %d ", n, *cp++); /* tag & alg */
/* Certificate (base64 of any length) */
i = b64_ntop(cp,
dp->d_size - (cp - certdata),
temp_base64, sizeof(temp_base64));
if (i < 0)
fprintf(fp, "; BAD BASE64");
else
fprintf(fp, "%s", temp_base64);
break;
default:
fprintf(fp, "\\# %u", dp->d_size);
if (dp->d_size != 0) {
fputs(" ( ", fp);
isc_puthexstring(fp, dp->d_data,
dp->d_size, 40, 48,
"\n\t\t\t\t");
fputs(" ) ", fp);
}
}
if (dp->d_cred < DB_C_ZONE) {
fprintf(fp, "%sCr=%s",
sep, MkCredStr(dp->d_cred));
sep = " ";
} else {
fprintf(fp, "%sCl=%d",
sep, dp->d_clev);
sep = " ";
}
if ((dp->d_flags & DB_F_LAME) != 0) {
time_t when;
getname(np, dname, sizeof(dname));
when = db_lame_find(dname, dp);
if (when != 0 && when > tt.tv_sec) {
fprintf(fp, "%sLAME=%ld",
sep, when - tt.tv_sec);
sep = " ";
}
}
eoln:
if (dp->d_addr.s_addr != htonl(0)) {
fprintf(fp, "%s[%s]",
sep, inet_ntoa(dp->d_addr));
sep = " ";
}
#ifdef HITCOUNTS
if (NS_OPTION_P(OPTION_HITCOUNT)) {
fprintf(fp, "%shits=%d", sep, dp->d_hitcnt);
sep=" ";
}
#endif /* HITCOUNTS */
putc('\n', fp);
}
}
}
if (ferror(fp))
return (NODBFILE);
npp = htp->h_tab;
nppend = npp + htp->h_size;
while (npp < nppend) {
for (np = *npp++; np != NULL; np = np->n_next) {
if (np->n_hash == NULL)
continue;
getname(np, dname, sizeof(dname));
if (db_dump(np->n_hash, fp, zone, dname) == NODBFILE)
return (NODBFILE);
}
}
return (OK);
}
static const char *
MkCredStr(int cred) {
static char badness[20];
switch (cred) {
case DB_C_ZONE: return "zone";
case DB_C_AUTH: return "auth";
case DB_C_ANSWER: return "answer";
case DB_C_ADDITIONAL: return "addtnl";
case DB_C_CACHE: return "cache";
default: break;
}
sprintf(badness, "?%d?", cred);
return (badness);
}
-211
View File
@@ -1,211 +0,0 @@
/*
* Copyright (c) 1985, 1990
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1999 by Check Point Software Technologies, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Check Point Software Technologies Incorporated not be used
* in advertising or publicity pertaining to distribution of the document
* or software without specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND CHECK POINT SOFTWARE TECHNOLOGIES
* INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
* IN NO EVENT SHALL CHECK POINT SOFTWARE TECHNOLOGIES INCORPRATED
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* db_proc.h - prototypes for functions in db_*.c
*
* $Id: db_func.h,v 8.46 2001/06/18 14:42:51 marka Exp $
*/
/* ++from db_update.c++ */
int db_update(const char *name,
struct databuf *odp,
struct databuf *newdp,
struct databuf **savedpp,
int flags,
struct hashbuf *htp,
struct sockaddr_in from);
int db_cmp(const struct databuf *, const struct databuf *);
int findMyZone(struct namebuf *np, int class);
void fixttl(struct databuf *dp);
/* --from db_update.c-- */
/* ++from db_save.c++ */
struct namebuf * savename(const char *, int);
struct databuf * savedata(int, int, u_int32_t, u_char *, int);
struct hashbuf * savehash(struct hashbuf *);
/* --from db_save.c-- */
/* ++from db_dump.c++ */
int db_dump(struct hashbuf *, FILE *, int, const char *),
zt_dump(FILE *);
void doadump(void);
/* --from db_dump.c-- */
/* ++from db_load.c++ */
int makename_ok(char *name, const char *origin, int class,
struct zoneinfo *zp,
enum transport transport,
enum context context,
const char *owner, const char *filename,
int lineno, int size);
void endline(FILE *);
int getword(char *, size_t, FILE *, int);
int getttl(FILE *, const char *, int, u_int32_t *, int *);
int getnum(FILE *, const char *, int, int *);
int db_load(const char *, const char *, struct zoneinfo *,
const char *, int);
int getnonblank(FILE *, const char *, int);
int getservices(int, char *, FILE *, const char *);
char getprotocol(FILE *, const char *);
int makename(char *, const char *, int);
void db_err(int, char *, int, const char *, int);
int parse_sec_rdata(char *inp, int inp_len, int inp_full,
u_char *data, int data_len,
FILE *fp, struct zoneinfo *zp,
char *domain, u_int32_t ttl,
int type, enum context context,
enum transport transport,
const char **errmsg);
/* --from db_load.c-- */
/* ++from db_glue.c++ */
void buildservicelist(void);
void destroyservicelist(void);
void buildprotolist(void);
void destroyprotolist(void);
void getname(struct namebuf *, char *, int);
int servicenumber(const char *);
int protocolnumber(const char *);
int get_class(const char *);
u_int nhash(const char *);
const char * protocolname(int);
const char * servicename(u_int16_t, const char *);
struct databuf * rm_datum(struct databuf *,
struct namebuf *,
struct databuf *,
struct databuf **);
struct namebuf * rm_name(struct namebuf *,
struct namebuf **,
struct namebuf *);
void rm_hash(struct hashbuf *);
void db_detach(struct databuf **);
void db_lame_add(char *zone, char *server, time_t when);
time_t db_lame_find(char *zone, struct databuf *dp);
void db_lame_clean(void);
void db_lame_destroy(void);
/* --from db_glue.c-- */
/* ++from db_lookup.c++ */
struct namebuf * nlookup(const char *, struct hashbuf **,
const char **, int);
struct namebuf * np_parent(struct namebuf *);
int match(struct databuf *, int, int),
nxtmatch(const char *, struct databuf *,
struct databuf *),
rrmatch(const char *, struct databuf *,
struct databuf *);
/* --from db_lookup.c-- */
/* ++from db_ixfr.c++ */
ns_deltalist * ixfr_get_change_list(struct zoneinfo *, u_int32_t,
u_int32_t);
int ixfr_have_log(struct zoneinfo *, u_int32_t,
u_int32_t);
/* --from db_ixfr.c++ */
/* ++from db_sec.c++ */
int add_trusted_key(const char *name, const int flags,
const int proto, const int alg,
const char *str);
int db_set_update(char *name, struct databuf *dp,
void **state, int flags,
struct hashbuf **htp,
struct sockaddr_in from,
int *rrcount, int line,
const char *file);
/* --from db_sec.c-- */
/* ++from db_tsig.c++ */
const char * tsig_alg_name(int value);
int tsig_alg_value(char *name);
struct dst_key * tsig_key_from_addr(struct in_addr addr);
struct tsig_record * new_tsig(struct dst_key *key, u_char *sig, int siglen);
void free_tsig(struct tsig_record *tsig);
/* --from db_tsig.c-- */
-104
View File
@@ -1,104 +0,0 @@
/*
* from db.h 4.16 (Berkeley) 6/1/90
* $Id: db_glob.h,v 8.14 2000/04/21 06:54:02 vixie Exp $
*/
/*
* Copyright (c) 1985, 1990
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Global variables for data base routines.
*/
/* ONE_WEEK maximum ttl */
DECL u_int max_cache_ttl INIT(7*24*60*60);
/* no minimum ttl */
DECL u_int min_cache_ttl INIT(0);
/* current line number */
DECL int lineno INIT(0);
/* root hash table */
DECL struct hashbuf *hashtab INIT(NULL);
/* hash table of cache read from file */
DECL struct hashbuf *fcachetab INIT(NULL);
/* state of ns_reload() and ns_reconfig(). */
DECL int reloading INIT(0);
DECL int reconfiging INIT(0);
DECL int noexpired INIT(0);
DECL const int hashsizes[]
#ifdef MAIN_PROGRAM
= { 2, 11, 113, 337, 977, 2053, 4073, 8011, 16001, 99887, 0 }
#endif
;
-642
View File
@@ -1,642 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_glue.c 4.4 (Berkeley) 6/1/90";
static const char rcsid[] = "$Id: db_glue.c,v 8.47 2002/05/18 01:02:54 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1986, 1988
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include <isc/memcluster.h>
#include "port_after.h"
#include "named.h"
struct valuelist {
struct valuelist * next;
struct valuelist * prev;
char * name;
char * proto;
int port;
};
static struct valuelist *servicelist, *protolist;
void
buildservicelist() {
struct servent *sp;
struct valuelist *slp;
#ifdef MAYBE_HESIOD
setservent(0);
#else
setservent(1);
#endif
while ((sp = getservent()) != NULL) {
slp = (struct valuelist *)memget(sizeof(struct valuelist));
if (!slp)
panic("memget(servent)", NULL);
slp->name = savestr(sp->s_name, 1);
slp->proto = savestr(sp->s_proto, 1);
slp->port = ntohs((u_int16_t)sp->s_port); /* host byt order */
slp->next = servicelist;
slp->prev = NULL;
if (servicelist)
servicelist->prev = slp;
servicelist = slp;
}
endservent();
}
void
destroyservicelist() {
struct valuelist *slp, *slp_next;
for (slp = servicelist; slp != NULL; slp = slp_next) {
slp_next = slp->next;
slp->name = freestr(slp->name);
slp->proto = freestr(slp->proto);
memput(slp, sizeof *slp);
}
servicelist = NULL;
}
void
buildprotolist() {
struct protoent *pp;
struct valuelist *slp;
#ifdef MAYBE_HESIOD
setprotoent(0);
#else
setprotoent(1);
#endif
while ((pp = getprotoent()) != NULL) {
slp = (struct valuelist *)memget(sizeof(struct valuelist));
if (!slp)
panic("memget(protoent)", NULL);
slp->name = savestr(pp->p_name, 1);
slp->port = pp->p_proto; /* host byte order */
slp->next = protolist;
slp->prev = NULL;
if (protolist)
protolist->prev = slp;
protolist = slp;
}
endprotoent();
}
void
destroyprotolist() {
struct valuelist *plp, *plp_next;
for (plp = protolist; plp != NULL; plp = plp_next) {
plp_next = plp->next;
plp->name = freestr(plp->name);
memput(plp, sizeof *plp);
}
protolist = NULL;
}
static int
findservice(const char *s, struct valuelist **list) {
struct valuelist *lp = *list;
int n;
for (; lp != NULL; lp = lp->next)
if (strcasecmp(lp->name, s) == 0) {
if (lp != *list) {
lp->prev->next = lp->next;
if (lp->next)
lp->next->prev = lp->prev;
(*list)->prev = lp;
lp->next = *list;
*list = lp;
}
return (lp->port); /* host byte order */
}
if (sscanf(s, "%d", &n) != 1 || n <= 0)
n = -1;
return (n);
}
/*
* Convert service name or (ascii) number to int.
*/
int
servicenumber(const char *p) {
return (findservice(p, &servicelist));
}
/*
* Convert protocol name or (ascii) number to int.
*/
int
protocolnumber(const char *p) {
return (findservice(p, &protolist));
}
static struct servent *
cgetservbyport(u_int16_t port, const char *proto) { /* Host byte order. */
struct valuelist **list = &servicelist;
struct valuelist *lp = *list;
static struct servent serv;
port = ntohs(port);
for (; lp != NULL; lp = lp->next) {
if (port != (u_int16_t)lp->port) /* Host byte order. */
continue;
if (strcasecmp(lp->proto, proto) == 0) {
if (lp != *list) {
lp->prev->next = lp->next;
if (lp->next)
lp->next->prev = lp->prev;
(*list)->prev = lp;
lp->next = *list;
*list = lp;
}
serv.s_name = lp->name;
serv.s_port = htons((u_int16_t)lp->port);
serv.s_proto = lp->proto;
return (&serv);
}
}
return (0);
}
static struct protoent *
cgetprotobynumber(int proto) { /* Host byte order. */
struct valuelist **list = &protolist;
struct valuelist *lp = *list;
static struct protoent prot;
for (; lp != NULL; lp = lp->next)
if (lp->port == proto) { /* Host byte order. */
if (lp != *list) {
lp->prev->next = lp->next;
if (lp->next)
lp->next->prev = lp->prev;
(*list)->prev = lp;
lp->next = *list;
*list = lp;
}
prot.p_name = lp->name;
prot.p_proto = lp->port; /* Host byte order. */
return (&prot);
}
return (0);
}
const char *
protocolname(int num) {
static char number[8];
struct protoent *pp;
pp = cgetprotobynumber(num);
if (pp == 0) {
(void) sprintf(number, "%d", num);
return (number);
}
return (pp->p_name);
}
const char *
servicename(u_int16_t port, const char *proto) { /* Host byte order. */
static char number[8];
struct servent *ss;
ss = cgetservbyport(htons(port), proto);
if (ss == 0) {
(void) sprintf(number, "%d", port);
return (number);
}
return (ss->s_name);
}
static struct map map_class[] = {
{ "in", C_IN },
{ "chaos", C_CHAOS },
{ "hs", C_HS },
{ NULL, 0 }
};
int
get_class(const char *class) {
const struct map *mp;
if (isdigit(*class))
return (atoi(class));
for (mp = map_class; mp->token != NULL; mp++)
if (strcasecmp(class, mp->token) == 0)
return (mp->val);
return (C_IN);
}
/* rm_datum(dp, np, pdp, savedpp)
* remove datum 'dp' from name 'np'. pdp is previous data pointer.
* if savedpp is not NULL, and compiled with BIND_UPDATE, save
* datum dp there rather than freeing the memory (caller will take
* care of freeing it)
* return value:
* "next" field from removed datum, suitable for relinking
*/
struct databuf *
rm_datum(struct databuf *dp, struct namebuf *np, struct databuf *pdp,
struct databuf **savedpp) {
struct databuf *ndp = dp->d_next;
ns_debug(ns_log_db, 3, "rm_datum(%lx, %lx, %lx, %lx) -> %lx",
(u_long)dp, (u_long)np->n_data, (u_long)pdp,
(u_long)savedpp, (u_long)ndp);
if ((dp->d_flags & DB_F_ACTIVE) == 0)
panic("rm_datum: DB_F_ACTIVE not set", NULL);
if (pdp == NULL)
np->n_data = ndp;
else
pdp->d_next = ndp;
if (savedpp != NULL) {
/* mark deleted or pending deletion */
dp->d_mark |= D_MARK_DELETED;
dp->d_next = *savedpp;
DRCNTINC(dp);
*savedpp = dp;
} else
dp->d_next = NULL;
dp->d_flags &= ~DB_F_ACTIVE;
db_detach(&dp);
return (ndp);
}
/* rm_name(np, he, pnp)
* remove name 'np' from parent 'pp'. pnp is previous name pointer.
* return value:
* "next" field from removed name, suitable for relinking.
*/
struct namebuf *
rm_name(struct namebuf *np, struct namebuf **pp, struct namebuf *pnp) {
struct namebuf *nnp = np->n_next;
const char *msg;
/* verify */
if ( (np->n_data != NULL && (msg = "data") != NULL)
|| (np->n_hash != NULL && (msg = "hash") != NULL)
) {
ns_panic(ns_log_db, 1, "rm_name(%p(%s)): non-nil %s pointer",
np, NAME(*np), msg);
}
/* unlink */
if (pnp)
pnp->n_next = nnp;
else
*pp = nnp;
/* deallocate */
memput(np, NAMESIZE(NAMELEN(*np)));
/* done */
return (nnp);
}
void
rm_hash(struct hashbuf *htp) {
REQUIRE(htp != NULL);
REQUIRE(htp->h_cnt == 0);
memput(htp, HASHSIZE(htp->h_size));
}
/*
* Get the domain name of 'np' and put in 'buf'. Bounds checking is done.
*/
void
getname(struct namebuf *np, char *buf, int buflen) {
char *cp;
int i;
cp = buf;
while (np != NULL) {
i = (int) NAMELEN(*np);
if (i + 1 >= buflen) {
strcpy(buf, "Name_Too_Long");
return;
}
if (cp != buf)
*cp++ = '.';
memcpy(cp, NAME(*np), i);
cp += i;
buflen -= i + 1;
np = np->n_parent;
}
*cp = '\0';
}
/* u_int
* nhash(name)
* compute hash for this name and return it; ignore case differences
* note:
* this logic is intended to produce the same result as nlookup()'s.
*/
u_int
nhash(const char *name) {
u_char ch;
u_int hval;
hval = 0;
while ((ch = (u_char)*name++) != (u_char)'\0')
HASHIMILATE(hval, ch);
return (hval);
}
static void
db_freedata(struct databuf *dp) {
int bytes = BIND_DATASIZE(dp->d_size);
if (dp->d_rcnt != 0)
panic("db_freedata: d_rcnt != 0", NULL);
if ((dp->d_flags & (DB_F_ACTIVE|DB_F_FREE)) != 0)
panic("db_freedata: %s set",
(dp->d_flags & DB_F_FREE) != 0 ? "DB_F_FREE" :
"DB_F_ACTIVE");
if (dp->d_next != NULL)
panic("db_free: d_next != NULL", NULL);
dp->d_flags |= DB_F_FREE;
#ifdef CHECK_MAGIC
dp->d_magic = 0;
#endif
memput(dp, bytes);
}
void
db_detach(struct databuf **dpp) {
struct databuf *dp;
INSIST(dpp != NULL && *dpp != NULL);
dp = *dpp;
#ifdef CHECK_MAGIC
INSIST(dp->d_magic == DATABUF_MAGIC);
#endif
DRCNTDEC(dp);
if (dp->d_rcnt == 0)
db_freedata(dp);
*dpp = NULL;
}
struct lame_hash {
struct lame_hash *next;
char *zone;
char *server;
time_t when;
unsigned int hval;
} **lame_hash = NULL;
static int lame_hash_size = 0;
static int lame_hash_cnt = 0;
void
db_lame_add(char *zone, char *server, time_t when) {
unsigned int hval = nhash(zone);
struct lame_hash *last, *this;
struct lame_hash **new;
int n;
int newsize;
db_lame_clean();
/* grow / initalise hash table */
if (lame_hash_cnt >= lame_hash_size) {
if (lame_hash_size == 0)
newsize = hashsizes[0];
else {
for (n = 0; (newsize = hashsizes[n++]) != 0; (void)NULL)
if (lame_hash_size == newsize) {
newsize = hashsizes[n];
break;
}
if (newsize == 0)
newsize = lame_hash_size * 2 + 1;
}
new = memget(newsize * sizeof this);
if (new == NULL)
return;
memset(new, 0, newsize * sizeof this);
for (n = 0 ; n < lame_hash_size; n++) {
this = lame_hash[n];
while (this) {
last = this;
this = this->next;
last->next = new[hval%newsize];
new[hval%newsize] = last;
}
}
if (lame_hash != NULL)
memput(lame_hash, lame_hash_size * sizeof this);
lame_hash = new;
lame_hash_size = newsize;
}
last = NULL;
this = lame_hash[hval%lame_hash_size];
while (this) {
if ((ns_samename(this->server, server) == 1) &&
(ns_samename(this->zone, zone) == 1)) {
this->when = when;
return;
}
last = this;
this = this->next;
}
this = memget(sizeof *this);
if (this == NULL)
return;
this->server = savestr(server, 0);
this->zone = savestr(zone, 0);
if (this->server == NULL || this->zone == NULL) {
if (this->server != NULL)
this->server = freestr(this->server);
if (this->zone != NULL)
this->zone = freestr(this->zone);
memput(this, sizeof *this);
return;
}
this->when = when;
this->hval = hval;
this->next = NULL;
if (last != NULL)
last->next = this;
else
lame_hash[hval%lame_hash_size] = this;
lame_hash_cnt++;
}
time_t
db_lame_find(char *zone, struct databuf *dp) {
unsigned int hval = nhash(zone);
struct lame_hash *this;
if (lame_hash_size == 0) {
/* db_lame_destroy() must have been called. */
dp->d_flags &= ~DB_F_LAME;
return (0);
}
db_lame_clean(); /* Remove expired record so that we can
* clear DB_F_LAME when there are no
* additions. */
this = lame_hash[hval % lame_hash_size];
while (this) {
if ((ns_samename(this->server, (char*)dp->d_data) == 1) &&
(ns_samename(this->zone, zone) == 1))
return (this->when);
this = this->next;
}
dp->d_flags &= ~DB_F_LAME;
return (0);
}
void
db_lame_clean(void) {
int i;
struct lame_hash *last, *this;
for (i = 0 ; i < lame_hash_size; i++) {
last = NULL;
this = lame_hash[i];
while (this != NULL) {
if (this->when < tt.tv_sec) {
this->zone = freestr(this->zone);
this->server = freestr(this->server);
if (last != NULL) {
last->next = this->next;
memput(this, sizeof *this);
this = last->next;
} else {
lame_hash[i] = this->next;
memput(this, sizeof *this);
this = lame_hash[i];
}
lame_hash_cnt--;
} else {
last = this;
this = this->next;
}
}
}
}
void
db_lame_destroy(void) {
int i;
struct lame_hash *last, *this;
if (lame_hash_size == 0)
return;
for (i = 0 ; i < lame_hash_size; i++) {
this = lame_hash[i];
while (this != NULL) {
last = this;
this = this->next;
last->zone = freestr(last->zone);
last->server = freestr(last->server);
memput(last, sizeof *this);
}
}
memput(lame_hash, lame_hash_size * sizeof this);
lame_hash_cnt = 0;
lame_hash_size = 0;
lame_hash = NULL;
}
-984
View File
@@ -1,984 +0,0 @@
#if !defined(lint) && !defined(SABER)
static char rcsid[] = "$Id: db_ixfr.c,v 8.32 2002/07/08 06:26:04 marka Exp $";
#endif
/*
* Portions Copyright (c) 1999 by Check Point Software Technologies, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Check Point Software Technologies Incorporated not be used
* in advertising or publicity pertaining to distribution of the document
* or software without specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND CHECK POINT SOFTWARE TECHNOLOGIES
* INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
* IN NO EVENT SHALL CHECK POINT SOFTWARE TECHNOLOGIES INCORPRATED
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Manage ixfr transaction log
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <res_update.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include <isc/memcluster.h>
#include <isc/misc.h>
#include "port_after.h"
#include "named.h"
#define DBIXFR_ERROR (-1)
#define DBIXFR_FOUND_RR 2
#define DBIXFR_END 3
static int ixfr_getdelta(struct zoneinfo *, FILE *, const char *, char *,
ns_updque *, u_int32_t *, u_int32_t *);
ns_deltalist *
ixfr_get_change_list(struct zoneinfo *zp,
u_int32_t from_serial, u_int32_t to_serial)
{
FILE * fp = NULL;
u_int32_t old_serial, new_serial;
char origin[MAXDNAME];
ns_deltalist *dlhead = NULL;
int ret;
ns_updrec *uprec;
ns_delta *dl;
if (SEQ_GT(from_serial, to_serial))
return (NULL);
dlhead = memget(sizeof(*dlhead));
if (dlhead == NULL)
return (NULL);
INIT_LIST(*dlhead);
if ((fp = fopen(zp->z_ixfr_base, "r")) == NULL) {
ns_warning(ns_log_db, "%s: %s",
zp->z_ixfr_base, strerror(errno));
goto cleanup;
}
strcpy(origin, zp->z_origin);
lineno = 1;
old_serial = new_serial = 0;
for (;;) {
dl = memget(sizeof *dl);
if (dl == NULL) {
ns_warning(ns_log_db,
"ixfr_get_change_list: out of memory");
goto cleanup;
}
INIT_LINK(dl, d_link);
INIT_LIST(dl->d_changes);
ret = ixfr_getdelta(zp, fp, zp->z_ixfr_base, origin,
&dl->d_changes, &old_serial, &new_serial);
switch (ret) {
case DBIXFR_ERROR:
ns_warning(ns_log_db, "Logical error in %s: unlinking",
zp->z_ixfr_base);
if (fp != NULL) {
(void) my_fclose(fp);
fp = NULL;
}
unlink(zp->z_ixfr_base);
goto cleanup;
case DBIXFR_FOUND_RR:
ns_debug(ns_log_default, 4,
"ixfr_getdelta DBIXFR_FOUND_RR (%s)",
zp->z_origin);
if (EMPTY(*dlhead)) {
/* skip updates prior to the one we want */
uprec = HEAD(dl->d_changes);
INSIST(uprec != NULL);
if (SEQ_LT(uprec->r_zone, from_serial) ||
SEQ_GT(uprec->r_zone, to_serial))
{
while ((uprec = HEAD(dl->d_changes)) != NULL) {
UNLINK(dl->d_changes, uprec, r_link);
if (uprec->r_dp != NULL)
db_detach(&uprec->r_dp);
res_freeupdrec(uprec);
}
memput(dl, sizeof *dl);
break;
}
else if (uprec->r_zone > from_serial) {
/* missed the boat */
ns_debug(ns_log_default, 3,
"ixfr_getdelta first SOA is %d, asked for %d (%s)",
uprec->r_zone,
from_serial,
zp->z_origin);
goto cleanup;
}
}
ns_debug(ns_log_default, 4,
"adding to change list (%s)",
zp->z_origin);
APPEND(*dlhead, dl, d_link);
break;
case DBIXFR_END:
ns_debug(ns_log_default, 4,
"ixfr_getdelta DBIXFR_END (%s)",
zp->z_origin);
(void) my_fclose(fp);
memput(dl, sizeof *dl);
return (dlhead);
default:
(void) my_fclose(fp);
if (dl != NULL)
memput(dl, sizeof *dl);
return (NULL);
}
}
cleanup:
if (fp != NULL)
(void) my_fclose(fp);
while ((dl = HEAD(*dlhead)) != NULL) {
UNLINK(*dlhead, dl, d_link);
while ((uprec = HEAD(dl->d_changes)) != NULL) {
UNLINK(dl->d_changes, uprec, r_link);
if (uprec->r_dp != NULL)
db_detach(&uprec->r_dp);
uprec->r_dp = NULL;
res_freeupdrec(uprec);
}
memput(dl, sizeof *dl);
}
memput(dlhead, sizeof *dlhead);
return (NULL);
}
/*
* int ixfr_have_log(struct zoneinfo *zp,u_int32_t from_serial,
* u_int32_t to_serial)
*
* verify that ixfr transaction log contains changes
* from from_serial to to_serial
*
* returns:
* 0 = serial number is up to date
* 1 = transmission is possible
* -1 = error while opening the ixfr transaction log
* -2 = error in parameters
* -3 = logical error in the history file
*/
int
ixfr_have_log(struct zoneinfo *zp, u_int32_t from_serial, u_int32_t to_serial)
{
FILE *fp;
u_int32_t old_serial = 0, new_serial = 0;
u_int32_t last_serial = 0;
u_int32_t first_serial = 0;
char buf[BUFSIZ];
char *cp;
struct stat st;
int nonempty_lineno = -1, prev_pktdone = 0, cont = 0,
inside_next = 0;
int err;
int first = 0;
int rval = 0;
int id, rcode = NOERROR;
if (SEQ_GT(from_serial, to_serial))
return (-2);
if (from_serial == to_serial)
return (0);
/* If there is no log file, just return. */
if (zp->z_ixfr_base == NULL || zp->z_updatelog == NULL)
return (-1);
if (zp->z_serial_ixfr_start > 0) {
if (from_serial >= zp->z_serial_ixfr_start)
return (1);
}
if (stat(zp->z_ixfr_base, &st) < 0) {
if (errno != ENOENT)
ns_error(ns_log_db,
"unexpected stat(%s) failure: %s",
zp->z_ixfr_base, strerror(errno));
return (-1);
}
if ((fp = fopen(zp->z_ixfr_base, "r")) == NULL) {
ns_warning(ns_log_db, "%s: %s",
zp->z_ixfr_base, strerror(errno));
return (-1);
}
if (fgets(buf, sizeof(buf), fp) == NULL) {
ns_error(ns_log_update, "fgets() from %s failed: %s",
zp->z_ixfr_base, strerror(errno));
fclose(fp);
return (-1);
}
if (strcmp(buf, LogSignature) != 0) {
ns_error(ns_log_update, "invalid log file %s",
zp->z_ixfr_base);
fclose(fp);
return (-3);
}
lineno = 1;
first = 1;
for (;;) {
if (getword(buf, sizeof buf, fp, 0)) {
nonempty_lineno = lineno;
} else {
if (lineno == (nonempty_lineno + 1))
continue;
inside_next = 0;
prev_pktdone = 1;
cont = 1;
}
if (!strcasecmp(buf, "[DYNAMIC_UPDATE]") ||
!strcasecmp(buf, "[IXFR_UPDATE]")) {
err = 0;
rcode = NOERROR;
cp = fgets(buf, sizeof buf, fp);
if (cp != NULL)
lineno++;
if (cp == NULL || !sscanf((char *) cp, "id %d", &id))
id = -1;
inside_next = 1;
prev_pktdone = 1;
cont = 1;
} else if (!strcasecmp(buf, "serial")) {
cp = fgets(buf, sizeof buf, fp);
if (cp != NULL)
lineno++;
if (sscanf((char *) cp, "%u", &old_serial)) {
if (first == 1) {
first = 0;
first_serial = old_serial;
}
last_serial = old_serial;
if (from_serial >= old_serial) {
rval = 1;
}
}
prev_pktdone = 1;
cont = 1;
} else if (!strcasecmp(buf, "[INCR_SERIAL]")) {
/* XXXRTH not enough error checking here */
cp = fgets(buf, sizeof buf, fp);
if (cp != NULL)
lineno++;
if (cp == NULL ||
sscanf((char *) cp, "from %u to %u",
&old_serial, &new_serial) != 2) {
rval = -3;
break;
} else if (from_serial >= old_serial) {
if (first == 1) {
first = 0;
first_serial = old_serial;
}
last_serial = old_serial;
rval = 1;
}
}
if (prev_pktdone) {
prev_pktdone = 0;
if (feof(fp))
break;
}
}
fclose(fp);
if (last_serial +1 < zp->z_serial) {
ns_warning(ns_log_db,
"%s: File Deleted. Found gap between serial:"
" %d and current serial: %d",
zp->z_ixfr_base, last_serial, zp->z_serial);
(void) unlink(zp->z_ixfr_base);
rval = -3;
}
if (from_serial < first_serial || from_serial > last_serial)
rval = -3;
if (rval == 1)
zp->z_serial_ixfr_start = first_serial;
return (rval);
}
/* from db_load.c */
static struct map m_section[] = {
{"zone", S_ZONE},
{"prereq", S_PREREQ},
{"update", S_UPDATE},
{"reserved", S_ADDT},
};
#define M_SECTION_CNT (sizeof(m_section) / sizeof(struct map))
/* from ns_req.c */
static struct map m_opcode[] = {
{"nxdomain", NXDOMAIN},
{"yxdomain", YXDOMAIN},
{"nxrrset", NXRRSET},
{"yxrrset", YXRRSET},
{"delete", DELETE},
{"add", ADD},
};
#define M_OPCODE_CNT (sizeof(m_opcode) / sizeof(struct map))
/* XXXRTH workaround map difficulties */
#define M_CLASS_CNT m_class_cnt
#define M_TYPE_CNT m_type_cnt
/*
* read a line from the history of a zone.
*
* returns:
*
* DBIXFR_ERROR = an error occured
* DBIXFR_FOUND_RR = a rr encountered
* DBIXFR_END = end of file
*/
static int
ixfr_getdelta(struct zoneinfo *zp, FILE *fp, const char *filename, char *origin,
ns_updque *listuprec, u_int32_t *old_serial,
u_int32_t *new_serial)
{
char data[MAXDATA], dnbuf[MAXDNAME], sclass[3];
char *dname, *cp, *cp1;
char buf[MAXDATA];
long unsigned lutmp;
u_int32_t serial = 0, ttl;
u_int32_t current_serial = 0;
int nonempty_lineno = -1, prev_pktdone = 0, cont = 0,
inside_next = 0;
int id;
int i, c, section, opcode, matches, zonenum, err, multiline;
int type, class;
u_int32_t n;
enum transport transport;
struct map *mp;
int zonelist[MAXDNAME];
struct in_addr ina;
int datasize;
ns_updrec * rrecp;
u_long l;
#define ERRTO(msg) if (1) { errtype = msg; goto err; } else (void)NULL
err = 0;
transport = primary_trans;
lineno = 1;
zonenum = 0;
/*
* Look for serial if "first" call othewise use new_serial to
* for current_serial.
*/
if (*old_serial == *new_serial && *old_serial == 0)
current_serial = 0;
else
current_serial = *new_serial;
for (;;) {
dname = NULL;
if (!getword(buf, sizeof buf, fp, 0)) {
if (lineno == (nonempty_lineno + 1) && !(feof(fp))) {
/*
* End of a nonempty line inside an update
* packet or not inside an update packet.
*/
continue;
}
/*
* Empty line or EOF.
*/
if (feof(fp))
break;
inside_next = 0;
cont = 1;
} else {
nonempty_lineno = lineno;
}
if (!strcasecmp(buf, "[DYNAMIC_UPDATE]") ||
!strcasecmp(buf, "[IXFR_UPDATE]")) {
cp = fgets(buf, sizeof buf, fp);
if (cp != NULL)
lineno++;
if (cp == NULL || !sscanf((char *) cp, "id %d", &id))
id = -1;
inside_next = 1;
cont = 1;
} else if (!strcasecmp(buf, "[INCR_SERIAL]")) {
/* XXXRTH not enough error checking here */
cp = fgets(buf, sizeof buf, fp);
if (cp != NULL)
lineno++;
if (cp == NULL ||
sscanf((char *) cp, "from %u to %u",
old_serial, new_serial) != 2) {
ns_error(ns_log_update,
"incr_serial problem with %s",
zp->z_updatelog);
} else {
serial = get_serial(zp);
}
cont = 1;
} else if (!strcasecmp(buf, "[END_DELTA]")) {
prev_pktdone = 1;
cont = 1;
lineno++;
}
if (prev_pktdone) {
if (!EMPTY(*listuprec)) {
n++;
return (DBIXFR_FOUND_RR);
}
prev_pktdone = 0;
}
if (cont) {
cont = 0;
continue;
}
if (!inside_next)
continue;
/*
* inside the same update packet, continue accumulating
* records.
*/
section = -1;
n = strlen(buf);
if (buf[n - 1] == ':')
buf[--n] = '\0';
for (mp = m_section; mp < m_section + M_SECTION_CNT; mp++)
if (!strcasecmp(buf, mp->token)) {
section = mp->val;
break;
}
ttl = 0;
type = -1;
class = zp->z_class;
n = 0;
data[0] = '\0';
opcode = -1;
switch (section) {
case S_ZONE:
cp = fgets(buf, sizeof buf, fp);
if (!cp)
*buf = '\0';
n = sscanf(cp, "origin %s class %s serial %lu",
origin, sclass, &lutmp);
serial = lutmp;
if (current_serial == 0)
current_serial = serial;
else if (current_serial != serial) {
ns_debug(ns_log_update, 1,
"%s:line %d serial # askew %d %d",
filename, lineno, serial,
current_serial);
current_serial = serial;
err++;
}
if (n != 3 || ns_samename(origin, zp->z_origin) != 1)
err++;
if (cp)
lineno++;
if (!err && inside_next) {
int success;
dname = origin;
type = T_SOA;
class = res_nametoclass(sclass, &success);
if (!success) {
err++;
break;
}
matches = findzone(dname, class, 0,
zonelist, MAXDNAME);
if (matches)
zonenum = zonelist[0];
else
err++;
}
break;
case S_PREREQ:
case S_UPDATE:
/* Operation code. */
if (!getword(buf, sizeof buf, fp, 0)) {
err++;
break;
}
if (buf[0] == '{') {
n = strlen(buf);
for (i = 0; (u_int32_t) i < n; i++)
buf[i] = buf[i + 1];
if (buf[n - 2] == '}')
buf[n - 2] = '\0';
}
for (mp = m_opcode; mp < m_opcode + M_OPCODE_CNT; mp++)
if (!strcasecmp(buf, mp->token)) {
opcode = mp->val;
break;
}
if (opcode == -1) {
err++;
break;
}
/* Owner's domain name. */
if (!getword((char *) dnbuf, sizeof dnbuf, fp, 0)) {
err++;
break;
}
n = strlen((char *) dnbuf) - 1;
if (dnbuf[n] == '.')
dnbuf[n] = '\0';
dname = dnbuf;
ttl = 0;
type = -1;
class = zp->z_class;
n = 0;
data[0] = '\0';
(void) getword(buf, sizeof buf, fp, 1);
if (isdigit(buf[0])) { /* ttl */
if (ns_parse_ttl(buf, &l) < 0) {
err++;
break;
}
ttl = l;
(void) getword(buf, sizeof buf, fp, 1);
}
/* possibly class */
if (buf[0] != '\0') {
int success;
int maybe_class;
maybe_class = res_nametoclass(buf, &success);
if (success) {
class = maybe_class;
(void) getword(buf, sizeof buf, fp, 1);
}
}
/* possibly type */
if (buf[0] != '\0') {
int success;
int maybe_type;
maybe_type = res_nametotype(buf, &success);
if (success) {
type = maybe_type;
(void) getword(buf, sizeof buf, fp, 1);
}
}
if (buf[0] != '\0') /* possibly rdata */
/*
* Convert the ascii data 'buf' to the proper
* format based on the type and pack into
* 'data'.
*
* XXX - same as in db_load(), consolidation
* needed
*/
switch (type) {
case T_A:
if (!inet_aton(buf, &ina)) {
err++;
break;
}
n = ntohl(ina.s_addr);
cp = data;
PUTLONG(n, cp);
n = INT32SZ;
break;
case T_HINFO:
case T_ISDN:
n = strlen(buf);
data[0] = n;
memcpy(data + 1, buf, n);
n++;
if (!getword(buf, sizeof buf, fp, 0)) {
i = 0;
} else {
endline(fp);
i = strlen(buf);
}
data[n] = i;
n++;
memcpy(data + n + 1, buf, i);
n += i;
break;
case T_SOA:
case T_MINFO:
case T_RP:
(void) strcpy(data, buf);
cp = data + strlen(data) + 1;
if (!getword((char *) cp,
sizeof data - (cp - data),
fp, 1)) {
err++;
break;
}
cp += strlen((char *) cp) + 1;
if (type != T_SOA) {
n = cp - data;
break;
}
if (class != zp->z_class ||
ns_samename(dname, zp->z_origin) != 1) {
err++;
break;
}
c = getnonblank(fp, zp->z_updatelog, 0);
if (c == '(') {
multiline = 1;
} else {
multiline = 0;
ungetc(c, fp);
}
n = getnum(fp, zp->z_updatelog, GETNUM_SERIAL,
&multiline);
if (getnum_error) {
err++;
break;
}
if (opcode == ADD)
*new_serial = n;
current_serial = n;
PUTLONG(n, cp);
for (i = 0; i < 4; i++) {
if (!getword(buf, sizeof buf, fp, 1)) {
err++;
break;
}
if (ns_parse_ttl(buf, &l) < 0) {
err++;
break;
}
n = l;
PUTLONG(n, cp);
}
if (multiline) {
c = getnonblank(fp, zp->z_updatelog, 1);
if (c != ')') {
ungetc(c, fp);
err++;
break;
}
}
endline(fp);
n = cp - data;
break;
case T_WKS:
if (!inet_aton(buf, &ina)) {
err++;
break;
}
n = ntohl(ina.s_addr);
cp = data;
PUTLONG(n, cp);
*cp = (char) getprotocol(fp, zp->z_updatelog);
n = INT32SZ + sizeof(char);
n = getservices((int) n, data,
fp, zp->z_updatelog);
break;
case T_NS:
case T_CNAME:
case T_MB:
case T_MG:
case T_MR:
case T_PTR:
(void) strcpy(data, buf);
if (makename(data, origin,
sizeof(data)) == -1) {
err++;
break;
}
n = strlen(data) + 1;
break;
case T_MX:
case T_AFSDB:
case T_RT:
n = 0;
cp = buf;
while (isdigit(*cp))
n = n * 10 + (*cp++ - '0');
/* catch bad values */
cp = data;
PUTSHORT((u_int16_t) n, cp);
if (!getword(buf, sizeof(buf), fp, 1)) {
err++;
break;
}
(void) strcpy((char *) cp, buf);
if (makename((char *) cp, origin,
sizeof(data) - (cp - data)) == -1)
{
err++;
break;
}
/* advance pointer to end of data */
cp += strlen((char *) cp) + 1;
/* now save length */
n = (cp - data);
break;
case T_PX:
n = 0;
data[0] = '\0';
cp = buf;
while (isdigit(*cp))
n = n * 10 + (*cp++ - '0');
cp = data;
PUTSHORT((u_int16_t) n, cp);
for (i = 0; i < 2; i++) {
if (!getword(buf, sizeof(buf), fp, 0))
{
err++;
break;
}
(void) strcpy((char *) cp, buf);
cp += strlen((char *) cp) + 1;
}
n = cp - data;
break;
case T_TXT:
case T_X25:
i = strlen(buf);
cp = data;
datasize = sizeof data;
cp1 = buf;
while (i > MAXCHARSTRING) {
if (datasize <= MAXCHARSTRING) {
ns_error(ns_log_update,
"record too big");
return (-1);
}
datasize -= MAXCHARSTRING;
*cp++ = (char)MAXCHARSTRING;
memcpy(cp, cp1, MAXCHARSTRING);
cp += MAXCHARSTRING;
cp1 += MAXCHARSTRING;
i -= MAXCHARSTRING;
}
if (datasize < i + 1) {
ns_error(ns_log_update,
"record too big");
return (-1);
}
*cp++ = i;
memcpy(cp, cp1, i);
cp += i;
n = cp - data;
endline(fp);
/* XXXVIX: segmented texts 4.9.5 */
break;
case T_NSAP:
n = inet_nsap_addr(buf, (u_char *) data,
sizeof data);
endline(fp);
break;
case T_LOC:
cp = buf + (n = strlen(buf));
*cp = ' ';
cp++;
while ((i = getc(fp), *cp = i, i != EOF)
&& *cp != '\n' && (n < MAXDATA))
{
cp++;
n++;
}
if (*cp == '\n')
ungetc(*cp, fp);
*cp = '\0';
n = loc_aton(buf, (u_char *) data);
if (n == 0) {
err++;
break;
}
endline(fp);
break;
case ns_t_sig:
case ns_t_nxt:
case ns_t_key:
case ns_t_cert:{
const char *errmsg = NULL;
n = parse_sec_rdata(buf, sizeof(buf), 1,
(u_char *) data,
sizeof(data),
fp, zp, dname, ttl,
type, domain_ctx,
transport, &errmsg);
if (errmsg) {
err++;
endline(fp);
n = 0;
}
break;
}
default:
if (strcmp(buf, "\\#") != 0) {
err++;
break;
}
if (!getword(buf, sizeof buf, fp, 0) ||
!isdigit((unsigned char)buf[0])) {
err++;
break;
}
errno = 0;
n = strtoul(buf, &cp, 10);
if (errno != 0 || n > 0xffff || *cp != '\0') {
err++;
break;
}
multiline = 0;
i = isc_gethexstring((u_char *)data,
sizeof(data), n, fp,
&multiline);
if (i == -1) {
err++;
break;
}
if (multiline) {
c = getnonblank(fp, zp->z_updatelog, 1);
if (c != ')') {
ungetc(c, fp);
err++;
break;
}
multiline = 0;
}
endline(fp);
}
if (section == S_PREREQ) {
ttl = 0;
if (opcode == NXDOMAIN) {
class = C_NONE;
type = T_ANY;
n = 0;
} else if (opcode == YXDOMAIN) {
class = C_ANY;
type = T_ANY;
n = 0;
} else if (opcode == NXRRSET) {
class = C_NONE;
n = 0;
} else if (opcode == YXRRSET) {
if (n == 0)
class = C_ANY;
}
} else {/* section == S_UPDATE */
if (opcode == DELETE) {
if (n == 0) {
class = C_ANY;
if (type == -1)
type = T_ANY;
} else {
class = zp->z_class;
}
}
}
break;
case S_ADDT:
default:
ns_debug(ns_log_update, 1,
"cannot interpret section: %d", section);
inside_next = 0;
err++;
}
if (err) {
inside_next = 0;
ns_debug(ns_log_update, 1,
"merge of update id %d failed due to error at line %d",
id, lineno);
return (DBIXFR_ERROR);
}
rrecp = res_mkupdrec(section, dname, class, type, ttl);
if (section != S_ZONE) {
struct databuf *dp;
dp = savedata(class, type, ttl, (u_char *) data, n);
dp->d_zone = zonenum;
dp->d_cred = DB_C_ZONE;
dp->d_clev = nlabels(zp->z_origin);
rrecp->r_dp = dp;
rrecp->r_opcode = opcode;
} else {
rrecp->r_zone = zonenum;
rrecp->r_opcode = opcode;
}
/* remove add/delete pairs */
if (section == S_UPDATE) {
ns_updrec *arp;
int foundmatch;
arp = TAIL(*listuprec);
foundmatch = 0;
while (arp) {
if (arp->r_section == S_UPDATE &&
((arp->r_opcode == DELETE &&
opcode == ADD) ||
(opcode == DELETE &&
arp->r_opcode == ADD)) &&
arp->r_dp->d_type == rrecp->r_dp->d_type &&
arp->r_dp->d_class == rrecp->r_dp->d_class &&
arp->r_dp->d_ttl == rrecp->r_dp->d_ttl &&
ns_samename(arp->r_dname, dname) == 1 &&
db_cmp(arp->r_dp, rrecp->r_dp) == 0) {
db_detach(&rrecp->r_dp);
db_detach(&arp->r_dp);
UNLINK(*listuprec, arp, r_link);
res_freeupdrec(arp);
res_freeupdrec(rrecp);
foundmatch = 1;
break;
}
arp = PREV(arp, r_link);
}
if (foundmatch)
continue;
}
APPEND(*listuprec, rrecp, r_link);
/* Override zone number with current zone serial number */
rrecp->r_zone = serial;
}
if (err)
return (DBIXFR_ERROR);
return (DBIXFR_END);
}
File diff suppressed because it is too large. Load diff
-341
View File
@@ -1,341 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_lookup.c 4.18 (Berkeley) 3/21/91";
static const char rcsid[] = "$Id: db_lookup.c,v 8.27 2001/06/18 14:42:55 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1986
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Table lookup routines.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include "port_after.h"
#include "named.h"
/*
* Lookup 'name' and return a pointer to the namebuf;
* NULL otherwise. If 'insert', insert name into tables.
* Wildcard lookups are handled.
*/
struct namebuf *
nlookup(const char *name, struct hashbuf **htpp,
const char **fname, int insert)
{
struct namebuf *np;
const char *cp;
int c;
u_int hval;
struct hashbuf *htp;
struct namebuf *parent = NULL;
int escaped = 0;
htp = *htpp;
hval = 0;
*fname = "???";
for (cp = name; (c = *cp++) != 0; (void)NULL) {
if (!escaped && (c == '.')) {
parent = np = nlookup(cp, htpp, fname, insert);
if (np == NULL)
return (NULL);
if (*fname != cp)
return (np);
if ((htp = np->n_hash) == NULL) {
if (!insert) {
if (ns_wildcard(NAME(*np)))
*fname = name;
return (np);
}
htp = savehash((struct hashbuf *)NULL);
np->n_hash = htp;
}
*htpp = htp;
break;
}
HASHIMILATE(hval, c);
if (escaped)
escaped = 0;
else if (c == '\\')
escaped = 1;
}
cp--;
/*
* Lookup this label in current hash table.
*/
for (np = htp->h_tab[hval % htp->h_size];
np != NULL;
np = np->n_next) {
if (np->n_hashval == hval &&
((size_t)NAMELEN(*np) == (size_t)(cp - name)) &&
(strncasecmp(name, NAME(*np), cp - name) == 0)) {
*fname = name;
return (np);
}
}
if (!insert) {
/*
* Look for wildcard in this hash table.
* Don't use a cached "*" name as a wildcard,
* only authoritative.
*/
hval = ('*' & HASHMASK) % htp->h_size;
for (np = htp->h_tab[hval]; np != NULL; np = np->n_next) {
if (ns_wildcard(NAME(*np)) &&
np->n_data && np->n_data->d_zone != 0) {
*fname = name;
return (np);
}
}
return (parent);
}
np = savename(name, cp - name);
np->n_parent = parent;
np->n_hashval = hval;
hval %= htp->h_size;
np->n_next = htp->h_tab[hval];
htp->h_tab[hval] = np;
/* Increase hash table size. */
if (++htp->h_cnt > (htp->h_size * AVGCH_NLOOKUP)) {
*htpp = savehash(htp);
if (parent == NULL) {
if (htp == hashtab) {
hashtab = *htpp;
} else {
fcachetab = *htpp;
}
}
else
parent->n_hash = *htpp;
htp = *htpp;
}
*fname = name;
return (np);
}
/* struct namebuf *
* np_parent(struct namebuf *np)
* Find the "parent" namebuf of np.
* This is tricky since the parent of "com" is "" and both are stored
* in the same hashbuf.
* See also:
* the AXFR wart description in ns_axfr.c
*/
struct namebuf *
np_parent(struct namebuf *np) {
struct hashbuf *htp;
struct namebuf *np2;
if (np->n_parent != NULL || NAME(*np)[0] == '\0')
return (np->n_parent);
/* Try to figure out if np is pointing into the cache or hints. */
/* Try the cache first. */
htp = hashtab;
try_again:
/* Search the hash chain that np should be part of. */
for (np2 = htp->h_tab[np->n_hashval % htp->h_size];
np2 != NULL;
np2 = np2->n_next)
{
if (np == np2) { /* found it! */
/* "" hashes into the first bucket */
for (np = htp->h_tab[0]; np != NULL; np = np->n_next) {
if (NAME(*np)[0] == '\0')
/* found the root namebuf */
return (np);
}
/* there are no RR's with a owner name of "." yet */
return (NULL);
}
}
/* Try the hints. */
if (htp == hashtab) {
htp = fcachetab;
goto try_again;
}
ns_debug(ns_log_db, 1, "np_parent(0x%lx) couldn't find namebuf",
(u_long)np);
return (NULL); /* XXX shouldn't happen */
}
/* int
* match(dp, class, type)
* Does data record `dp' match the class and type?
* return value:
* boolean
*/
int
match(struct databuf *dp, int class, int type) {
if (dp->d_class != class && class != C_ANY)
return (0);
if (dp->d_type != type && dp->d_type != T_SIG && type != T_ANY)
return (0);
if (type != T_SIG && dp->d_type == T_SIG && (int)SIG_COVERS(dp) != type)
return (0);
return (1);
}
/* static int
* nxtlower(name, dp)
* Is the NXT/SIG NXT record 'lower'?
* return value:
* boolean
*/
static int
nxtlower(const char *name, struct databuf *dp) {
/* An NXT is a lower NXT iff the SOA bit is set in the bitmap */
if (dp->d_type == T_NXT) {
u_char *nxtbitmap = dp->d_data + strlen((char *)dp->d_data) + 1;
return (NS_NXT_BIT_ISSET(T_SOA, nxtbitmap) ? 1 : 0);
}
/* If it's not an NXT, it's a SIG NXT. An NXT record must be signed
* by the zone, so the signer name must be the same as the owner.
*/
return (ns_samename(name, (char *)dp->d_data + SIG_HDR_SIZE) != 1 ? 0 : 1);
}
/* int
* nxtmatch(name, dp1, dp2)
* Do NXT/SIG NXT records `dp1' and `dp2' belong to the same NXT set?
* return value:
* boolean
*/
int
nxtmatch(const char *name, struct databuf *dp1, struct databuf *dp2) {
int dp1_lower, dp2_lower;
int type1, type2;
if (dp1->d_type == ns_t_sig)
type1 = SIG_COVERS(dp1);
else
type1 = dp1->d_type;
if (dp2->d_type == ns_t_sig)
type2 = SIG_COVERS(dp2);
else
type2 = dp2->d_type;
if (type1 != ns_t_nxt || type2 != ns_t_nxt)
return (0);
dp1_lower = nxtlower(name, dp1);
dp2_lower = nxtlower(name, dp2);
return (dp1_lower == dp2_lower);
}
/* int
* rrmatch(name, dp1, dp2)
* Do data records `dp1' and `dp2' match in class and type?
* If both are NXTs, do they belong in the same NXT set?
* If both are SIGs, do the covered types match?
* If both are SIG NXTs, do the covered NXTs belong in the same set?
* Why is DNSSEC so confusing?
* return value:
* boolean
*/
int
rrmatch(const char *name, struct databuf *dp1, struct databuf *dp2) {
if (dp1->d_class != dp2->d_class &&
dp1->d_class != C_ANY && dp2->d_class != C_ANY)
return(0);
if (dp1->d_type != dp2->d_type &&
dp1->d_type != T_ANY && dp2->d_type != T_ANY)
return(0);
if (dp1->d_type == T_NXT)
return(nxtmatch(name, dp1, dp2));
if (dp1->d_type != T_SIG)
return(1);
if (SIG_COVERS(dp1) == SIG_COVERS(dp2)) {
if (SIG_COVERS(dp1) == ns_t_nxt)
return(nxtmatch(name, dp1, dp2));
else
return(1);
}
return(0);
}
-215
View File
@@ -1,215 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_save.c 4.16 (Berkeley) 3/21/91";
static const char rcsid[] = "$Id: db_save.c,v 8.30 2002/05/18 01:02:56 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1986
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Buffer allocation and deallocation routines.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include <isc/memcluster.h>
#include "port_after.h"
#include "named.h"
/*
* Allocate a name buffer & save name.
*/
struct namebuf *
savename(const char *name, int len) {
struct namebuf *np;
/*
* Note that MAXLABEL * 4 < 256, so a single length byte is enough.
* Also, we use MAXLABEL * 4 because each label character can
* expand into up to four characters when rendered in canonical
* form.
*/
INSIST(len >= 0 && len <= (MAXLABEL * 4));
np = (struct namebuf *) memget(NAMESIZE(len));
if (np == NULL)
panic("savename: memget", NULL);
memset(np, 0, NAMESIZE(len));
NAMELEN(*np) = (unsigned)len;
memcpy(NAME(*np), name, len);
NAME(*np)[len] = '\0';
return (np);
}
/*
* Allocate a data buffer & save data.
*/
struct databuf *
savedata(class, type, ttl, data, size)
int class, type;
u_int32_t ttl;
u_char *data;
int size;
{
struct databuf *dp;
int bytes = BIND_DATASIZE(size);
dp = (struct databuf *)memget(bytes);
if (dp == NULL)
panic("savedata: memget", NULL);
if (class > CLASS_MAX)
panic("savedata: bad class", NULL);
memset(dp, 0, bytes);
dp->d_next = NULL;
dp->d_type = type;
dp->d_class = class;
dp->d_ttl = ttl;
dp->d_size = size;
dp->d_mark = 0;
dp->d_flags = 0;
dp->d_cred = 0;
dp->d_clev = 0;
dp->d_secure = DB_S_INSECURE;
dp->d_rcode = NOERROR;
dp->d_addr.s_addr = htonl(0);
dp->d_nstime = 0;
dp->d_rcnt = 1;
#ifdef CHECK_MAGIC
dp->d_magic = DATABUF_MAGIC;
#endif
memcpy(dp->d_data, data, dp->d_size);
return (dp);
}
/*
* Allocate a data buffer & save data.
*/
struct hashbuf *
savehash(oldhtp)
struct hashbuf *oldhtp;
{
struct hashbuf *htp;
struct namebuf *np, *nnp, **hp;
int n, newsize;
if (oldhtp == NULL)
newsize = hashsizes[0];
else {
for (n = 0; (newsize = hashsizes[n++]) != 0; (void)NULL)
if (oldhtp->h_size == newsize) {
newsize = hashsizes[n];
break;
}
if (newsize == 0)
newsize = oldhtp->h_size * 2 + 1;
}
ns_debug(ns_log_db, 4, "savehash GROWING to %d", newsize);
htp = (struct hashbuf *) memget(HASHSIZE(newsize));
if (htp == NULL)
ns_panic(ns_log_db, 0, "savehash: %s", strerror(errno));
htp->h_size = newsize;
memset(htp->h_tab, 0, newsize * sizeof(struct namebuf *));
if (oldhtp == NULL) {
htp->h_cnt = 0;
return (htp);
}
ns_debug(ns_log_db, 4, "savehash(%#lx) cnt=%d, sz=%d, newsz=%d",
(u_long)oldhtp, oldhtp->h_cnt, oldhtp->h_size, newsize);
htp->h_cnt = oldhtp->h_cnt;
for (n = 0; n < oldhtp->h_size; n++) {
for (np = oldhtp->h_tab[n]; np != NULL; np = nnp) {
nnp = np->n_next;
hp = &htp->h_tab[np->n_hashval % htp->h_size];
np->n_next = *hp;
*hp = np;
}
}
oldhtp->h_cnt = 0; /* Keep rm_hash() happy. */
rm_hash(oldhtp);
return (htp);
}
File diff suppressed because it is too large. Load diff
-158
View File
@@ -1,158 +0,0 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: db_tsig.c,v 8.8 2002/05/21 02:34:32 marka Exp $";
#endif /* not lint */
/*
* Copyright (c) 1986, 1990
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* Portions Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include "port_before.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <ctype.h>
#include <resolv.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <isc/eventlib.h>
#include <isc/logging.h>
#include <isc/memcluster.h>
#include <isc/tree.h>
#include <isc/dst.h>
#include "port_after.h"
#include "named.h"
typedef struct {
DST_KEY *key;
void *ctx;
} tsig_axfr_state;
#define TSIG_ALG_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
#define TSIG_ALG_MD5_SHORT "hmac-md5"
const char *
tsig_alg_name(int value) {
if (value == KEY_HMAC_MD5)
return(TSIG_ALG_MD5);
else
return(NULL);
}
int
tsig_alg_value(char *name) {
if (ns_samename(name, TSIG_ALG_MD5) == 1 ||
strcasecmp(name, TSIG_ALG_MD5_SHORT) == 0)
return (KEY_HMAC_MD5);
else
return (-1);
}
DST_KEY *
tsig_key_from_addr(struct in_addr addr) {
server_info si = find_server(addr);
if (si == NULL || si->key_list == NULL || si->key_list->first == NULL)
return(NULL);
return(si->key_list->first->key);
}
struct tsig_record *
new_tsig(DST_KEY *key, u_char *sig, int siglen) {
struct tsig_record *tsig;
if (siglen > TSIG_SIG_SIZE)
return(NULL);
tsig = memget(sizeof(struct tsig_record));
if (tsig == NULL)
return(NULL);
tsig->key = key;
tsig->siglen = siglen;
memcpy(tsig->sig, sig, siglen);
return(tsig);
}
void
free_tsig(struct tsig_record *tsig) {
if (tsig == NULL)
return;
memput(tsig, sizeof(struct tsig_record));
}
File diff suppressed because it is too large. Load diff
-462
View File
@@ -1,462 +0,0 @@
/*
* This is a worthless, nonrunnable example of a named.conf file that has
* every conceivable syntax element in use. We use it to test the parser.
* It could also be used as a conceptual template for users of new features.
*/
/*
* C-style comments are OK
*/
// So are C++-style comments
# So are shell-style comments
// watch out for ";" -- it's important!
key sample_key { // for TSIG
algorithm hmac-md5; // hmac-md5 is the supported algorithm
secret "abcdefgh"; // base 64 encoded secret
};
key key2 {
algorithm hmac-md5;
secret "87654321";
};
options {
directory "."; // use current directory
named-xfer "/usr/libexec/named-xfer"; // _PATH_XFER
dump-file "named_dump.db"; // _PATH_DUMPFILE
pid-file "/var/run/named.pid"; // _PATH_PIDFILE
statistics-file "named.stats"; // _PATH_STATS
memstatistics-file "named.memstats"; // _PATH_MEMSTATS
check-names master fail;
check-names slave warn;
check-names response ignore;
host-statistics no;
deallocate-on-exit no; // Painstakingly deallocate all
// objects when exiting instead of
// letting the OS clean up for us.
// Useful a memory leak is suspected.
// Final statistics are written to the
// memstatistics-file.
datasize default;
stacksize default;
coresize default;
files unlimited;
recursion yes;
fetch-glue yes;
fake-iquery no;
notify yes; // send NOTIFY messages. You can set
// notify on a zone-by-zone
// basis in the "zone" statement
// see (below)
// notify explicit; // only sent the notifies to the
// also-notify list
serial-queries 4; // number of parallel SOA queries
// we can have outstanding for master
// zone change testing purposes
auth-nxdomain yes; // always set AA on NXDOMAIN.
// don't set this to 'no' unless
// you know what you're doing -- older
// servers won't like it.
multiple-cnames no; // if yes, then a name my have more
// than one CNAME RR. This use
// is non-standard and is not
// recommended, but it is available
// because previous releases supported
// it and it was used by large sites
// for load balancing.
allow-query { any; };
allow-transfer { any; };
transfers-in 10; // DEFAULT_XFERS_RUNNING, cannot be
// set > than MAX_XFERS_RUNNING (20)
transfers-per-ns 2; // DEFAULT_XFERS_PER_NS
transfers-out 0; // not implemented
max-transfer-time-in 120; // MAX_XFER_TIME; the default number
// of minutes an inbound zone transfer
// may run. May be set on a per-zone
// basis.
/*
* The "transfer-format" option specifies the way outbound zone
* transfers (i.e. from us to them) are formatted. Two values are
* allowed:
*
* one-answer Each RR gets its own DNS message.
* This format is not very efficient,
* but is widely understood. All
* versions of BIND prior to 8.1 generate
* this format for outbound zone
* and require it on inbound transfers.
*
* many-answers As many RRs as will fit are put into
* each DNS message. This format is
* the most efficient, but is only known
* to work with BIND 8. Patches to
* BIND 4.9.5 named-xfer that enable it
* to understand 'many-answers' will be
* available.
*
* If you are going to be doing zone transfers to older servers, you
* shouldn't use 'many-answers'. 'transfer-format' may also be set
* on a host-by-host basis using the 'server' statement (see below).
*/
transfer-format one-answer;
query-source address * port *;
/*
* The "forward" option is only meaningful if you've defined
* forwarders. "first" gives the normal BIND
* forwarding behavior, i.e. ask the forwarders first, and if that
* doesn't work then do the full lookup. You can also say
* "forward only;" which is what used to be specified with
* "slave" or "options forward-only". "only" will never attempt
* a full lookup; only the forwarders will be used.
*/
forward first;
forwarders { }; // default is no forwarders
/*
* Here's a forwarders example that isn't trivial
*/
/*
forwarders {
1.2.3.4;
5.6.7.8;
};
*/
topology { localhost; localnets; }; // prefer local nameservers
/*
* Here's a more complicated topology example; it's commented out
* because only one topology block is allowed.
*
topology {
10/8; // prefer network 10.0.0.0
// netmask 255.0.0.0 most
!1.2.3/24; // don't like 1.2.3.0 netmask
// 255.255.255.0 at all
{ 1.2/16; 3/8; }; // like 1.2.0.0 netmask 255.255.0.0
// and 3.0.0.0 netmask 255.0.0.0
// equally well, but less than 10/8
};
*/
listen-on port 53 { any; }; // listen for queries on port 53 on
// any interface on the system
// (i.e. all interfaces). The
// "port 53" is optional; if you
// don't specify a port, port 53
// is assumed.
/*
* Multiple listen-on statements are allowed. Here's a more
* complicated example:
*/
/*
listen-on { 5.6.7.8; }; // listen on port 53 on interface
// 5.6.7.8
listen-on port 1234 { // listen on port 1234 on any
!1.2.3.4; // interface on network 1.2.3
1.2.3/24; // netmask 255.255.255.0, except for
}; // interface 1.2.3.4.
*/
/*
* Interval Timers
*/
cleaning-interval 60; // clean the cache of expired RRs
// every 'cleaning-interval' minutes
interface-interval 60; // scan for new or deleted interfaces
// every 'interface-interval' minutes
statistics-interval 60; // log statistics every
// 'statistics-interval' minutes
/*
* IXFR options
*/
maintain-ixfr-base no; // If yes, keep transaction log file for IXFR
max-ixfr-log-size 20; // Not implemented, maximum size the
// IXFR transaction log file to grow
};
/*
* Control listeners, for "ndc". Every nameserver needs at least one.
*/
controls {
inet * port 52 allow { any; }; // a bad idea
unix "/var/run/ndc" perm 0600 owner 0 group 0; // the default
};
zone "master.demo.zone" {
type master; // what used to be called "primary"
file "master.demo.zone";
check-names fail;
allow-update { none; };
allow-transfer { any; };
allow-query { any; };
// notify yes; // send NOTIFY messages for this
// zone? The global option is used
// if "notify" is not specified
// here.
// notify explicit; // only sent the notifies to the
// also-notify list
also-notify { }; // don't notify any nameservers other
// than those on the NS list for this
// zone
};
zone "slave.demo.zone" {
type slave; // what used to be called "secondary"
file "slave.demo.zone";
ixfr-base "slave.demo.zone.ixfr"; // File name for IXFR transaction log file
masters {
1.2.3.4; // where to zone transfer from
5.6.7.8 key key2;
};
transfer-source 10.0.0.53; // fixes multihoming problems
check-names warn;
allow-update { none; };
allow-transfer { any; };
allow-query { any; };
max-transfer-time-in 120; // if not set, global option is used.
also-notify { }; // don't notify any nameservers other
// than those on the NS list for this
// zone
};
zone "stub.demo.zone" {
type stub; // stub zones are like slave zones,
// except that only the NS records
// are transferred.
file "stub.demo.zone";
masters {
1.2.3.4; // where to zone transfer from
5.6.7.8;
};
check-names warn;
allow-update { none; };
allow-transfer { any; };
allow-query { any; };
max-transfer-time-in 120; // if not set, global option is used.
};
zone "." {
type hint; // used to be specified w/ "cache"
file "cache.db";
pubkey 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
};
trusted-keys {
. 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
};
acl can_query { !1.2.3/24; any; }; // network 1.2.3.0 mask 255.255.255.0
// is disallowed; rest are OK
acl can_axfr { 1.2.3.4; can_query; }; // host 1.2.3.4 and any host allowed
// by can_query are OK
zone "non-default-acl.demo.zone" {
type master;
file "foo";
allow-query { can_query; };
allow-transfer { can_axfr; };
allow-update {
1.2.3.4;
5.6.7.8;
};
};
acl key_acl { key sample_key; }; // a request signed with sample_key
server 1.2.3.4 {
edns no; // if no, we won't send ends queries
// to this server
bogus no; // if yes, we won't query or listen
// to this server
transfer-format one-answer; // set transfer format for this
// server (see the description of
// 'transfer-format' above)
// if not specified, the global option
// will be used
transfers 0; // not implemented
keys { sample_key; key2; }; // for TSIG; sign requests to this
// server with this key
support-ixfr yes; // for IXFR supported by server
// if yes, the listed server talks IXFR
};
logging {
/*
* All log output goes to one or more "channels"; you can make as
* many of them as you want.
*/
channel syslog_errors { // this channel will send errors or
syslog user; // or worse to syslog (user facility)
severity error;
};
/*
* Channels have a severity level. Messages at severity levels
* greater than or equal to the channel's level will be logged on
* the channel. In order of decreasing severity, the levels are:
*
* critical a fatal error
* error
* warning
* notice a normal, but significant event
* info an informational message
* debug 1 the least detailed debugging info
* ...
* debug 99 the most detailed debugging info
*/
/*
* Here are the built-in channels:
*
* channel default_syslog {
* syslog daemon;
* severity info;
* };
*
* channel default_debug {
* file "named.run"; // note: stderr is used instead
* // of "named.run" if the server
* // is started with the "-f"
* // option.
* severity dynamic; // this means log debugging
* // at whatever debugging level
* // the server is at, and don't
* // log anything if not
* // debugging.
* };
*
* channel null { // this is the bit bucket;
* file "/dev/null"; // any logging to this channel
* // is discarded.
* };
*
* channel default_stderr { // writes to stderr
* file "<stderr>"; // this is illustrative only;
* // there's currently no way
* // of saying "stderr" in the
* // configuration language.
* // i.e. don't try this at home.
* severity info;
* };
*
* default_stderr only works before the server daemonizes (i.e.
* during initial startup) or when it is running in foreground
* mode (-f command line option).
*/
/*
* There are many categories, so you can send the logs
* you want to see wherever you want, without seeing logs you
* don't want. Right now the categories are
*
* default the catch-all. many things still
* aren't classified into categories, and
* they all end up here. also, if you
* don't specify any channels for a
* category, the default category is used
* instead.
* config high-level configuration file
* processing
* parser low-level configuration file processing
* queries what used to be called "query logging"
* lame-servers messages like "Lame server on ..."
* statistics
* panic if the server has to shut itself
* down due to an internal problem, it
* logs the problem here (as well as
* in the problem's native category)
* update dynamic update
* ncache negative caching
* xfer-in zone transfers we're receiving
* xfer-out zone transfers we're sending
* db all database operations
* eventlib debugging info from the event system
* (see below)
* packet dumps of packets received and sent
* (see below)
* notify the NOTIFY protocol
* cname messages like "XX points to a CNAME"
* security approved/unapproved requests
* os operating system problems
* insist consistency check failures
* maintenance periodic maintenance
* load zone loading
* response-checks messages like
* "Malformed response ..."
* "wrong ans. name ..."
* "unrelated additional info ..."
* "invalid RR type ..."
* "bad referral ..."
*/
category parser {
syslog_errors; // you can log to as many channels
default_syslog; // as you want
};
category lame-servers { null; }; // don't log these at all
channel moderate_debug {
severity debug 3; // level 3 debugging to file
file "foo"; // foo
print-time yes; // timestamp log entries
print-category yes; // print category name
print-severity yes; // print severity level
/*
* Note that debugging must have been turned on either
* on the command line or with a signal to get debugging
* output (non-debugging output will still be written to
* this channel).
*/
};
/*
* If you don't want to see "zone XXXX loaded" messages but do
* want to see any problems, you could do the following.
*/
channel no_info_messages {
syslog;
severity notice;
};
category load { no_info_messages; };
/*
* You can also define category "default"; it gets used when no
* "category" statement has been given for a category.
*/
category default {
default_syslog;
moderate_debug;
};
/*
* If you don't define category default yourself, the default
* default category will be used. It is
*
* category default { default_syslog; default_debug; };
*/
/*
* If you don't define category panic yourself, the default
* panic category will be used. It is
*
* category panic { default_syslog; default_stderr; };
*/
/*
* Two categories, 'packet' and 'eventlib', are special. Only one
* channel may be assigned to each of them, and it must be a
* file channel. If you don't define them yourself, they default to
*
* category eventlib { default_debug; };
*
* category packet { default_debug; };
*/
};
include "filename"; // can't do within a statement
Loaded 100 of 8607 files, more files were not shown because too many files have changed in this diff. Show more