344fc109e9
Add SELinux MAC for the service manager actions list
and find. Add the list and find verbs to the
service_manager class. Add policy requirements for
service_manager to enforce policies to binder_use
macro.
(cherry picked from commit b8511e0d98
)
Change-Id: I980d4a8acf6a0c6e99a3a7905961eb5564b1be15
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
type keystore, domain;
|
|
type keystore_exec, exec_type, file_type;
|
|
|
|
# keystore daemon
|
|
init_daemon_domain(keystore)
|
|
typeattribute keystore mlstrustedsubject;
|
|
binder_use(keystore)
|
|
binder_service(keystore)
|
|
allow keystore keystore_data_file:dir create_dir_perms;
|
|
allow keystore keystore_data_file:notdevfile_class_set create_file_perms;
|
|
allow keystore keystore_exec:file { getattr };
|
|
allow keystore tee_device:chr_file rw_file_perms;
|
|
allow keystore tee:unix_stream_socket connectto;
|
|
|
|
###
|
|
### Neverallow rules
|
|
###
|
|
### Protect ourself from others
|
|
###
|
|
|
|
neverallow { domain -keystore } keystore_data_file:dir ~{ open create read getattr setattr search relabelto };
|
|
neverallow { domain -keystore } keystore_data_file:notdevfile_class_set ~{ relabelto getattr };
|
|
|
|
neverallow { domain -keystore -init -kernel -recovery } keystore_data_file:dir *;
|
|
neverallow { domain -keystore -init -kernel -recovery } keystore_data_file:notdevfile_class_set *;
|
|
|
|
neverallow domain keystore:process ptrace;
|
|
|
|
allow keystore keystore_service:service_manager add;
|
|
|
|
# Audited locally.
|
|
service_manager_local_audit_domain(keystore)
|
|
auditallow keystore { service_manager_type -keystore_service }:service_manager find;
|
|
|
|
# Check SELinux permissions.
|
|
selinux_check_access(keystore)
|