Commit Graph

2384 Commits

Author SHA1 Message Date
Brian Feldman
c0511d3b58 Switch to using a struct xucred instead of a struct xucred when not
actually in the kernel.  This structure is a different size than
what is currently in -CURRENT, but should hopefully be the last time
any application breakage is caused there.  As soon as any major
inconveniences are removed, the definition of the in-kernel struct
ucred should be conditionalized upon defined(_KERNEL).

This also changes struct export_args to remove dependency on the
constantly-changing struct ucred, as well as limiting the bounds
of the size fields to the correct size.  This means: a) mountd and
friends won't break all the time, b) mountd and friends won't crash
the kernel all the time if they don't know what they're doing wrt
actual struct export_args layout.

Reviewed by:	bde
2001-02-18 13:30:20 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Dag-Erling Smørgrav
4c98f36d94 Document the new -k option in usage message and man page. 2001-02-16 16:28:36 +00:00
Dag-Erling Smørgrav
532c19016b Add a -k option that prevents clearing the dump after saving it.
Use sysctlbyname() instead of sysctl().

Clear up and simplify the version extraction code.

Attempt to detect stretches of zeroes in the dump and avoid writing
them to disk to save space and time.
2001-02-16 16:27:32 +00:00
Yoshihiro Takahashi
7f77ae5795 Added pc98 support.
Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
2001-02-16 13:30:27 +00:00
Tor Egge
a46d9bce72 Don't allow special devices of type NODEV (NOUDEV as seen from kernel).
They can't be created via mknod and the kernel crashes if it encounters
such an inode.
Approved by:	mckusick
2001-02-15 22:26:21 +00:00
Ruslan Ermilov
d4339464da mdoc(7) police: normalize the construct. 2001-02-15 08:36:20 +00:00
Sheldon Hearn
63ca8f4ad1 Fix grammar nit in previous commit. 2001-02-14 15:03:20 +00:00
Poul-Henning Kamp
bb07ec8c84 Introduce a new feature in IPFW: Check of the source or destination
address is configured on a interface.  This is useful for routers with
dynamic interfaces.  It is now possible to say:

        0100 allow       tcp from any to any established
        0200 skipto 1000 tcp from any to any
        0300 allow       ip from any to any
        1000 allow       tcp from 1.2.3.4 to me 22
        1010 deny        tcp from any to me 22
        1020 allow       tcp from any to any

and not have to worry about the behaviour if dynamic interfaces configure
new IP numbers later on.

The check is semi expensive (traverses the interface address list)
so it should be protected as in the above example if high performance
is a requirement.
2001-02-13 14:12:37 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
Nik Clayton
8684bec007 Use ".Nm fsck_ffs", so that this turns up in whatis(1), and others.
Add .Xr to fsck.

Prompted by:	JM Jr's script that shows binaries with no whatis info
Reviewed by:	adrian
2001-02-12 17:50:14 +00:00
Poul-Henning Kamp
421b0201ed Fix a cosmetic problem with some very defensive programming: The devfs
mount would show up as "/dev/", loose that trailing slash.
2001-02-08 22:07:08 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Jeroen Ruigrok van der Werven
9a01d32bfd Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris
2001-02-06 10:39:38 +00:00
Dan Moschuk
51ab799576 mount a --> mount an
PR: 24842
Submitted by: Rich Morin <rdm@cfcl.com>
2001-02-04 18:05:21 +00:00
Nik Clayton
01c78dbb09 Add an xref for mount_ntfs.
PR:             docs/24693
Submitted by:   Etienne Vidal <hallik@libertysurf.fr>
2001-02-02 03:08:48 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ian Dowse
16241a05dd Fsck_ffs did not properly range-check the inode 'di_size'
field, so it was possible for a filesystem marked clean by fsck_ffs
to cause kernel crashes later when mounted. This could occur when
fsck_ffs was used to repair a badly corrupted filesystem.

As pointed out by bde, it is not sufficient to restrict di_size to
just the superblock fs_maxfilesize limit. The use of 32-bit logical
block numbers (both in fsck and the kernel) induces another file
size limit which is usually lower than fs_maxfilesize. Also, the
old 4.3BSD filesystem does not have fs_maxfilesize initialised.

Following this change, fsck_ffs will enforce exactly the same
file size limits as are used by the kernel.

