Commit Graph

2240 Commits

Author SHA1 Message Date
Kris Kennaway
5088aa38a3 Don't overflow our fd_set. This is not a full sync with KAME because there
are a whole lot of other changes which may not be suitable for us.

Obtained from:	KAME
2000-10-08 08:02:35 +00:00
Kris Kennaway
21f181a06a Format string fix. 2000-10-06 23:24:45 +00:00
Ruslan Ermilov
1e7492ffe1 Convert this Makefile to the usual style. 2000-10-06 11:18:11 +00:00
Ruslan Ermilov
79a74459fa Document the latest firewall knobs. 2000-10-06 11:17:06 +00:00
Ruslan Ermilov
507c85be96 Respect the protocol when looking the port up by service name.
PR:		21742
2000-10-04 07:59:19 +00:00
Ruslan Ermilov
8ace7a5e69 Do not force argument to ``ipid'' modifier be in hex, and
accept value of zero as valid for IP Identification field.
2000-10-03 11:23:29 +00:00
Ruslan Ermilov
1b4ea5a1a3 Fixed the printing of TCP flags. 2000-10-03 10:37:03 +00:00
Bill Fumerola
98b829924f Add new fields for more granularity:
IP: version, tos, ttl, len, id
	TCP: seq#, ack#, window size

