2012-01-04 09:33:27 -08:00
|
|
|
# Life begins with the kernel.
|
|
|
|
type kernel, domain;
|
2014-01-24 20:43:07 -08:00
|
|
|
|
2014-05-23 08:26:19 -07:00
|
|
|
# setcon to init domain.
|
|
|
|
allow kernel self:process setcurrent;
|
2014-01-24 20:43:07 -08:00
|
|
|
allow kernel init:process dyntransition;
|
|
|
|
|
2012-01-04 09:33:27 -08:00
|
|
|
# The kernel is unconfined.
|
|
|
|
unconfined_domain(kernel)
|
2013-07-10 14:46:05 -07:00
|
|
|
|
2014-05-29 11:35:55 -07:00
|
|
|
# init direct restorecon calls prior to switching to init domain
|
|
|
|
# /dev and /dev/socket
|
|
|
|
allow kernel { device socket_device }:dir relabelto;
|
|
|
|
# /dev/__properties__
|
|
|
|
allow kernel properties_device:file relabelto;
|
|
|
|
# /sys
|
|
|
|
allow kernel sysfs:{ dir file lnk_file } relabelfrom;
|
|
|
|
allow kernel sysfs_type:{ dir file lnk_file } relabelto;
|
2013-12-06 05:05:53 -08:00
|
|
|
|
|
|
|
# Initial setenforce by init prior to switching to init domain.
|
2014-05-12 14:32:59 -07:00
|
|
|
# We use dontaudit instead of allow to prevent a kernel spawned userspace
|
|
|
|
# process from turning off SELinux once enabled.
|
|
|
|
dontaudit kernel self:security setenforce;
|
2014-01-08 06:29:30 -08:00
|
|
|
|
|
|
|
# Set checkreqprot by init.rc prior to switching to init domain.
|
|
|
|
allow kernel self:security setcheckreqprot;
|