PR:		kern/15065
Discussed with:	bde
Reviewed by:	bde, mckusick
2001-01-31 15:16:56 +00:00
Poul-Henning Kamp
fb1023d670 Strip optional prefixes "/dev/" and "md" from the -u argument. 2001-01-31 08:41:18 +00:00
Poul-Henning Kamp
7cf109c1b4 Make mount_mfs annoy users for 15 seconds and point them at mdconfig(8). 2001-01-30 10:21:20 +00:00
Ben Smithurst
e50fa3d247 Fix 'tunefs -p'
Reviewed by:	sheldonh
2001-01-29 11:00:16 +00:00
Poul-Henning Kamp
941ee63274 Use <sys/queue.h> instead of home-rolled list.
Submitted by:	"Jason Smethers" <jsmethers@pdq.net>
2001-01-29 09:45:51 +00:00
Poul-Henning Kamp
bfa0b2984d Use \a instead of \007 for making noise.
Submitted by:	"Jason Smethers" <jsmethers@pdq.net>
2001-01-28 21:21:37 +00:00
Poul-Henning Kamp
3b42f2f3bb Duh, the version of mdconfig.c I committed came from the wrong machine.
Commit the right version, but without the -b option which is too evil
for the present.

Remove -b and preload from the manpage as well.
2001-01-28 20:17:46 +00:00
Poul-Henning Kamp
353f4b3966 Don't specify fragment size, it autosizes from the sectorsize.
Remember to set mode 1777 on /tmp

Submitted by:	mjacob
2001-01-28 20:03:02 +00:00
Brian S. Dean
f59091e7cd Print out the target device when the mount fails. 2001-01-25 20:05:34 +00:00
Brian S. Dean
20ee96993b Always print out the target device when the mount fails, not just on
ENOENT.
2001-01-25 20:03:38 +00:00
Brian S. Dean
a04ea1b860 Provide a better error message when the /dev entry is non-existant.
Due to the old message, I spent way more time debugging a diskless
root problem than it should have taken.
2001-01-25 17:29:07 +00:00
Kris Kennaway
1b2556e4a4 Fix the vulnerability with TCP ECE packets recently fixed in ipfw.
This is untested, but believed to work.
2001-01-23 21:11:28 +00:00
Hajimu UMEMOTO
e26aac8d24 avoid conflicting #define symbol (s/FW_IFNLEN/IP6&/).
Obtained from:	KAME
2001-01-22 19:20:06 +00:00
Ben Smithurst
23dafeaced mdoc police.
Submitted by:	ru
2001-01-22 18:37:51 +00:00
Ruslan Ermilov
5501231a13 man(7) -> mdoc(7). 2001-01-22 17:44:36 +00:00
Hajimu UMEMOTO
dd9d139453 Room to hold rules should be dynamically allocated.
PR:		kern/24248
2001-01-20 22:40:39 +00:00
Ben Smithurst
b112c02bc6 Add 'netrange' parameter to 'range' command and fix a couple of typos.
PR:		23984
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-01-20 21:37:37 +00:00
Bruce Evans
3b9a046dbe Removed unused copy of ../mount/getmtopts.3.
Removed used copies of ../mount/getmntopts.c ../mount/mntopts.h.  Use the
versions in ../mount directly like all other mount utilities.

Removed used copy of ../mount/pathnames.h.  Use the version in ../mount
for free as a side effect of using the mntopts files there.  We should
not use it at all, since the 2/3 of the definitions in it are in <paths.h>
and the other 1/3 should be in ../mountd/pathnames.h and is not used by
mount_ifs anyway.
2001-01-17 04:10:06 +00:00
Bruce Evans
6e3d19c8ff Removed unused rotting copy of ../mount/mount.8. It should never have
been repo-copied.
2001-01-17 03:39:53 +00:00
Ruslan Ermilov
9884911506 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
Ruslan Ermilov
896eb7d10c Prepare for mdoc(7)NG. 2001-01-16 09:15:57 +00:00
Greg Lehey
458b6188cb Fix typo.
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
PR:		24233

Fix typos.

Submitted by:	"Jeroen C. van Gelderen" <jeroen@vangelderen.org>
2001-01-15 22:15:05 +00:00
Ian Dowse
f55ff3f3ef The ffs superblock includes a 128-byte region for use by temporary
in-core pointers to summary information. An array in this region
(fs_csp) could overflow on filesystems with a very large number of
cylinder groups (~16000 on i386 with 8k blocks). When this happens,
other fields in the superblock get corrupted, and fsck refuses to
check the filesystem.

Solve this problem by replacing the fs_csp array in 'struct fs'
with a single pointer, and add padding to keep the length of the
128-byte region fixed. Update the kernel and userland utilities
to use just this single pointer.

