freebsd-dev/sys/fs/msdosfs
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
..
bootsect.h
bpb.h
denode.h makefs: share denode.h between kernel msdosfs and makefs 2019-08-21 19:07:13 +00:00
direntry.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
fat.h buf: Add B_INVALONERR flag to discard data 2019-09-11 21:24:14 +00:00
msdosfs_conv.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_denode.c msdos: vgone unconstructed vnode before vputing it 2020-01-01 22:50:23 +00:00
msdosfs_fat.c Plug the rest of undef behavior places that were missed in r337456. 2019-10-11 18:37:02 +00:00
msdosfs_iconv.c
msdosfs_lookup.c msdosfs: Remove redundant brelse() after r294954 2019-09-06 08:08:10 +00:00
msdosfs_vfsops.c Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
msdosfs_vnops.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
msdosfsmount.h Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS 2020-01-27 12:02:41 +00:00