diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2023-12-15 12:42:41 +0100 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2023-12-19 10:23:59 +0100 |
commit | 9471c13faf76ff05f58d636b988bb066ad6d05fa (patch) | |
tree | 29e04b6874c2389ba4abcf67d770841c9bc998e0 /tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize | |
parent | 2425614638a798e55e79e1b1f9b8d84567769311 (diff) |
mkfs.ubifs: fix xattr scanning for builds with selinux support
mkfs.uibfs can add Selinux xattrs from a labeling file using
libselinux to parse it. The commit that added this feature simply
introduced a separate function, inode_add_selinux_xattr, which is
called instead of inode_add_xattr. If no --selinux argument is
specified for mkfs.ubifs, this is a no-op.
The problem is, that this breaks xattr scanning for any build with
Selinux enabled. The Selinux version is always called and it does
not scan for xattrs on the filesystem, or dispatch to the original.
This commit fixes the xattr scanning behavior. We unconditionally call
both functions (they each have no-op implementations if the feature
is missing) and in the regular xattr scanning code, we skip selinux
attributes, if the --selinux option was given.
Fixes: f1feccec5ad8 ("mkfs.ubifs: Implement selinux labelling support")
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize')
0 files changed, 0 insertions, 0 deletions