init-storage: Set SELinux context for /var
This label needs to be applied before the subvolume is mounted initially to prevent AVC denials.
This commit is contained in:
@@ -27,6 +27,7 @@ format_dev() {
|
|||||||
|
|
||||||
mount "${dev}" "${tmpdir}" || exit
|
mount "${dev}" "${tmpdir}" || exit
|
||||||
btrfs subvolume create "${tmpdir}"/var || exit
|
btrfs subvolume create "${tmpdir}"/var || exit
|
||||||
|
chcon -t var_t "${tmpdir}"/var || exit
|
||||||
umount "${dev}" || exit
|
umount "${dev}" || exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user