blob: 2600843f681f58787a696aa72071dc6a3a724438 [file] [log] [blame]
Alex Klyubin9b718c42017-02-17 14:51:02 -08001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_drm_client, hal_drm_server)
3binder_call(hal_drm_server, hal_drm_client)
Jeff Tinkerc86f42b2017-01-01 12:01:18 -08004
Alex Klyubin53656c12017-04-13 19:05:27 -07005add_hwservice(hal_drm_server, hal_drm_hwservice)
6allow hal_drm_client hal_drm_hwservice:hwservice_manager find;
7
8allow hal_drm hidl_memory_hwservice:hwservice_manager find;
9
Jeff Tinkerc86f42b2017-01-01 12:01:18 -080010# Required by Widevine DRM (b/22990512)
11allow hal_drm self:process execmem;
12
13# Permit reading device's serial number from system properties
14get_prop(hal_drm, serialno_prop)
15
16# System file accesses
17allow hal_drm system_file:dir r_dir_perms;
18allow hal_drm system_file:file r_file_perms;
19allow hal_drm system_file:lnk_file r_file_perms;
20
21# Read files already opened under /data
22allow hal_drm system_data_file:dir { search getattr };
23allow hal_drm system_data_file:file { getattr read };
24allow hal_drm system_data_file:lnk_file r_file_perms;
25
26# Read access to pseudo filesystems
27r_dir_file(hal_drm, cgroup)
28allow hal_drm cgroup:dir { search write };
29allow hal_drm cgroup:file w_file_perms;
30
31# Allow access to ion memory allocation device
32allow hal_drm ion_device:chr_file rw_file_perms;
33allow hal_drm hal_graphics_allocator:fd use;
34
35# Allow access to app_data and media_data_files
36allow hal_drm media_data_file:dir create_dir_perms;
37allow hal_drm media_data_file:file create_file_perms;
38allow hal_drm media_data_file:file { getattr read };
39
40allow hal_drm sysfs:file r_file_perms;
41
Jeff Tinkerc86f42b2017-01-01 12:01:18 -080042allow hal_drm tee_device:chr_file rw_file_perms;
43
44# only allow unprivileged socket ioctl commands
45allowxperm hal_drm self:{ rawip_socket tcp_socket udp_socket }
46 ioctl { unpriv_sock_ioctls unpriv_tty_ioctls };
47
48###
49### neverallow rules
50###
51
52# hal_drm should never execute any executable without a
53# domain transition
54neverallow hal_drm { file_type fs_type }:file execute_no_trans;
55
56# do not allow privileged socket ioctl commands
Alex Klyubin9b718c42017-02-17 14:51:02 -080057neverallowxperm hal_drm domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;