Skip to content
Snippets Groups Projects
Commit d065f048 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Resync lmp-dev-plus-aosp with master

A DO NOT MERGE change merged from lmp-dev to lmp-dev-plus-aosp.
This is expected, but it's causing unnecessary merge conflicts
when handling AOSP contributions.

Resolve those conflicts.

This is essentially a revert of bf696327
for lmp-dev-plus-aosp only.

Change-Id: Icc66def7113ab45176ae015f659cb442d53bce5c
parent 11a29f29
Branches
Tags
No related merge requests found
......@@ -68,3 +68,9 @@ allow adbd appdomain:unix_stream_socket connectto;
# ndk-gdb invokes adb pull of app_process, linker, and libc.so.
allow adbd zygote_exec:file r_file_perms;
allow adbd system_file:file r_file_perms;
service_manager_local_audit_domain(adbd)
auditallow adbd {
service_manager_type
-surfaceflinger_service
}:service_manager find;
......@@ -67,3 +67,6 @@ attribute bluetoothdomain;
# All domains used for binder service domains.
attribute binderservicedomain;
# All domains that are excluded from the domain.te auditallow.
attribute service_manager_local_audit;
......@@ -49,6 +49,15 @@ allow bluetooth bluetooth_prop:property_service set;
allow bluetooth pan_result_prop:property_service set;
allow bluetooth ctl_dhcp_pan_prop:property_service set;
# Audited locally.
service_manager_local_audit_domain(bluetooth)
auditallow bluetooth {
service_manager_type
-bluetooth_service
-radio_service
-system_server_service
}:service_manager find;
###
### Neverallow rules
###
......
......@@ -11,3 +11,7 @@ allow bootanim gpu_device:chr_file rw_file_perms;
# /oem access
allow bootanim oemfs:dir search;
# Audited locally.
service_manager_local_audit_domain(bootanim)
auditallow bootanim { service_manager_type -surfaceflinger_service }:service_manager find;
......@@ -159,7 +159,9 @@ allow domain asec_public_file:file r_file_perms;
allow domain { asec_public_file asec_apk_file }:dir r_dir_perms;
allow domain servicemanager:service_manager list;
auditallow domain servicemanager:service_manager list;
allow domain service_manager_type:service_manager find;
auditallow { domain -service_manager_local_audit } service_manager_type:service_manager find;
###
### neverallow rules
......
......@@ -47,4 +47,12 @@ allow drmserver radio_data_file:file { read getattr };
allow drmserver drmserver_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(drmserver)
auditallow drmserver {
service_manager_type
-drmserver_service
-system_server_service
}:service_manager find;
selinux_check_access(drmserver)
......@@ -100,3 +100,18 @@ allow dumpstate net_data_file:file r_file_perms;
# Access /data/tombstones.
allow dumpstate tombstone_data_file:dir r_dir_perms;
allow dumpstate tombstone_data_file:file r_file_perms;
service_manager_local_audit_domain(dumpstate)
auditallow dumpstate {
service_manager_type
-drmserver_service
-healthd_service
-inputflinger_service
-keystore_service
-mediaserver_service
-nfc_service
-radio_service
-surfaceflinger_service
-system_app_service
-system_server_service
}:service_manager find;
......@@ -40,6 +40,10 @@ allow healthd self:capability sys_boot;
allow healthd healthd_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(healthd)
auditallow healthd { service_manager_type -healthd_service }:service_manager find;
# Healthd needs to tell init to continue the boot
# process when running in charger mode.
unix_socket_connect(healthd, property, init)
......
......@@ -9,3 +9,7 @@ binder_service(inputflinger)
binder_call(inputflinger, system_server)
allow inputflinger inputflinger_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(inputflinger)
auditallow inputflinger { service_manager_type -inputflinger_service }:service_manager find;
......@@ -18,3 +18,12 @@ net_domain(isolated_app)
# Needed to allow dlopen() from Chrome renderer processes.
# See b/15902433 for details.
allow isolated_app app_data_file:file execute;
# Audited locally.
service_manager_local_audit_domain(isolated_app)
auditallow isolated_app {
service_manager_type
-radio_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
......@@ -28,5 +28,9 @@ 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)
......@@ -80,6 +80,16 @@ allow mediaserver tee:unix_stream_socket connectto;
allow mediaserver mediaserver_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(mediaserver)
auditallow mediaserver {
service_manager_type
-drmserver_service
-mediaserver_service
-system_server_service
-surfaceflinger_service
}:service_manager find;
use_drmservice(mediaserver)
allow mediaserver drmserver:drmservice {
consumeRights
......
......@@ -15,3 +15,12 @@ allow nfc sysfs_nfc_power_writable:file rw_file_perms;
allow nfc sysfs:file write;
allow nfc nfc_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(nfc)
auditallow nfc {
service_manager_type
-mediaserver_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
......@@ -27,3 +27,13 @@ allow platform_app media_rw_data_file:file create_file_perms;
# Write to /cache.
allow platform_app cache_file:dir create_dir_perms;
allow platform_app cache_file:file create_file_perms;
# Audited locally.
service_manager_local_audit_domain(platform_app)
auditallow platform_app {
service_manager_type
-mediaserver_service
-radio_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
......@@ -28,3 +28,13 @@ auditallow radio system_radio_prop:property_service set;
allow radio ctl_rildaemon_prop:property_service set;
allow radio radio_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(radio)
auditallow radio {
service_manager_type
-mediaserver_service
-radio_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
......@@ -59,6 +59,14 @@ allow surfaceflinger tee_device:chr_file rw_file_perms;
allow surfaceflinger surfaceflinger_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(surfaceflinger)
auditallow surfaceflinger {
service_manager_type
-surfaceflinger_service
-system_server_service
}:service_manager find;
###
### Neverallow rules
###
......
......@@ -64,3 +64,14 @@ allow system_app keystore:keystore_key {
};
control_logd(system_app)
# Audited locally.
service_manager_local_audit_domain(system_app)
auditallow system_app {
service_manager_type
-keystore_service
-nfc_service
-radio_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
......@@ -364,6 +364,9 @@ allow system_server pstorefs:file r_file_perms;
allow system_server system_server_service:service_manager add;
# Audited locally.
service_manager_local_audit_domain(system_server)
allow system_server keystore:keystore_key {
test
get
......
......@@ -109,6 +109,7 @@ typeattribute $1 appdomain;
tmpfs_domain($1)
# Map with PROT_EXEC.
allow $1 $1_tmpfs:file execute;
service_manager_local_audit_domain($1)
')
#####################################
......@@ -360,6 +361,13 @@ define(`use_keystore', `
')
###########################################
# service_manager_local_audit_domain(domain)
# Has its own auditallow rule on service_manager
# and should be excluded from the domain.te auditallow.
define(`service_manager_local_audit_domain', `
typeattribute $1 service_manager_local_audit;
')
# use_drmservice(domain)
# Ability to use DrmService which requires
# DrmService to call getpidcon.
......
......@@ -64,6 +64,19 @@ allow untrusted_app media_rw_data_file:file create_file_perms;
allow untrusted_app cache_file:dir create_dir_perms;
allow untrusted_app cache_file:file create_file_perms;
# Audited locally.
service_manager_local_audit_domain(untrusted_app)
auditallow untrusted_app {
service_manager_type
-drmserver_service
-keystore_service
-mediaserver_service
-nfc_service
-radio_service
-surfaceflinger_service
-system_server_service
}:service_manager find;
###
### neverallow rules
###
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment