1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Rick Macklem 88175af8b7 vfs_export: Add mnt_exjail to control exports done in prisons
If there are multiple instances of mountd(8) (in different
prisons), there will be confusion if they manipulate the
exports of the same file system.  This patch adds mnt_exjail
to "struct mount" so that the credentials (and, therefore,
the prison) that did the exports for that file system can
be recorded.  If another prison has already exported the
file system, vfs_export() will fail with an error.
If mnt_exjail == NULL, the file system has not been exported.
mnt_exjail is checked by the NFS server, so that exports done
from within a different prison will not be used.

The patch also implements vfs_exjail_destroy(), which is
called from prison_cleanup() to release all the mnt_exjail
credential references, so that the prison can be removed.
Mainly to avoid doing a scan of the mountlist for the case
where there were no exports done from within the prison,
a count of how many file systems have been exported from
within the prison is kept in pr_exportcnt.

Reviewed by:	markj
Discussed with:	jamie
Differential Revision:	https://reviews.freebsd.org/D38371
MFC after:	3 months
2023-02-21 13:00:42 -08:00
.cirrus-ci
.github Add myself to the github code owners file 2023-02-20 12:29:55 +00:00
bin nproc: denote an incompatiblity with Linux 2023-02-15 20:43:46 +00:00
cddl pkgbase: Create a FreeBSD-ctf-tools package 2023-02-08 08:48:58 +01:00
contrib Merge commit 'd84e570b54961e8874bbd8de25635eb96be0977e' 2023-02-20 22:13:27 -08:00
crypto ssh: fix SIZEOF_TIME_T #define on i386 2023-02-08 18:34:09 -05:00
etc wc: Clean up and modernize. 2023-02-14 22:26:47 +00:00
gnu gnu diff3: apply patch to committed src, rather than at build time 2022-11-13 21:33:40 -05:00
include zdb: zero-pad checksum output follow up 2023-02-15 09:06:29 -08:00
kerberos5 kerberos5: retire now-unused MIPS support 2022-11-02 13:16:18 -04:00
lib efivar: Really look for labels for the provider with right efimedia 2023-02-16 08:54:39 -07:00
libexec sys/param.h: Add _WANT_P_OSREL 2023-02-15 02:43:18 +02:00
release ARM release build: enable IPv6 SLAAC by default 2023-02-12 22:32:16 +01:00
rescue rescue: Fix link order of SSL libraries and fetch. 2023-02-02 09:23:02 -08:00
sbin ping: Add ATF-Python tests 2023-02-20 10:34:33 +00:00
secure OpenSSL: Regen manual pages for OpenSSL 1.1.1t 2023-02-07 14:01:15 -05:00
share man9: Add an smr(9) manual page 2023-02-20 08:58:19 -05:00
stand lua: Export loaded modules env vars via environment 2023-02-09 11:56:20 -07:00
sys vfs_export: Add mnt_exjail to control exports done in prisons 2023-02-21 13:00:42 -08:00
targets retire sconfig(8) ce(4)/cp(4) configuration tool 2022-12-13 15:25:13 -05:00
tests tarfs: Really prevent descending into a non-directory. 2023-02-20 21:29:19 +00:00
tools stress2: Added a fsck check to the scenario 2023-02-20 12:04:24 +01:00
usr.bin truss: Add preadv(2) and pwritev(2). 2023-02-21 22:40:14 +13:00
usr.sbin config: address a number of Coverity issues 2023-02-16 14:37:06 -06:00
.arcconfig
.arclint
.cirrus.yml Cirrus-CI: use llvm15 toolchain packages 2023-02-13 09:29:36 -05:00
.clang-format
.git-blame-ignore-revs Add git-blame ignore file 2023-01-23 15:27:25 -05:00
.gitattributes
.gitignore gitignore: whack dead architectures 2022-11-23 01:18:03 +00:00
COPYRIGHT Happy New Year 2023! 2023-01-01 13:44:43 +08:00
LOCKS
MAINTAINERS
Makefile universe: Switch GCC toolchains to GCC 12. 2023-01-27 13:35:13 -08:00
Makefile.inc1 Remove support for the base/* toolchain ports. 2023-02-13 13:16:24 -08:00
Makefile.libcompat libcompat: avoid installing include files twice 2022-11-16 19:15:20 -05:00
Makefile.sys.inc
ObsoleteFiles.inc Clean up additional obsolete MLINKS 2023-02-16 17:22:35 -04:00
README.md Vendor import of OpenSSH 9.2p1 2023-02-05 13:04:12 -05:00
RELNOTES Note upgrade to sendmail 8.17.1 2023-02-01 02:23:02 +00:00
UPDATING UPDATING: add UPDATING section for HUAWEI 3G/4G Devices change 2023-02-10 16:35:39 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.