summaryrefslogtreecommitdiff
path: root/sepolicy/rmt.te
blob: f5cacb3fe1cf3d9a7cceb8220feb9e942a2fce32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# remote storage process (runs as nobody)
type rmt, domain, device_domain_deprecated;
type rmt_exec, exec_type, file_type;

# Started by init
init_daemon_domain(rmt)

# Drop (user, group) to (nobody, nobody)
allow rmt self:capability { setuid setgid setpcap net_raw };

# opens and reads /dev/block/mmcblk0
allow rmt root_block_device:blk_file r_file_perms;

# Allow reads/writes to modem related block devices
allow rmt modem_block_device:blk_file rw_file_perms;
allow rmt block_device:dir r_dir_perms;
allow rmt cgroup:dir { create add_name };
allow rmt smem_log_device:chr_file rw_file_perms;

# Needed for ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_CLASS_RT << IOPRIO_CLASS_SHIFT);
allow rmt self:capability sys_admin;

allow rmt ssd_block_device:blk_file rw_file_perms;

allow rmt self:socket create_socket_perms;
allowxperm rmt self:socket ioctl msm_sock_ipc_ioctls;

# Wake lock access
wakelock_use(rmt)

# Allow access to /dev/uio0.
allow rmt uio_device:chr_file rw_file_perms;

allow rmt mmc_block_device:blk_file r_file_perms;