freebsd-dev/sys/ufs/ffs
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
..
ffs_alloc.c Further evaluation of the POSIX spec for fdatasync() shows that it 2020-06-05 01:00:55 +00:00
ffs_balloc.c Further evaluation of the POSIX spec for fdatasync() shows that it 2020-06-05 01:00:55 +00:00
ffs_extern.h This commit enables a UFS filesystem to do a forcible unmount when 2020-05-25 23:47:31 +00:00
ffs_inode.c Clear the IN_SIZEMOD and IN_IBLKDATA flags only when doing a 2020-06-06 20:17:56 +00:00
ffs_rawread.c
ffs_snapshot.c Further evaluation of the POSIX spec for fdatasync() shows that it 2020-06-05 01:00:55 +00:00
ffs_softdep.c Further evaluation of the POSIX spec for fdatasync() shows that it 2020-06-05 01:00:55 +00:00
ffs_subr.c This commit enables a UFS filesystem to do a forcible unmount when 2020-05-25 23:47:31 +00:00
ffs_suspend.c Use the devfs vnode rather than the mntfs vnode for permissions checks. 2020-03-09 15:55:13 +00:00
ffs_tables.c
ffs_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
ffs_vnops.c Further evaluation of the POSIX spec for fdatasync() shows that it 2020-06-05 01:00:55 +00:00
fs.h Retire two unused background fsck sysctls. 2020-04-21 17:42:32 +00:00
softdep.h This commit enables a UFS filesystem to do a forcible unmount when 2020-05-25 23:47:31 +00:00