summaryrefslogtreecommitdiff
path: root/vendor/qcom/common/cnd.te
blob: 5e0a85d311a7aaca7a6f2ee02b570ce12a40b873 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
type cnd, domain;
type cnd_exec, exec_type, vendor_file_type, file_type;
file_type_auto_trans(cnd, socket_device, cnd_socket);

# cnd is started by init, type transit from init domain to cnd domain
init_daemon_domain(cnd)

#communicating with QTI wlan driver for WFC/ VTiWLAN quality
allow cnd self:capability net_bind_service;

unix_socket_send(cnd, wpa, hal_wifi_supplicant)
allow cnd wpa_data_file:dir rw_dir_perms;
allow cnd wpa_data_file:sock_file create_file_perms;
allow cnd wpa_socket:sock_file write;

allow cnd self:udp_socket create_socket_perms;
allowxperm cnd self:udp_socket ioctl SIOCGIFMTU;
allow cnd self:{
    # Allow receiving NETLINK responses from WLAN driver.
    netlink_socket
    netlink_generic_socket
} create_socket_perms_no_ioctl;

allow cnd sysfs_timestamp_switch:file r_file_perms;
r_dir_file(cnd, sysfs_msm_subsys)
r_dir_file(cnd, sysfs_diag)
r_dir_file(cnd, sysfs_soc)

allow cnd proc_meminfo:file r_file_perms;

set_prop(cnd, cnd_prop)

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

# allow cnd to access cnd_data_file
allow cnd cnd_data_file:file create_file_perms;
allow cnd cnd_data_file:sock_file { unlink create setattr };
allow cnd cnd_data_file:dir rw_dir_perms;

# allow cnd to obtain wakelock
wakelock_use(cnd)

allow cnd ipa_vendor_data_file:dir r_dir_perms;
allow cnd ipa_vendor_data_file:file r_file_perms;

# To register cnd to hwbinder
add_hwservice(cnd, hal_cne_hwservice)
hwbinder_use(cnd)
get_prop(cnd, hwservicemanager_prop)
binder_call(cnd, dataservice_app)
binder_call(cnd, ims)
binder_call(cnd, location)

dontaudit cnd kernel:system module_request;