freebsd-dev/sys/fs
Rick Macklem 1f7104d720 Fix export_args ex_flags field so that is 64bits, the same as mnt_flags.
Since mnt_flags was upgraded to 64bits there has been a quirk in
"struct export_args", since it hold a copy of mnt_flags
in ex_flags, which is an "int" (32bits).
This happens to currently work, since all the flag bits used in ex_flags are
defined in the low order 32bits. However, new export flags cannot be defined.
Also, ex_anon is a "struct xucred", which limits it to 16 additional groups.
This patch revises "struct export_args" to make ex_flags 64bits and replaces
ex_anon with ex_uid, ex_ngroups and ex_groups (which points to a
groups list, so it can be malloc'd up to NGROUPS in size.
This requires that the VFS_CHECKEXP() arguments change, so I also modified the
last "secflavors" argument to be an array pointer, so that the
secflavors could be copied in VFS_CHECKEXP() while the export entry is locked.
(Without this patch VFS_CHECKEXP() returns a pointer to the secflavors
array and then it is used after being unlocked, which is potentially
a problem if the exports entry is changed.
In practice this does not occur when mountd is run with "-S",
but I think it is worth fixing.)

This patch also deleted the vfs_oexport_conv() function, since
do_mount_update() does the conversion, as required by the old vfs_cmount()
calls.

Reviewed by:	kib, freqlabs
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D25088
2020-06-14 00:10:18 +00:00
..
autofs Silence down a warning which should really be a debug message. 2020-04-21 13:57:51 +00:00
cd9660 Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
cuse Fine grain locking inside the cuse(3) kernel module. 2020-03-30 18:25:43 +00:00
deadfs vfs: flatten vop vectors 2019-12-16 00:06:22 +00:00
devfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ext2fs Add BE architectures support. 2020-05-17 14:52:54 +00:00
fdescfs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
fifofs Call pipeselwakeup() after toggling PIPE_EOF. 2020-04-27 15:59:07 +00:00
fuse copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
mntfs Add a new "mntfs" pseudo file system which provides private device vnodes for 2020-03-06 18:41:37 +00:00
msdosfs Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
nfs Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
nfsclient Fix NOINET6 build broken by r361575. 2020-05-28 09:52:28 +00:00
nfsserver Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
nullfs nullfs: don't pre lock exclusive in nullfs_root 2020-03-04 19:52:00 +00:00
procfs Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
pseudofs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (10 of many) 2020-02-24 10:37:56 +00:00
smbfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tmpfs tmpfs: Preserve alignment of struct fid fields 2020-06-03 09:38:51 +00:00
udf vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
unionfs Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00