freebsd-dev/sbin
Maxim Sobolev 591e89c89b Work around an issue with mksnap_ffs not working in chroot'ed environment.
The problem is that the statfs(2) system call used to determine the relevant
mount point returns path within real root in the f_mntonname, causing
nmount(2) system call to fail with ENOENT.

Use a bit of heuristics to skip over few starting path elements when it
happens until we hit an actual mount point.

For this to work properly the whole mount should be accessible within the
chroot, it's going to still fail if chroot only has access to a part of the
mounted fs.

Reviewed by:	mckusick
Approved by:	mckusick
MFC after:	2 weeks
2017-04-11 21:55:39 +00:00
..
adjkerntz Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
atm sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
badsect Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
bsdlabel sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
camcontrol Fix printing bits above first eight. 2017-03-22 13:53:21 +00:00
ccdconfig ccdconfig first appeared in NetBSD 1.1 2016-10-02 23:19:05 +00:00
clri Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
comcontrol Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
conscontrol Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
ddb Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
decryptcore sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
devd Use a more stream-lined version of fix_value. 2017-03-24 13:46:26 +00:00
devfs sbin/devfs: clarify usage 2017-03-08 23:58:10 +00:00
dhclient Make dhcp-lease-time option supersedable as well. 2017-03-30 18:20:04 +00:00
dmesg Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dump Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dumpfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dumpon Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
etherswitchcfg sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
fdisk sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
ffsinfo sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
fsck Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fsck_ffs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
fsck_msdosfs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
fsdb sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
fsirand prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
gbde sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
geom Fix memory leak in "gpart bootcode" 2017-04-05 18:31:26 +00:00
ggate sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
growfs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
gvinum sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
hastctl sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
hastd Switch hastctl and hastd to libmd instead of openssl for sha256 2017-02-04 06:12:48 +00:00
ifconfig [ifconfig] add some comments around missing net80211 VHT configuration. 2017-03-31 22:05:10 +00:00
init sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
ipf Disconnect ipftest and ipresend from the build until it can be verified 2017-03-14 02:10:37 +00:00
ipfw Add ipfw_pmod kernel module. 2017-04-03 03:07:48 +00:00
iscontrol sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
kldconfig Use nitems() from sys/param.h. 2016-04-19 04:52:13 +00:00
kldload Fix the last case when kldload(8) wasn't printing the name of the module 2017-02-18 18:57:29 +00:00
kldstat Typo. 2017-03-10 19:13:38 +00:00
kldunload Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
ldconfig sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
md5 Fix date. 2017-03-02 14:50:01 +00:00
mdconfig Make mdconfig(8) not segfault when the kernel returns garbage data. 2017-02-19 16:08:58 +00:00
mdmfs Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
mknod Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mksnap_ffs Work around an issue with mksnap_ffs not working in chroot'ed environment. 2017-04-11 21:55:39 +00:00
mount sbin/mount: strcpy -> strlcpy 2017-04-07 15:39:41 +00:00
mount_cd9660 Add a post-humous manpage for cd9660(5), the ISO-9660 file system 2017-03-23 02:57:08 +00:00
mount_fusefs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
mount_msdosfs Whilst mount_pcfs originated as a patch in 386BSD, NetBSD 0.8 actually 2017-04-03 18:50:04 +00:00
mount_nfs Remove support for long gone oldnfs. 2017-04-07 18:31:31 +00:00
mount_nullfs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
mount_udf sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
mount_unionfs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
nandfs Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
natd Add history section to natd(8) 2016-10-05 20:42:35 +00:00
newfs sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
newfs_msdos The code only converts from bpbHugeSectors to bpbSectors if the sum of 2016-08-30 18:01:26 +00:00
newfs_nandfs newfs_nandfs: Fix unaligned pointer warning 2017-03-04 16:59:55 +00:00
nfsiod Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nos-tun Add history section to nos-tun(8) 2016-10-05 20:45:21 +00:00
nvmecontrol Don't use K&R style prototypes; ANSIfy them 2017-03-28 20:34:02 +00:00
pfctl sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
pflogd sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
ping Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ping6 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
quotacheck sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
rcorder Add rcorder-visualize.sh, which generates graphviz from rc.d scripts 2016-12-06 15:49:39 +00:00
reboot Document how to use reroot with NFS. 2017-03-19 15:49:51 +00:00
recoverdisk sbin: ake use of our rounddown() macro when sys/param.h is available. 2016-05-01 02:24:05 +00:00
resolvconf sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
restore sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
route Delete trailing whitespace (no functional change) 2017-03-21 22:00:52 +00:00
routed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rtsol sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
savecore Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sconfig sconfig appeared in FreeBSD 5.2. 2016-10-03 00:40:20 +00:00
setkey Make setkey(8) more clear about anti-replay window size option semantics. 2017-04-09 15:17:55 +00:00
shutdown Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
spppcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
sunlabel sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
swapon Fix late and noauto with geli swap 2017-03-14 12:39:19 +00:00
sysctl Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tunefs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
umount sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
zfsbootcfg DIRDEPS_BUILD: Connect new dependencies. 2016-11-13 00:11:23 +00:00
Makefile Add support for encrypted kernel crash dumps. 2016-12-10 16:20:39 +00:00
Makefile.amd64 Integrate nvmecontrol(8) into the amd64 and i386 builds. 2012-09-17 21:41:38 +00:00
Makefile.arm
Makefile.i386 Integrate nvmecontrol(8) into the amd64 and i386 builds. 2012-09-17 21:41:38 +00:00
Makefile.inc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.mips
Makefile.sparc64