summaryrefslogtreecommitdiff
path: root/vendor/qcom/common/location.te
blob: af5f83da26a8ec4b5cc4949f7ea72e0d32bc4485 (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
# location - Location daemon
type location, domain;
type location_exec, exec_type, vendor_file_type, file_type;

init_daemon_domain(location)

allow location self:capability setgid;

# files in /sys
r_dir_file(location, sysfs_soc)
r_dir_file(location, sysfs_esoc)
r_dir_file(location, sysfs_msm_subsys)
r_dir_file(location, sysfs_ssr)

# Execute /vendor/bin/lowi-server
allow location location_exec:file rx_file_perms;

# Enable standard network access (for XTRA download)
net_domain(location)

## And some additional network access
allow location self:{
    netlink_generic_socket
    qipcrtr_socket
} create_socket_perms_no_ioctl;
allowxperm location self:udp_socket ioctl { SIOCGIFINDEX SIOCGIFHWADDR SIOCIWFIRSTPRIV_05 };

# /data/vendor/location
allow location location_data_file:dir create_dir_perms;
allow location location_data_file:file create_file_perms;

# /data/vendor/wifi/wpa
allow location wpa_data_file:dir rw_dir_perms;
allow location wpa_data_file:sock_file create_file_perms;
allow location hal_wifi_supplicant_default:unix_dgram_socket sendto;

# /dev/socket/location
allow location location_socket:sock_file create_file_perms;
allow location location_socket:dir w_dir_perms;

allow location hal_gnss_qti:unix_dgram_socket sendto;

userdebug_or_eng(`
  allow location diag_device:chr_file rw_file_perms;
')