freebsd-dev/sbin
Ian Dowse 60caaee242 The introduction of IPv6 support from NetBSD's mountd invalidated
a number of assumptions related to the parsing of options in
/etc/exports, and missed a few necessary new error checks.

The main problems related to netmasks: an IPv6 network address
missing a netmask would result in the filesystem being exported to
the whole IPv6 world, non-continuous netmasks would be made continuous
without any warnings, and nothing prevented you specifying an IPv4
mask with an IPv6 address.

This change addresses these issues. As a side-effect we now store
netmasks in sockaddr structs (this matches the kernel interface,
and is closer to the way it used to be). Add a flag OP_HAVEMASK to
keep track of whether or not we have successfully got a mask from
any source. Replace some mask-related helper functions with versions
that use the sockaddr-based masks.

Also tidy up get_net() and fix the code that interprets IPv4 partial
networks such as "127.1" as network rather than host addresses.
Properly zero out some structures that were ending up partially
containing junk from the stack, fix a few formatting issues, and
add a comment noting some assumptions about export arguments.
2001-04-21 20:06:18 +00:00
..
adjkerntz - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
atacontrol mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
atm - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
badsect - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
bsdlabel - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
camcontrol Rewrite of the CAM error recovery code. 2001-03-27 05:45:52 +00:00
ccdconfig - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
clri - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
comcontrol - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
cxconfig - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
dhclient beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
disklabel - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
dmesg - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
dump Fix bogon with the nodump flag. 2001-04-19 01:39:27 +00:00
dumpfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
dumpon - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
fdisk wd0 -> ad0 2001-04-08 18:41:22 +00:00
fdisk_pc98 - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ffsinfo - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
fsck Don't make fsck go quite _that_ fast: 2001-04-07 13:24:59 +00:00
fsck_ffs Minor background cleanups: 2001-04-16 22:22:21 +00:00
fsck_ifs mdoc(7) police: prepare for mdocNG. 2001-04-16 15:12:58 +00:00
fsdb - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
fsirand - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
growfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
i386 wd0 -> ad0 2001-04-08 18:41:22 +00:00
ifconfig - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
init Back out most of revision 1.28: lists of diagnostics must use -diag, 2001-04-13 06:54:05 +00:00
ip6fw Update comment to match ipfw/ipfw.c,v 1.95. 2001-04-13 06:49:47 +00:00
ipf - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ipfstat - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ipfw Update comment to match ipfw/ipfw.c,v 1.95. 2001-04-13 06:49:47 +00:00
ipmon - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ipnat - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
kget mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
kldload - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
kldstat - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
kldunload - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ldconfig - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
md5 - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mdconfig - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mknod - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_cd9660 - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_ext2fs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_hpfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_ifs Removed unused copy of ../mount/getmtopts.3. 2001-01-17 04:10:06 +00:00
mount_msdos - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_msdosfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_nfs Fix a typo relating to the "-U" (force UDP for mount protocol) 2001-04-11 00:21:16 +00:00
mount_ntfs wd1s1a -> ad1s1a 2001-04-04 08:42:40 +00:00
mount_null mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
mount_nullfs mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
mount_nwfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_portal - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_portalfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_std - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_umap - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_umapfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_union - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mount_unionfs - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
mountd The introduction of IPv6 support from NetBSD's mountd invalidated 2001-04-21 20:06:18 +00:00
natd mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
newfs Add a missing argument to an error message format string. 2001-04-17 07:21:48 +00:00
newfs_msdos - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
nextboot - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
nfsd - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
nfsiod - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
nologin beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
nos-tun Allow specification of which source address to use for encapsulation. 2001-03-28 17:30:26 +00:00
pc98 - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ping - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ping6 - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
quotacheck - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
reboot mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
restore - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
route mdoc(7) police: properly use a -diag list in the DIAGNOSTICS section. 2001-04-13 19:59:47 +00:00
routed - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
rtsol Correct style bugs in previous commit 2000-07-06 01:55:21 +00:00
savecore - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
setkey mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
shutdown - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
slattach - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
spppcontrol - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
startslip - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
swapon vnconfig(8) -> mdconfig(8). 2001-04-10 16:29:41 +00:00
sysctl - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
tunefs Do not allow the soft updates flag to be set if the filesystem is dirty. 2001-04-13 23:54:49 +00:00
umount - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
vinum - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
Makefile Activate atacontrol 2001-03-19 07:59:38 +00:00
Makefile.inc - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00