Whamcloud - gitweb
create_inode: set xattrs to the root directory as well
authorAntoine Tenart <antoine.tenart@bootlin.com>
Fri, 17 Jul 2020 10:08:46 +0000 (12:08 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 15 Dec 2020 18:38:28 +0000 (13:38 -0500)
commit7616fd6a599e44c5700c2c3a2e08979c6c5c747e
treec236c137036ba0929f7a05194abcb0e76f6a0ded
parentaf1a882fd27ecd93a00e26667f0737088ccbe586
create_inode: set xattrs to the root directory as well

populate_fs do copy the xattrs for all files and directories, but the
root directory is skipped and as a result its extended attributes aren't
set. This is an issue when using mkfs to build a full system image that
can be used with SElinux in enforcing mode without making any runtime
fix at first boot.

This patch adds logic to set the root directory's extended attributes.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c