]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Linux: Initialize zp in zfs_setattr_dir
authorRyan Moeller <ryan@iXsystems.com>
Fri, 9 Oct 2020 16:27:14 +0000 (12:27 -0400)
committerGitHub <noreply@github.com>
Fri, 9 Oct 2020 16:27:14 +0000 (09:27 -0700)
commitb7ab7ae2410f5152318cbb71675e9ba94d7562cb
tree14ea84c66d576ff8b538509c41380cdac3fd3c4f
parentd0249a4bd0da59f20edadba409d0620d387e4e26
Linux: Initialize zp in zfs_setattr_dir

The value of zp is used without having been initialized under some
conditions.  Initialize the pointer to NULL.

Add a regression test case using chown in acl/posix.  However, this is
not enough because the setup sets xattr=sa, which means zfs_setattr_dir
will not be called.  Create a second group of acl tests in acl/posix-sa
duplicating the acl/posix tests with symlinks, and remove xattr=sa from
the original acl/posix tests.  This provides more coverage for the
default xattr=on code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10043
Closes #11025
15 files changed:
configure.ac
man/man8/zfsprops.8
module/os/linux/zfs/zfs_vnops.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/acl/Makefile.am
tests/zfs-tests/tests/functional/acl/posix-sa/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/acl/posix-sa/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/acl/posix-sa/posix_001_pos.ksh [new symlink]
tests/zfs-tests/tests/functional/acl/posix-sa/posix_002_pos.ksh [new symlink]
tests/zfs-tests/tests/functional/acl/posix-sa/posix_003_pos.ksh [new symlink]
tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh [new symlink]
tests/zfs-tests/tests/functional/acl/posix-sa/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/acl/posix/Makefile.am
tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/acl/posix/setup.ksh