freebsd-dev/sbin
Doug Barton a32bb1b53a When newfs'ing a partition with UFS2 that had previously been newfs'ed
with UFS1, the UFS1 superblocks were not deleted. This allowed any
RELENG_4 (or other non-UFS2-aware) fsck to think it knew how to "fix"
the file system, resulting in severe data scrambling.

This patch is a more advanced version than the one originally submitted.
Lukas improved it based on feedback from Kirk, and testing by me. It
blanks all UFS1 superblocks (if any) during a UFS2 newfs, thereby causing
fsck's that are not UFS2 aware to generate the "SEARCH FOR ALTERNATE
SUPER-BLOCK FAILED" message, and exit without damaging the fs.

PR:		bin/51619
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	kirk
Approved by:	re (scottl)
2003-05-22 18:38:54 +00:00
..
adjkerntz Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
atacontrol DOnt allow getting caps from other than master and slave device :) 2003-05-05 10:28:37 +00:00
atm Use size_t type vars in sizeof contexts. 2003-05-02 06:46:24 +00:00
badsect Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
bsdlabel Style fixes. 2003-05-17 19:06:45 +00:00
camcontrol Set WARNS=1. RESOLUTION_MAX macro has major signed/unsigned issues. 2003-05-02 06:56:32 +00:00
ccdconfig Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
clri Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
comcontrol Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
conscontrol
cxconfig Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
devd mdoc(7) fixes: Expand contraction. 2003-05-17 22:21:27 +00:00
devfs
dhclient Hook omshell(1) up to the build. 2003-03-25 03:16:53 +00:00
disklabel Add a newline at end of file. 2003-05-19 19:52:29 +00:00
dmesg bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
dump Dump is hard-wired to believe that it can read disks on 2003-05-07 18:27:09 +00:00
dumpfs mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
dumpon Bring the dumpon(8) man page closer to reality: 2003-05-07 19:37:51 +00:00
fdisk Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
fdisk_pc98 Oops, DIOCGPC98 should be DIOCSPC98. 2003-05-01 14:30:59 +00:00
ffsinfo
fsck Back out previous delta to fix fsck on filesystems without an fstab entry, 2003-04-25 01:12:35 +00:00
fsck_ffs Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
fsck_msdosfs
fsdb
fsirand
gbde Moved libgeom.so dependencies to where they belong. 2003-05-17 19:05:17 +00:00
gpt Show the paritition types that we recognize in human readable format. eg: 2003-02-13 01:00:26 +00:00
growfs Understand GEOM. This makes growfs work again, but it really needs rewriting. 2003-05-12 05:37:16 +00:00
ifconfig mdoc(7) police: fix more breakages from rev. 1.69. 2003-05-14 16:22:16 +00:00
init There are 5 securelevels, not 4. 2003-03-26 01:30:34 +00:00
ip6fw Make -N option work. 2003-03-25 11:27:46 +00:00
ipf
ipfs
ipfstat
ipfw Add a 'verrevpath' option that verifies the interface that a packet 2003-03-15 01:13:00 +00:00
ipmon Change the default syslog facility from LOG_LOCAL0 to LOG_SECURITY after 2003-04-05 10:42:38 +00:00
ipnat
kldconfig Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
kldload Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
kldstat Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
kldunload Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
ldconfig Describe the pattern filenames must be in before they are added to the hints 2003-05-08 17:25:41 +00:00
mca
md5 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
mdconfig Add .Xr's to mdmfs(8). 2003-04-27 01:46:56 +00:00
mdmfs mdoc(7) fix: Add the forgotten paragraph command. 2003-05-17 22:31:48 +00:00
mknod Remove some more MAKEDEV information. 2003-03-25 18:43:10 +00:00
mksnap_ffs Close out a possible race where anybody in group operator could 2003-03-02 08:07:57 +00:00
mount Fixed the markup in the recently added ENVIRONMENT section. 2003-05-17 22:35:35 +00:00
mount_cd9660
mount_ext2fs Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
mount_hpfs
mount_msdosfs
mount_nfs mdoc(7) markup overhaul. 2003-05-17 22:53:44 +00:00
mount_ntfs
mount_nullfs The .Xr utility 2003-02-05 13:50:41 +00:00
mount_nwfs
mount_portalfs
mount_smbfs This really isn't WARNS clean. 2002-12-30 09:38:46 +00:00
mount_std
mount_udf
mount_umapfs
mount_unionfs
natd Don't pretend natd(8) doesn't work with ppp(8) interfaces. 2003-02-28 15:41:45 +00:00
newfs When newfs'ing a partition with UFS2 that had previously been newfs'ed 2003-05-22 18:38:54 +00:00
newfs_msdos Additional PC98 option is not needed. 2003-01-30 15:09:21 +00:00
nfsiod Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
nologin
nos-tun
ping Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
ping6
quotacheck Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
raidctl Fixed troff(1) and mdoc(7) warnings. 2003-05-18 21:05:22 +00:00
rcorder
reboot Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
restore Removed all vestiges of KerberosIV. 2003-05-01 21:18:36 +00:00
route There is an undocument feature that ``route -vnd flush'' prints 2003-04-16 12:06:53 +00:00
routed mdoc(7) fixes: Mark "gated" with the .Nm macro. 2003-05-19 19:54:00 +00:00
rtsol
savecore Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
setkey Use NI_xxx macros. 2003-04-16 09:53:29 +00:00
shutdown Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
slattach Change this: 2003-01-08 06:43:27 +00:00
spppcontrol Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
startslip Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
sunlabel Moved libgeom.so dependencies to where they belong. 2003-05-17 19:05:17 +00:00
swapon Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
sysctl Clarify setting sysctl variables via loader(8) tunables 2003-05-18 00:27:02 +00:00
tunefs Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
umount mdoc(7) fixes: Fix the markup in the recently added ENVIRONMENT section. 2003-05-19 19:58:29 +00:00
vinum mdoc(7) fixes: Fixed the markup in the BUGS section, bumped document date. 2003-05-19 20:03:28 +00:00
Makefile Add fdisk for $MACHINE_ARCH == amd64 2003-05-17 20:40:42 +00:00
Makefile.inc