With this change, the kernel no longer makes use of the superblock
fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
to indicate that these fields must be calculated for compatibility
with older kernels.

Reviewed by:	mckusick
2001-01-15 18:30:40 +00:00
Poul-Henning Kamp
3a36e32d8c Add a couple of newlines in the output from route monitor 2001-01-15 12:28:48 +00:00
Eivind Eklund
10185bdc57 Replace reference to replacing mkfs(8) with a paragraph actually
describing what newfs *does*.
2001-01-15 03:13:26 +00:00
Dag-Erling Smørgrav
0ef56fd857 Document the -N option in the usage message and the man page. 2001-01-14 19:08:58 +00:00
Dag-Erling Smørgrav
ca5fac557f Add a -N option that makes sysctl(8) print out just the variable names.
Zsh users can add the following to their .zshrc for sysctl completion:

function listsysctls {
    case $1 in
    *.*) set -A reply $(sysctl -AN ${1%.*}) ;;
    *) set -A reply $(sysctl -AN) ;;
    esac
}
compctl -K listsysctls sysctl

While I'm here, brucify the getopt() switch.
2001-01-14 16:40:06 +00:00
Greg Lehey
8b075ef933 Remove references to lockinfo.plex.
Reported by: 	dougb
2001-01-14 11:42:19 +00:00
Ruslan Ermilov
739cdd4baa Mdoc(7)ify. 2001-01-10 14:53:46 +00:00
Robert Watson
65450f2f77 o IPFW incorrectly handled filtering in the presence of previously
reserved and now allocated TCP flags in incoming packets.  This patch
  stops overloading those bits in the IP firewall rules, and moves
  colliding flags to a seperate field, ipflg.  The IPFW userland
  management tool, ipfw(8), is updated to reflect this change.  New TCP
  flags related to ECN are now included in tcp.h for reference, although
  we don't currently implement TCP+ECN.

o To use this fix without completely rebuilding, it is sufficient to copy
  ip_fw.h and tcp.h into your appropriate include directory, then rebuild
  the ipfw kernel module, and ipfw tool, and install both.  Note that a
  mismatch between module and userland tool will result in incorrect
  installation of firewall rules that may have unexpected effects.  This
  is an MFC candidate, following shakedown.  This bug does not appear
  to affect ipfilter.

Reviewed by:	security-officer, billf
Reported by:	Aragon Gouveia <aragon@phat.za.net>
2001-01-09 03:10:30 +00:00
Ian Dowse
fefd74d87c Document fsck_ffs's new SIGINFO handler.
Reviewed by:	sheldonh
2001-01-03 13:53:48 +00:00
Ben Smithurst
059b15939d Minor layout fixes.
PR:		24004
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-01-01 23:30:51 +00:00
Poul-Henning Kamp
e06b153abe Add padding space and a version number to the md_ioctl structre for future
extension.

Add ability to create a preload disk giving an address and a length
(suggested by imp)

Fix bug relating to very small md(4) devices.

Update md.c copyright to reflect the status of code copied from vn.c.
(noticed by dillon)
2001-01-01 23:08:26 +00:00
Peter Wemm
623d7cd30e Further tidy up the sbin/init and release builds. 2001-01-01 21:39:00 +00:00
Poul-Henning Kamp
8440a01077 This is not necessarily the correct fix, but at least sbin/init compiles
in a sterile environment like "make release"
2001-01-01 19:46:43 +00:00
Poul-Henning Kamp
8f8def9e2c This is the first snapshot of the new all-singing-and-dancing md(4).
Using the mdconfig(8) program you can now configure memory disks
on malloc(9), swap or a file/vnode.  preloaded md disks also work
as usual.
2000-12-31 13:03:42 +00:00
Poul-Henning Kamp
c2ef0b73df Improve cmdline parsing and messages.
Add a rudimentary man-page.  (I'm no mdoc wizard, feel free to attack my
mistakes and blunders)
2000-12-31 11:20:49 +00:00
Poul-Henning Kamp
32ff2662d1 Use macro API to <sys/queue.h>
Submitted by:	"Peter Avalos" <pavalos@theshell.com>
Reviewed by:	/sbin/md5
2000-12-30 21:05:45 +00:00
Poul-Henning Kamp
83baa1a055 Add mdconfig into the build. 2000-12-28 20:59:35 +00:00
Poul-Henning Kamp
70d586c091 Preliminary scaffolding for the new integrated vn+md device driver.
I decided to work on the md(4) driver and integrate the vn(4)
functionality into it mainly based on the name being more suitable.
Ideally 'vd' as in "virtual disk" would probably be the most logical
but our sound-master pointed out that this would cause uncontrollable
fits of giggles in the brits.  Another complication would the needed
changes to the ramdisk boot/root functionality.

