Skip to content
Snippets Groups Projects
Commit 28afdd92 authored by Stephen Smalley's avatar Stephen Smalley Committed by Nick Kralevich
Browse files

Deduplicate binder_call rules.


A number of binder_call rules are duplicated by other rules
written in terms of attributes/sets (e.g. appdomain, binderservicedomain).
Get rid of the duplicates.

Also use binder_use() in racoon.te rather than manually writing the
base rule for communicating with the servicemanager.

Change-Id: I5a459cc2154b1466bcde6eccef253dfcdcb44e0a
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent 63b98b17
No related branches found
No related tags found
No related merge requests found
...@@ -36,14 +36,12 @@ allow appdomain devpts:chr_file { getattr read write ioctl }; ...@@ -36,14 +36,12 @@ allow appdomain devpts:chr_file { getattr read write ioctl };
# Communicate with system_server. # Communicate with system_server.
allow appdomain system_server:fifo_file rw_file_perms; allow appdomain system_server:fifo_file rw_file_perms;
allow appdomain system_server:unix_stream_socket { read write setopt }; allow appdomain system_server:unix_stream_socket { read write setopt };
binder_call(appdomain, system_server)
# Communication with other apps via fifos # Communication with other apps via fifos
allow appdomain appdomain:fifo_file rw_file_perms; allow appdomain appdomain:fifo_file rw_file_perms;
# Communicate with surfaceflinger. # Communicate with surfaceflinger.
allow appdomain surfaceflinger:unix_stream_socket { read write setopt }; allow appdomain surfaceflinger:unix_stream_socket { read write setopt };
binder_call(appdomain, surfaceflinger)
# App sandbox file accesses. # App sandbox file accesses.
allow appdomain app_data_file:dir create_dir_perms; allow appdomain app_data_file:dir create_dir_perms;
...@@ -110,12 +108,6 @@ allow appdomain system_data_file:lnk_file getattr; ...@@ -110,12 +108,6 @@ allow appdomain system_data_file:lnk_file getattr;
allow appdomain download_file:dir search; allow appdomain download_file:dir search;
allow appdomain download_file:file r_file_perms; allow appdomain download_file:file r_file_perms;
# Allow applications to communicate with drmserver over binder
binder_call(appdomain, drmserver)
# Allow applications to communicate with mediaserver over binder
binder_call(appdomain, mediaserver)
# Allow apps to use the USB Accessory interface. # Allow apps to use the USB Accessory interface.
# http://developer.android.com/guide/topics/connectivity/usb/accessory.html # http://developer.android.com/guide/topics/connectivity/usb/accessory.html
# #
......
...@@ -8,7 +8,7 @@ typeattribute racoon mlstrustedsubject; ...@@ -8,7 +8,7 @@ typeattribute racoon mlstrustedsubject;
net_domain(racoon) net_domain(racoon)
binder_call(racoon, servicemanager) binder_use(racoon)
binder_call(racoon, keystore) binder_call(racoon, keystore)
allow racoon tun_device:chr_file r_file_perms; allow racoon tun_device:chr_file r_file_perms;
......
...@@ -9,9 +9,6 @@ app_domain(system_app) ...@@ -9,9 +9,6 @@ app_domain(system_app)
net_domain(system_app) net_domain(system_app)
binder_service(system_app) binder_service(system_app)
# Perform binder IPC to any app domain.
binder_call(system_app, appdomain)
# Read and write system data files. # Read and write system data files.
# May want to split into separate types. # May want to split into separate types.
allow system_app system_data_file:dir create_dir_perms; allow system_app system_data_file:dir create_dir_perms;
......
...@@ -100,7 +100,6 @@ allow system_server surfaceflinger:unix_stream_socket { read write setopt }; ...@@ -100,7 +100,6 @@ allow system_server surfaceflinger:unix_stream_socket { read write setopt };
binder_use(system_server) binder_use(system_server)
binder_call(system_server, binderservicedomain) binder_call(system_server, binderservicedomain)
binder_call(system_server, appdomain) binder_call(system_server, appdomain)
binder_call(system_server, healthd)
binder_call(system_server, dumpstate) binder_call(system_server, dumpstate)
binder_service(system_server) binder_service(system_server)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment