aboutsummaryrefslogtreecommitdiff
path: root/sepolicy/nvram_agent_binder.te
blob: bee12ac8d77ddf45c98f60a258a3ddacaeaf8962 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ==============================================
# Policy File of /system/binnvram_agent_binder Executable File 


# ==============================================
# Type Declaration
# ==============================================

type nvram_agent_binder_exec , exec_type, file_type;
type nvram_agent_binder ,domain;

# ==============================================
# Android Policy Rule
# ==============================================

# ==============================================
# NSA Policy Rule
# ==============================================

# ==============================================
# MTK Policy Rule
# ==============================================

# permissive nvram_agent_binder;
init_daemon_domain(nvram_agent_binder)


# Date : WK14.35
# Operation : access nvram by binder 
# Purpose : ensure nvram user can access nvram file normally. 
binder_use(nvram_agent_binder)
binder_service(nvram_agent_binder)

# Date : WK14.35
# Operation : access nvram by binder 
# Purpose : ensure nvram user can access nvram file normally. 
allow nvram_agent_binder nvram_agent_service:service_manager add;


# Date : WK14.43
# Operation : 2rd Selinux Migration 
# Purpose : the role of nvram_agent_binder is same with nvram_daemon except property_set & exect permission
allow nvram_agent_binder mmcblk_device:blk_file rw_file_perms;
allow nvram_agent_binder platformblk_device:blk_file rw_file_perms;
allow nvram_agent_binder nvram_data_file:dir create_dir_perms;
allow nvram_agent_binder nvram_data_file:file create_file_perms;
allow nvram_agent_binder nvram_data_file:lnk_file read;
allow nvram_agent_binder nvdata_file:dir create_dir_perms;
allow nvram_agent_binder nvdata_file:file create_file_perms;

allow nvram_agent_binder system_file:file execute_no_trans;

allow nvram_agent_binder als_ps_device:chr_file { read ioctl open };
allow nvram_agent_binder mtk-adc-cali_device:chr_file { read write ioctl open };
allow nvram_agent_binder gsensor_device:chr_file { read ioctl open };
allow nvram_agent_binder gyroscope_device:chr_file { read ioctl open };
allow nvram_agent_binder init:unix_stream_socket connectto;
allow nvram_agent_binder platformblk_device:dir search;
allow nvram_agent_binder property_socket:sock_file write;
allow nvram_agent_binder sysfs:file write;
allow nvram_agent_binder system_data_file:file { write open setattr create};
allow nvram_agent_binder self:capability { fowner chown dac_override fsetid };
allow nvram_agent_binder system_data_file:dir {create write add_name};

# Purpose: for backup
allow nvram_agent_binder nvram_device:chr_file {read write open ioctl};
allow nvram_agent_binder pro_info_device:chr_file {read write open ioctl};
allow nvram_agent_binder block_device:dir search;

allow nvram_agent_binder app_data_file:file write;