2012-01-04 18:33:27 +01:00
|
|
|
# init switches to init domain (via init.rc).
|
|
|
|
type init, domain;
|
|
|
|
# init is unconfined.
|
|
|
|
unconfined_domain(init)
|
|
|
|
tmpfs_domain(init)
|
2013-05-18 02:11:29 +02:00
|
|
|
# add a rule to handle unlabelled mounts
|
|
|
|
allow init unlabeled:filesystem mount;
|
2013-07-10 23:46:05 +02:00
|
|
|
|
2014-02-10 22:31:04 +01:00
|
|
|
allow init self:capability { sys_rawio mknod };
|
|
|
|
|
2014-02-11 20:40:14 +01:00
|
|
|
allow init dev_type:blk_file rw_file_perms;
|
2014-02-10 19:29:38 +01:00
|
|
|
allow init fs_type:filesystem *;
|
2014-05-20 20:09:16 +02:00
|
|
|
allow init {fs_type dev_type}:dir_file_class_set relabelto;
|
|
|
|
allow init {file_type -system_file -exec_type}:dir_file_class_set relabelto;
|
2013-12-06 14:05:53 +01:00
|
|
|
allow init kernel:security load_policy;
|
2014-05-28 22:48:52 +02:00
|
|
|
allow init kernel:system syslog_mod;
|
2013-12-06 15:31:40 +01:00
|
|
|
allow init usermodehelper:file rw_file_perms;
|
|
|
|
allow init proc_security:file rw_file_perms;
|
2014-01-25 05:43:07 +01:00
|
|
|
|
|
|
|
# Transitions to seclabel processes in init.rc
|
|
|
|
allow init adbd:process transition;
|
|
|
|
allow init healthd:process transition;
|
|
|
|
allow init recovery:process transition;
|
|
|
|
allow init shell:process transition;
|
|
|
|
allow init ueventd:process transition;
|
|
|
|
allow init watchdogd:process transition;
|
2014-05-09 08:28:52 +02:00
|
|
|
|
|
|
|
# Init creates keystore's directory on boot, and walks through
|
|
|
|
# the directory as part of a recursive restorecon.
|
|
|
|
allow init keystore_data_file:dir { open create read getattr setattr search };
|
|
|
|
allow init keystore_data_file:file { getattr };
|
2014-05-23 17:26:19 +02:00
|
|
|
|
|
|
|
# Use setexeccon(), setfscreatecon(), and setsockcreatecon().
|
|
|
|
# setexec is for services with seclabel options.
|
|
|
|
# setfscreate is for labeling directories and socket files.
|
|
|
|
# setsockcreate is for labeling local/unix domain sockets.
|
|
|
|
allow init self:process { setexec setfscreate setsockcreate };
|
2014-05-29 15:22:16 +02:00
|
|
|
|
|
|
|
# Create /data/property and files within it.
|
|
|
|
allow init property_data_file:dir create_dir_perms;
|
|
|
|
allow init property_data_file:file create_file_perms;
|