summaryrefslogtreecommitdiffstats
path: root/common/mm-qcamerad.te
blob: 80c0b229e8514686daad2dd9c33b4bc007691208 (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
type mm-qcamerad, domain;
type mm-qcamerad_exec, exec_type, file_type;
init_daemon_domain(mm-qcamerad)

#added to support EZTune for camera
userdebug_or_eng(`
  allow mm-qcamerad debugfs:dir search;
  allow mm-qcamerad camera_data_file:file create_file_perms;
  allow mm-qcamerad self:tcp_socket { accept listen };
')

#Communicate with user land process through domain socket
allow mm-qcamerad camera_socket:sock_file { create unlink write };
allow mm-qcamerad camera_socket:dir w_dir_perms;
unix_socket_connect(mm-qcamerad, sensors, sensors)

allow mm-qcamerad self:process execmem;
# Interact with other media devices
allow mm-qcamerad camera_device:dir search;
allow mm-qcamerad { gpu_device video_device camera_device sensors_device }:chr_file rw_file_perms;

allow mm-qcamerad { surfaceflinger mediaserver }:fd use;
# Need to investigate this
allow mm-qcamerad self:tcp_socket create_socket_perms;

allow mm-qcamerad camera_data_file:dir { write remove_name search add_name };
allow mm-qcamerad camera_data_file:sock_file { create unlink };
allow mm-qcamerad node:tcp_socket node_bind;

#/data/fdAlbum
allow mm-qcamerad system_data_file:dir w_dir_perms;
allow mm-qcamerad system_data_file:file create_file_perms;

#Remove GL fine reference
allow mm-qcamerad shell_data_file:dir search;

# IMS use camera daemon to make VT call
allow mm-qcamerad port:tcp_socket name_bind;