The vn driver will stay around for some time after I complete this
merge for transition reasons, and I'll make it whine to people that
they should migrate to the md(4) driver for some time before it
dies.

The kernel part of the new md(4) driver will be committed after more
testing.
2000-12-28 20:57:57 +00:00
Tim Vanderhoek
5a6d739796 typo: modifes -> modifies 2000-12-28 16:44:47 +00:00
Dag-Erling Smørgrav
c4b267dc7e Retire kernfs (userland part). 2000-12-28 12:59:57 +00:00
Poul-Henning Kamp
28b66787e0 When trying to deduce the diskname from the name so we can run
parallel fsck's one per drive, use the shortest prefix ending in
a digit rather than the longest prefix ending in a digit.

This makes "/dev/ad0s1a" and "/dev/ad0s2a" appear to both reside
on the disk "/dev/ad0" and consequently they will be fsck'ed
sequentially rather than in parallel as now.

In general this heuristic is rather soft and errorprone.  For
instance ccd may often reside on two or more physical disks.  A
good solution would be to look for passes larger than 1 until no
disks are found in a particular pass, that way people could put
ccd stripes in pass 3... and have them fsck'ed sequentially.

Reviewed by:	mjacob
2000-12-27 22:28:40 +00:00
Poul-Henning Kamp
dab777beb8 Use official API to <sys/queue.h> instead of groping around inside the
data structures.

Reviewed by:	imp
2000-12-27 21:38:06 +00:00
Ruslan Ermilov
d90d7015f9 Prepare for mdoc(7)NG. 2000-12-27 14:40:52 +00:00
Sheldon Hearn
20fc4e5c7b Fix hard sentence break introduced in previous commit. 2000-12-20 13:23:50 +00:00
Greg Lehey
c25da7d469 Cosmetics.
Correct location of history file.

Change references from /dev/wd to /dev/ad.

Use more appropriate defaults for stripe size in examples.
2000-12-20 05:08:41 +00:00
Greg Lehey
5e104ad0dd roughlength: Use correct format strings. 2000-12-20 05:07:36 +00:00
Greg Lehey
0b01781882 Correct some comments.
vinum_attach: Get correct names (were being overwritten).

Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2000-12-20 05:05:39 +00:00
Warner Losh
64dee60f8c o Add an example for a large file system.
o Remove bug about boot blocks hating non-8k file systems.  This hasn't been
  the case for a long time.

Not Objected to by: hackers, doc
2000-12-19 21:55:07 +00:00
Ruslan Ermilov
d8aa002e9c Prepare for mdoc(7)NG. 2000-12-19 15:36:48 +00:00
Poul-Henning Kamp
70d8bdef9d Add a missing period and newline to a message.
PR:	23334
Submitted by:	Rich Morin <rdm@cfcl.com>
2000-12-18 21:14:25 +00:00
Ruslan Ermilov
1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Poul-Henning Kamp
9d1334552f Add a -a option to show the entire message buffer. 2000-12-17 19:05:17 +00:00
John Polstra
4c6616fc3e Extend the ldconfig security check so that it ignores group-writable
directories in addition to world-writable directories.  As before,
this check can be disabled with the "-i" option, which in turn can
be made the default for boot-up by setting "ldconfig_insecure=YES"
in "/etc/rc.conf".

Also fix an mdoc nit in the manual page.

Submitted by:	Maxime Henrion <mux@qualys.com>
2000-12-17 18:50:56 +00:00
Ian Dowse
6db798cae4 Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of
a SIGINFO (normally via Ctrl-T), a line will be output indicating
the current phase number and progress information relevant to the
current phase.

Approved by:	mckusick
2000-12-15 14:23:55 +00:00
Alexey Zelkin
97a00e767a Add missing coma in SEE ALSO section
Reported by: Rich Morin <rdm@cfcl.com>
2000-12-14 16:24:38 +00:00
Ruslan Ermilov
88544700ca mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Thomas-Henning von Kamptz
686e661363 Fix a logical bug introduced by changing the formatting.
Submitted by:	ru
Reviewed by:	chm
2000-12-13 22:19:05 +00:00
Ruslan Ermilov
f33c0fddd7 Mdoc(7)ify. 2000-12-13 11:33:19 +00:00
Thomas-Henning von Kamptz
4020c5bc54 corrected spelling mistakes in comments
check a couple of mallocs
usage of errx
linebreaks of DBG_ macros,
correcting the usage of nroff macros

