Home | History | Annotate | Download | only in sepolicy
      1 # Qualcomm MSM camera
      2 type camera, domain;
      3 type camera_exec, exec_type, file_type;
      4 
      5 # Started by init
      6 init_daemon_domain(camera)
      7 
      8 allow camera self:process execmem;
      9 
     10 # Interact with other media devices
     11 allow camera camera_device:dir search;
     12 allow camera { video_device camera_device }:chr_file rw_file_perms;
     13 allow camera { surfaceflinger mediaserver }:fd use;
     14 
     15 # Create front and back camera sockets (/data/cam_socket[01])
     16 type_transition camera system_data_file:sock_file camera_socket "cam_socket0";
     17 type_transition camera system_data_file:sock_file camera_socket "cam_socket1";
     18 allow camera camera_socket:sock_file { create unlink };
     19 allow camera system_data_file:dir w_dir_perms;
     20 allow camera system_data_file:sock_file unlink;
     21 
     22 type_transition camera system_data_file:file camera_data_file "fdAlbum";
     23 allow camera camera_data_file:file create_file_perms;
     24 
     25 # Connect to sensor socket (/data/app/sensor_ctl_socket)
     26 unix_socket_connect(camera, sensors, sensors)
     27 allow camera sensors_socket:sock_file read;
     28