Use genfscon to label /sys/devices/system/cpu/online as cpu_online_t

Since 8e01472078763ebc1eaea089a1adab75dd982ccd, it's possible to use
genfscon for sysfs.

This patch should help to deprecate distribution specific call to
restorecon or tmpfiles to restore /sys/devices/system/cpu/online during
boot.

Thanks to Dominick for the tip.
This commit is contained in:
Laurent Bigonville 2017-01-06 14:18:24 +01:00 committed by Chris PeBenito
parent 0fe21742cd
commit 3d8669d8ce
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ dev_node(cpu_device_t)
type cpu_online_t, sysfs_types;
files_type(cpu_online_t)
dev_associate_sysfs(cpu_online_t)
genfscon sysfs /devices/system/cpu/online gen_context(system_u:object_r:cpu_online_t,s0)
#
# Type for /dev/crash