Reviewed by:	silence on freebsd-{net,ipfw}
2000-10-02 03:03:31 +00:00
Ruslan Ermilov
ce6da1a92a - Documented the host/bits syntax for destination argument.
- Documented that netmask could be specified with third argument.
2000-09-29 10:52:21 +00:00
Ruslan Ermilov
4eed20b85f Interpret the address argument as network-type address for `destination'
argument only.  Before that, the `route add default gateway' first tried
the `gateway' as network address and passed its name to getnetbyname(3),
which in the BIND resolution case does the T_PTR lookup on that name.
2000-09-29 10:50:11 +00:00
Ruslan Ermilov
ecfe112d3e Fixed the case where argument of 0.0.0.0/8 would match the default route. 2000-09-29 10:37:16 +00:00
Ruslan Ermilov
3ea420e391 Document that net.inet.ip.fw.one_pass only affects dummynet(4).
Noticed by:	Peter Jeremy<peter.jeremy@alcatel.com.au>
2000-09-29 08:39:06 +00:00
Dag-Erling Smørgrav
c548151f51 Remove superfluous code:
1) use devname() instead of searching /dev for the dump device

   2) use fopen() instead of open() so we don't need to differentiate
      between compressing and not compressing when writing the core
      file or the kernel (zopen() returns a FILE *, so we just use
      fwrite() in both cases)

There should be no functional changes.
2000-09-28 20:09:36 +00:00
Greg Lehey
5a7e6cbe50 Add 'setupstate' to RAID-10 example.
Tripped-over-by:	Nicole Harrington <nicole@picturetrail.com>
2000-09-23 00:18:31 +00:00
Kenneth D. Merry
de2464d3bc Adjust 'camcontrol negotiate -v' so it prints out the initiator ID from the
Path Inquiry CCB.
2000-09-17 20:42:28 +00:00
Poul-Henning Kamp
fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Sheldon Hearn
01de01168f Improve the clarification of the handling of the securelevel.
Submitted by:	bde
2000-09-13 08:39:41 +00:00
Matt Jacob
cbd8ecd6ac Fix sign extension.
PR:		21232
Obtained from:	Christian Weisgerber <naddy@mips.inka.de>
2000-09-12 21:42:58 +00:00
Sheldon Hearn
67b661fd0a Clarify the handling of the securelevel.
PR:		20974
2000-09-12 12:30:13 +00:00
Dag-Erling Smørgrav
b6e55a056a Fix comment to match previous commit, as per bde. 2000-09-07 07:03:11 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
Dag-Erling Smørgrav
81667275a9 Don't warn about unknown mount types, since they most likely simply mean
that the right module hasn't been loaded yet (and mount(8) will do so
when necessary).
2000-09-06 17:44:07 +00:00
Andrey A. Chernov
b1d5d887cd /modules -> /boot/kernel 2000-09-06 15:55:31 +00:00
Greg Lehey
673fac08fd Bring LDADD in line with DPADD.
Reported by:	bde
2000-09-06 04:18:16 +00:00
Peter Wemm
7365d61d00 I'm not sure what changed to cause this, but using 'dirname' as a variable
was colliding with dirname() in libc.a and causing a Sig 10/bus error.
Just change dirname to savedir and be done with it.
2000-09-03 07:02:00 +00:00
Greg Lehey
25bcb8d376 Clean up now that setproctitle() is in libc.
Submitted by: 	brian
2000-09-03 01:29:29 +00:00
Brian Somers
433add6ff5 Don't use libutil now that setproctitle() is in libc 2000-09-02 20:52:15 +00:00
Greg Lehey
5ef18a82df Correct typo. 2000-08-29 02:42:02 +00:00
Nick Hibma
05c17c3208 No more hunting around for ipnat.conf(5) man page. 2000-08-28 11:36:30 +00:00
Sheldon Hearn
e4bc2e3400 Explain the notion that additional mount options may be described
in mount_XXX manual pages.  Remove explicit mention of NFS mount
options, since they are accurately described by this rule.

PR:		20814
2000-08-28 08:52:59 +00:00
Poul-Henning Kamp
64ec80423e Mount DEVFS with no options. 2000-08-26 11:53:53 +00:00
John Baldwin
b594e0fea2 - When adjusting the end of a partition to lie on a cylinder boundary, don't
adjust the size, but the actual end.
- Break out some of the sanity checks on partitions into a sanitize_partition
  function.
- When adjusting partitions, always adjust the start "up", and the end "down"
  so that we stay within the boundaries of the original request.
- Various small nits found by bde.

Reported by:	bde, imp, rgrimes
2000-08-24 17:54:45 +00:00
Sheldon Hearn
c62ffab640 Only print information about reads and writes when the -v flag (for
verbose mode) is specified.  This should really have been the case
when this extra cruft was first introduced in rev 1.23.

PR:		20710
Reported by:	Mike Meyer <mwm@mired.org>
2000-08-23 09:59:25 +00:00
Warner Losh
fdcd5596ff optreset is declared in unistd.h, so we don't need to declare it here again.
Reviews by: ken
2000-08-16 15:36:14 +00:00
Warner Losh
595a9d6ebc optreset is declared in unistd.h now. 2000-08-16 07:36:30 +00:00
Robert Nordier
5306a1eccb Remove redundant code left over on removal of /dev/rXXX handling
in r1.12.
2000-08-15 18:04:16 +00:00
Robert Nordier
e3d24c1a5f Partially revert r1.12, in which a warnx() if the device is not a
character device is changed to an errx().  This unnecessarily
compromises device independence.
2000-08-15 17:42:24 +00:00
Sheldon Hearn
acaf1e1fc5 Explain why adding ``options NFSKERB'' breaks the kernel build.
PR:		10642
Reported by:	Stefan Eggers <seggers@semyam.dinoco.de>
Submitted by:	johan
2000-08-11 13:03:13 +00:00
Sheldon Hearn
d84f2470c3 Add text from NetBSD's rev 1.12 which should have accompanied
the changes made to our own source on 1997-01-01.

PR:		20445
Submitted by:	Jon Masami Kuroda <jkuroda@eecs.berkeley.edu>
2000-08-11 10:37:39 +00:00
Sheldon Hearn
c0e2b70a76 Add $FreeBSD$. 2000-08-11 08:23:26 +00:00
Sheldon Hearn
6017865885 Resolve conflicts. 2000-08-10 07:54:33 +00:00
Sheldon Hearn
8b336df137 Import routed-2.22. 2000-08-10 07:48:06 +00:00
Kelly Yancey
354a0adabf Fix an order-of-operations bug and properly shift page_control values for
comparison with SMS_PAGE_CTRL_* macros.
2000-08-10 01:20:43 +00:00
Kelly Yancey
d996f0a884 Include new modepage list (-l) option in the verbose usage. 2000-08-09 21:29:22 +00:00
John Baldwin
34f71eeb3c Fix a typo in the last commit so that this compiles. 2000-08-09 00:28:09 +00:00
Kelly Yancey
cb498c18f8 Fix some whitespace errors.
Pointed out by:		ps
2000-08-08 09:27:55 +00:00
Kelly Yancey
9402dd9932 Replace -l with .Fl l
Pointed out by: sheldonh
2000-08-08 09:03:48 +00:00
Kelly Yancey
7e32b20d95 This is an overhaul of the mode page handling in camcontrol as well as
related patches. These include:
	* Mode page editting can be scripted. This involves two
	  things: first, if stdin is not a tty, changes are read from
	  stdin rather than invoking $EDITOR. Second, and more
	  importantly, not all modepage entries must be included in the
	  change set. This means that camcontrol can now gracefully handle
	  more intrusive editting from the $EDITOR, including removal or
	  rearrangement of lines. It also means that you can do stuff
	  like:
		# echo "WCE: 1" | camcontrol modepage da3 -m 8 -e
		# newfs /dev/da3
		# echo "WCE: 0" | camcontrol modepage da3 -m 8 -e
	* Range-checking on user-supplied input values. modeedit.c now
	  uses the field width specifiers to determine the maximum
	  allowable value for a field. If the user enters a value larger
	  than the maximum, it clips the value to the max and warns the
	  user. This also involved patching cam_cmdparse.c to be more
	  consistent with regards to the "count" parameter to arg_put
	  (previously is was the length of strings and 1 for all integral
	  types). The cam_cdbparse(3) man page was also updated to reflect
	  the revised semantics.
	* In the process, I removed the 64 entry limit on mode pages (not
	  that we were even close to hitting that limit). This was a nice
	  side-effect of the other changes.
	* Technically, the new mode editting functionality allows editting
	  of character array entries in mode pages (type 'c' or 'z'),
	  however since buff_encode doesn't grok them it is currently
	  useless.
	* Camcontrol gained two new options related to mode pages: -l and
	  -b. The former lists all available mode pages for a given
	  device. The latter forces mode page display in binary format
	  (the default when no mode page definition was found in
	  scsi_modes).
	* Added support for mode page names to scsi_modes. Allows names to
	  be displayed alongside mode numbers in the mode page
	  listing. Updated scsi_modes to use the new functionality. This
	  also adds the semicolon into the scsi_modes syntax as an
	  optional mode page definition terminator. This is needed to name
	  pages without providing a page format definition.
	* Updated scsi_all.h to include a structure describing mode page
	  headers.
	* Added $FreeBSD$ line to scsi_modes.

Inspired by:	dwhite
Reviewed by:	ken
2000-08-08 06:24:17 +00:00
John Polstra
643dcf40ee Add a "-i" option ("insecure") which disables the checks for
root ownership, etc.  I will soon commit a companion knob for
"/etc/rc.conf".

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-08-07 19:12:04 +00:00
Josef Karthauser
197ef30718 0xA0 = Suspend to disk. 2000-08-07 00:26:09 +00:00
Robert Nordier
21e11fa91d Consistency fix. 2000-08-06 09:19:45 +00:00
Alexander Langer
b10a063dbe Fix world-breakage: warnx("..') --> warnx("...")
Submitted by:	Alain Thivillon <Alain.Thivillon@hsc.fr>,
		Udo Erdelhoff <ue@nathan.ruhr.de>
Approved by:	green
2000-08-05 15:45:59 +00:00
Kris Kennaway
0af87587a7 Don't call errx() without a format string, to protect against possible
% characters in localized error messages from ipsec_strerror().

Obtained from:  OpenBSD
2000-08-05 06:24:41 +00:00
Kris Kennaway
d045f16001 Don't call warnx() without a format string (localized error messages
could conceivably cause a crash).

Obtained from:	OpenBSD
2000-08-05 06:06:48 +00:00
Sheldon Hearn
064effd49b Resolve conflicts from vendor merge. 2000-08-02 11:38:20 +00:00
Sheldon Hearn
f7434bbd42 Import routed-2.21. 2000-08-02 11:12:54 +00:00
Sheldon Hearn
56747bad91 Use ${LIBDATADIR} instead of hardcoding /usr/libdata into the
${TABDIR} path.

PR:		17945
Submitted by:	Benno Rice <benno@netizen.com.au>
2000-08-01 09:33:11 +00:00
Darren Reed
8c5df86ea8 Darren,
Could you please enable my "state top" patches in the FreeBSD distribution.
I developped the stuff under FreeBSD, so it must be good there :-)

Here is a patch (relative to the RELENG_4 branch).

Thanks,

           Frank
2000-07-30 06:31:49 +00:00
Sheldon Hearn
1b2fbe6ff9 Rename the loadable nullfs kernel module: null -> nullfs 2000-07-28 11:54:09 +00:00
David E. O'Brien
2cd4f9e14b Add reference to sysctl.conf. 2000-07-27 22:57:46 +00:00
David E. O'Brien
fbc679ea4b Alternate script for dhclient to use in setting the received configuration
on the host.

PR:		15342
Submitted by:	Patrick Bihan-Faou <patrick@mindstep.com>
2000-07-27 20:49:27 +00:00
Jeroen Ruigrok van der Werven
7333848d98 Fix the reporting of a raw device node.
Change a warnx to an errx since we should only attempt to use
this utility on a character device.

Approved by:	green
2000-07-26 20:12:46 +00:00
Sheldon Hearn
733144d91d Describe the syncer(4)-related sysctls kern.filedelay, kern.dirdelay
and kern.metadelay, thanks to mckusick's feedback.
2000-07-26 08:51:58 +00:00
John Polstra
fa0c86aadc If a directory is world-writable or is not owned by root, skip it
and emit a warning.  This is a security measure since ldconfig
influences the shared libraries used by all programs.

I think the check should be made even more stringent by also
ignoring group-writable directories.  I will make that change soon
unless we encounter a good reason not to do it.

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-26 04:47:17 +00:00
Kirk McKusick
91ea161570 If the lost+found directory is created by fsck, it will do a cacheino()
which sets the inoinfo's i_parent and i_dotdot to 0, but they never get
set to ROOTINO. This means that propagate will never find lost+found and
its descendents, subdirectories will remain DSTATE (instead of DFOUND)
even though they *are* correctly linked in, and pass4.c will try to
clear them unsuccessfully, thinking that there is no link count from the
DSTATE directory's parent. The result is that you need to run fsck twice
and get link count increasing errors (which are unexpected and fatal
when running in preen mode). The fix is to set i_parent and i_dotdot to
"parent" after the second cacheino() call in dir.c:allocdir().

Obtained from:	"Ethan Solomita" <ethan@geocast.com> (of the NetBSD Project)
2000-07-24 19:50:20 +00:00
David E. O'Brien
f063845519 Blah, need to add /usr/bin to the path also.
Of course this is a bug in that the dhclient script will not work properly
if one has a local / and an NFS mounted /usr and needs to obtain its IP
address via DHCP before being able to mount /usr.
2000-07-21 19:08:22 +00:00
John Baldwin
fe81981fdb Fix a really stupid bug where I assumed sizeof(int) == 2. This resulted in
MBR's with a 4th slice failing the signature check and fdisk saying that
they are invalid.

Submitted by:	bde
2000-07-21 18:26:20 +00:00
David E. O'Brien
fbb0d22951 Need /usr/sbin for arp(8). 2000-07-20 10:29:52 +00:00
David E. O'Brien
a3b867b670 Patchlevel 3 of the ISC 2.0 dhcp client now requires us to give it the
shell script's PATH setting in the environment.
2000-07-20 10:11:22 +00:00
Archie Cobbs
abc3361a8b Show the actual command line usage in the man page and usage error string. 2000-07-19 17:24:53 +00:00
Archie Cobbs
d80e7aa796 Make "ifconfig" with no arguments equivalent to "ifconfig -a". 2000-07-18 22:07:31 +00:00
Sheldon Hearn
893d2b85cd Cross-reference mount_nfs(8) and showmount(8).
PR:		20008
Reported by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2000-07-18 17:34:23 +00:00
Sheldon Hearn
ffc717e235 Order the cross-references in the SEE ALSO section, in preparation
for PR 20008.
2000-07-18 17:31:00 +00:00
John Baldwin
a12de06299 - Don't try to free mboot.bootinst before it has been allocated. If, for
some reason, mboot.bootinst is not initialized to NULL at the beginning
  of the program, then the last commit to this would try to free whatever
  bogus address is in it.
- Restore the behavior of free()'ing the mboot.bootinst buffer after we
  abuse it to determine the sector size of the disk (as clearly noted in
  the comments).  Properly fix the double free() bug by setting the pointer
  to NULL after we free it.
2000-07-17 19:51:42 +00:00
Ruslan Ermilov
ecd1fe62de Suggest looking at rc.conf(5) on how to start natd(8) during boot.
Submitted by:	dcs
2000-07-17 10:06:54 +00:00
Bill Fumerola
9a6eeac9f4 Fix a paste-o in the tcpoptions check (not a security problem, just a
error in the usage printf())

Reviewed by:	rwatson
2000-07-17 03:02:15 +00:00
David Malone
fddde8b056 Don't try to make files immutable (ie. chflags) before setting access times.
PR:		19973
Submitted by:	Arjan de Vet <Arjan.deVet@adv.iae.nl>
Reviewed by:	Matthew Jacob <mjacob@feral.com>
2000-07-16 23:22:15 +00:00
Kirk McKusick
6c91ca38b0 Make a tighter test for valid inode numbers in getnextinode(). 2000-07-15 18:28:36 +00:00
Andrey A. Chernov
2b5ce8a961 Fix memory leak/double free found by phkmalloc
Uniform mboot.bootinst allocation code to be independent of functions order
2000-07-15 13:37:47 +00:00
Ben Smithurst
d9a9b8dbb6 * Clarify text on choosing a dump device
* Remove the text which states only devices with minor number 1 can be used
  - this is no longer true.
* Mention that dumpon(8) cannot be used to capture dumps from panics during
  kernel initialization.
* /dev/wd -> /dev/ad

PR:		19848
Submitted by:	Udo Erdelhoff <ue@nathan.ruhr.de>
Reviewed by:	sheldonh
2000-07-14 18:04:39 +00:00
David Malone
ceb453befe Clarify "mount -a -t" example - it only unmounts stuff in /etc/fstab.
Fix a typo.

PR:		19438
Submitted by:	Eoin Lawless <eoin@maths.tcd.ie>
Reviewed by:	sheldon
2000-07-13 16:20:54 +00:00
John Baldwin
67b6e9dd8b Note that "ether" is a supported address family for setting addresses. 2000-07-12 17:58:19 +00:00
John Baldwin
85c2cf303d - Always respect cylinder boundaries when creating slices unless the user
explicitly sets the geometry.
- Allow for MBR boot loaders that are longer than one sector.  Only accept
  boot loaders if their size is a multiple of the sector size, however.
2000-07-12 16:45:11 +00:00
John Baldwin
de010cdfd0 Add support to the 'ether' address family to support setting of addresses.
This allows you to set ether addresses with 'ifconfig ether'.  Also, use
some saner socket address families that allow several special case tests
to be removed.
2000-07-12 16:41:47 +00:00
Kirk McKusick
7932349eff Ensure that block and character devices as well as fifo's and sockets
all have zero length. A non-zero length panic's the kernel when one
of these is deleted.

PR:		19426
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by:	dwmalone@FreeBSD.org
2000-07-12 06:19:22 +00:00
Poul-Henning Kamp
aa02fb5729 Array of long support.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-07-11 21:59:54 +00:00
Kris Kennaway
ada79f6035 Don't call sprintf() with no format string. 2000-07-10 08:22:21 +00:00
Kris Kennaway
04d06bb686 Don't call warn() with no format string. 2000-07-10 08:14:18 +00:00
Kris Kennaway
66b8466826 Don't call err with no format string. 2000-07-10 08:11:52 +00:00
John Polstra
97333b9e84 Make "ldconfig" with no arguments behave the same as "ldconfig -R".
Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-09 19:12:49 +00:00
Kirk McKusick
142d8d2f40 Teach fsck about snapshot files. These changes should have no
effect on operation of fsck on filesystems without snapshots.
If you get compilation errors, be sure that you have copies of
/usr/include/sys/mount.h (1.94), /usr/include/sys/stat.h (1.21),
and /usr/include/ufs/ffs/fs.h (1.16) as of July 4, 2000 or later.
2000-07-06 02:03:11 +00:00
Kris Kennaway
2dd1ffc97d Correct style bugs in previous commit 2000-07-06 01:55:21 +00:00
Kirk McKusick
115f72d0d8 Add the snapshot option to mount_ufs. 2000-07-06 01:50:05 +00:00
Kris Kennaway
9c5fbccb11 Sync with KAME
Obtained from:	KAME
2000-07-05 09:48:43 +00:00
Kris Kennaway
ccc58874e7 Sync with KAME
Obtained from:	KAME
2000-07-05 09:37:52 +00:00
Kris Kennaway
0adc52c853 Sync with latest KAME code.
Obtained from:	KAME
2000-07-05 09:34:10 +00:00
John Baldwin
9701cd40b4 Support for unsigned integer and long sysctl variables. Update the
SYSCTL_LONG macro to be consistent with other integer sysctl variables
and require an initial value instead of assuming 0.  Update several
sysctl variables to use the unsigned types.

PR:		15251
Submitted by:	Kelly Yancey <kbyanc@posi.net>
2000-07-05 07:46:41 +00:00
Jun-ichiro itojun Hagino
3c62e87aa3 synchronize with latest kame tree.
behavior change: policy syntax was changed.  you may need to update your
setkey(8) configuration files.
2000-07-04 16:22:05 +00:00
Sheldon Hearn
c886a5d4d2 Remove the use of a dash in the usage, since this isn't in keeping
with other utilities which offer similar functionality.

This change was discussed with ache, who brought in the ability to
use a dash to represent stdin in comcontrol.
2000-07-03 13:29:04 +00:00
Sheldon Hearn
8e5669a89d What the commit log for rev 1.16 neglected to mention was that the
delta touched the Name Description (Nd).  It introduced a grammar
error and did not fix the extraneous punctuation (Nd lines are not
terminated with a period).
2000-07-03 12:01:06 +00:00