blob: 88ebc50924d0f7e6eb52ef8b6a4d327293f09b47 [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001# Life begins with the kernel.
2type kernel, domain;
Nick Kralevichfed8a2a2014-01-24 20:43:07 -08003
4allow kernel init:process dyntransition;
5
Stephen Smalley2dd4e512012-01-04 12:33:27 -05006# The kernel is unconfined.
7unconfined_domain(kernel)
Nick Kralevich0c9708b2013-07-10 14:46:05 -07008relabelto_domain(kernel)
9
10allow kernel {fs_type dev_type file_type}:dir_file_class_set relabelto;
Geremy Condra217f8af2013-09-05 15:36:30 -070011allow kernel unlabeled:filesystem mount;
Stephen Smalleyb081cc12014-02-10 13:29:38 -050012allow kernel fs_type:filesystem *;
Stephen Smalleyfea6e662013-12-06 08:05:53 -050013
14# Initial setenforce by init prior to switching to init domain.
15allow kernel self:security setenforce;
Stephen Smalley8b516742014-01-08 09:29:30 -050016
17# Set checkreqprot by init.rc prior to switching to init domain.
18allow kernel self:security setcheckreqprot;
Stephen Smalley5487ca02014-02-10 16:31:04 -050019
20# For operations performed by kernel or init prior to switching to init domain.
21## TODO: Investigate whether it is safe to remove these
22allow kernel self:capability { sys_rawio mknod };
23auditallow kernel self:capability { sys_rawio mknod };
Stephen Smalley3f40d4f2014-02-11 14:40:14 -050024allow kernel dev_type:blk_file rw_file_perms;
25auditallow kernel dev_type:blk_file rw_file_perms;