Submitted by:	grog, charnier
Reviewed by:	chm
2000-12-12 20:03:17 +00:00
Ian Dowse
5a59cccc61 Stop restore from looping under certain error conditions. This
corrects cases where restore would spew an infinite stream of
"Changing volumes on pipe input?" messages, or would loop waiting
for a response to the "set owner/mode for '.'" question.

PR:		bin/14250
Reviewed by:	dwmalone
2000-12-12 12:04:02 +00:00
Kirk McKusick
522b7bcdf6 Don't give up on file write errors. Just log them and continue. 2000-12-12 06:30:42 +00:00
Ruslan Ermilov
b24f640551 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:20:31 +00:00
Philippe Charnier
77edab906e The tunefs code assumed that the last argument was the device specification.
We need to parse the arguments first, then open the device (if
specified) and then apply the changes. This change will disallow the
(undocumented) use of multiple instances of the same argument on the
same command line for the sack of a better error message.

Other changes are:
1) the softupdates (-n) now issue a warning about remaining unchanged
2) the usage and man page is changed to specify "space | time" instead of
"optimization preference".

PR:		bin/23335
Submitted by:Mark Peek <mark@whistle.com>
2000-12-10 20:59:30 +00:00
Thomas-Henning von Kamptz
3d5000784d added growfs(8) including ffsinfo(8) to the freebsd base system
Reviewed by:	 grog
2000-12-09 15:27:35 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Ben Smithurst
8afbbd41f4 Explicitly document the fact that securelevel > 0 means that kernel modules
may not be (un)loaded.

PR:		23350
Submitted by:	Gordon Tetlow <gordont@bluemtn.net>
2000-12-07 21:09:22 +00:00
David E. O'Brien
a8e642f574 Change the spelling of .' to .' from .OBJDIR since `.' really is where
generated files land.  Also give precedence to generated files.
2000-12-05 22:10:43 +00:00
Hajimu UMEMOTO
effd2d8296 test strdup() failures.
from: Chris Faulhaber <jedgar@fxp.org>

Obtained from:	KAME
2000-12-04 13:38:59 +00:00
Andrzej Bialecki
846bd927fa Properly check the return values from malloc(3).
Remove some PNP-related dead code that is unlikely to survive the
changes in -current PNP anyway.

Submitted by:	fixes from Chris Faulhaber <jedgar@freebsd.org>
2000-12-03 00:09:08 +00:00
Chris D. Faulhaber
b673f44d6d Properly check malloc(3) return values
Approved by:	ken
2000-12-01 12:02:16 +00:00
David E. O'Brien
2c5569d6ff The GCC 2.96 snapshots have slightly different rules for finding include
files.  Mostly -I${.CURDIR} was needed -- especially for YACC generated
files as the new cpp does not look in the ultimate source file
(ie, the .y file)'s directory as told by the "#line" directive.  Some were
misspellings of "-I${.CURDIR}" as "-I.".
2000-12-01 09:39:28 +00:00
Andrey A. Chernov
17927a641c Add missing && which absense stops 'make world' 2000-11-30 23:01:43 +00:00
Luigi Rizzo
ee7b8babab remove an undefined reference when no VLAN support is compiled in. 2000-11-30 21:35:09 +00:00
David E. O'Brien
6580291ba4 I didn't maintain the "chs" ordering. Rather the bug was in print_part().
Requested by:	bde.
2000-11-29 20:22:47 +00:00
Ben Smithurst
b60884cd68 Fix typos and layout problem.
PR:		23109
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-28 20:38:20 +00:00
Philippe Charnier
2af14b60ed Remove .Op when arg is required (special | filesystem). Document that at
least one flag is required and check this in the code. Make use of getopt(3).
Generalyze printing `... remains unchanged ...'.
2000-11-28 18:17:15 +00:00
Hajimu UMEMOTO
1ada402aa4 Add missing initialization for IPv6 address lifetime.
PR:		misc/22884
Obtained from:	KAME
2000-11-27 08:44:57 +00:00
Kris Kennaway
797376317f Fix format string warnings 2000-11-27 07:28:15 +00:00
Daniel Harris
32704e5747 Typo fix: forgot -> forget.
PR:		23113
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-26 23:26:51 +00:00