Skip to content

xfs: add selinux labels to whiteout inodes

Bugzilla: http://bugzilla.redhat.com/2103234 Tested: xfstests generic/700

commit 70b589a37e1aba892c1e5d41957b0042f9eb031b Author: Eric Sandeen sandeen@redhat.com Date: Sat Jul 9 10:56:02 2022 -0700

xfs: add selinux labels to whiteout inodes

We got a report that "renameat2() with flags=RENAME_WHITEOUT doesn't
apply an SELinux label on xfs" as it does on other filesystems
(for example, ext4 and tmpfs.)  While I'm not quite sure how labels
may interact w/ whiteout files, leaving them as unlabeled seems
inconsistent at best. Now that xfs_init_security is not static,
rename it to xfs_inode_init_security per dchinner's suggestion.

Signed-off-by: Eric Sandeen sandeen@redhat.com Reviewed-by: Dave Chinner dchinner@redhat.com Reviewed-by: Darrick J. Wong djwong@kernel.org Signed-off-by: Darrick J. Wong djwong@kernel.org Signed-off-by: Andrey Albershteyn aalbersh@redhat.com

Edited by Andrey Albershteyn

Merge request reports