Include errors common to chroot and fchroot in a single list, followed
by errors unique to each.
Unprivileged chroot is permitted if the security.bsd.unprivileged_chroot
sysctl is set to 1. Make note of this and update the EPERM description.
Reported by: kevans
Reviewed by: kevans, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51703
This is similar to chroot(2), but takes a file descriptor instead
of path. Same syscall exists in NetBSD and Solaris. It is part of a larger
patch to make absolute pathnames usable in Capsicum mode, but should
be useful in other contexts too.
Reviewed By: brooks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D41564
Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths to allow libc to find them in their new home.
Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908