blob: 3d37ca340fa22003bd9fa5695655c1eab974a941 [file] [log] [blame]
Robert Craig3370c792013-09-26 06:36:55 -04001# Qualcomm MSM camera
2type camera, domain;
3type camera_exec, exec_type, file_type;
4
5# Started by init
6init_daemon_domain(camera)
7
Stephen Smalley39efd262013-12-20 08:38:25 -05008allow camera self:process execmem;
9
Robert Craig2a15fb12013-11-04 17:56:03 -050010# Interact with other media devices
11allow camera camera_device:dir search;
12allow camera { video_device camera_device }:chr_file rw_file_perms;
13allow camera { surfaceflinger mediaserver }:fd use;
14
15# Create front and back camera sockets (/data/cam_socket[01])
16type_transition camera system_data_file:sock_file camera_socket "cam_socket0";
17type_transition camera system_data_file:sock_file camera_socket "cam_socket1";
18allow camera camera_socket:sock_file { create unlink };
19allow camera system_data_file:dir w_dir_perms;
20allow camera system_data_file:sock_file unlink;
21
Robert Craig183874e2014-01-30 13:25:36 -050022type_transition camera system_data_file:file camera_data_file "fdAlbum";
23allow camera camera_data_file:file create_file_perms;
Robert Craig2a15fb12013-11-04 17:56:03 -050024
25# Connect to sensor socket (/data/app/sensor_ctl_socket)
26unix_socket_connect(camera, sensors, sensors)
27allow camera sensors_socket:sock_file read;