blob: 79b385f7af6b464103bde9ecbfaa3ca19b04dc74 [file] [log] [blame]
Jeff Tinkerc86f42b2017-01-01 12:01:18 -08001## call into system_server process (for invoking callbacks)
2binder_call(hal_drm, mediadrmserver)
3
4# Required by Widevine DRM (b/22990512)
5allow hal_drm self:process execmem;
6
7# Permit reading device's serial number from system properties
8get_prop(hal_drm, serialno_prop)
9
10# System file accesses
11allow hal_drm system_file:dir r_dir_perms;
12allow hal_drm system_file:file r_file_perms;
13allow hal_drm system_file:lnk_file r_file_perms;
14
15# Read files already opened under /data
16allow hal_drm system_data_file:dir { search getattr };
17allow hal_drm system_data_file:file { getattr read };
18allow hal_drm system_data_file:lnk_file r_file_perms;
19
20# Read access to pseudo filesystems
21r_dir_file(hal_drm, cgroup)
22allow hal_drm cgroup:dir { search write };
23allow hal_drm cgroup:file w_file_perms;
24
25# Allow access to ion memory allocation device
26allow hal_drm ion_device:chr_file rw_file_perms;
27allow hal_drm hal_graphics_allocator:fd use;
28
29# Allow access to app_data and media_data_files
30allow hal_drm media_data_file:dir create_dir_perms;
31allow hal_drm media_data_file:file create_file_perms;
32allow hal_drm media_data_file:file { getattr read };
33
34allow hal_drm sysfs:file r_file_perms;
35
36# Connect to tee service.
37allow hal_drm tee:unix_stream_socket connectto;
38allow hal_drm tee_device:chr_file rw_file_perms;
39
40# only allow unprivileged socket ioctl commands
41allowxperm hal_drm self:{ rawip_socket tcp_socket udp_socket }
42 ioctl { unpriv_sock_ioctls unpriv_tty_ioctls };
43
44###
45### neverallow rules
46###
47
48# hal_drm should never execute any executable without a
49# domain transition
50neverallow hal_drm { file_type fs_type }:file execute_no_trans;
51
52# do not allow privileged socket ioctl commands
53neverallowxperm hal_drm domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;