Home | History | Annotate | Download | only in sepolicy
      1 # Qualcomm MSM camera
      2 type camera, domain, domain_deprecated;
      3 type camera_exec, exec_type, file_type;
      4 
      5 init_daemon_domain(camera)
      6 
      7 binder_use(camera)
      8 binder_call(camera, system_server)
      9 
     10 allow camera self:capability { sys_nice };
     11 
     12 allow camera system_server:unix_stream_socket { read write };
     13 
     14 # Interact with other media devices
     15 allow camera { gpu_device video_device }:chr_file rw_file_perms;
     16 allow camera { audioserver cameraserver mediaserver surfaceflinger }:fd use;
     17 
     18 # Create camera socket
     19 allow camera camera_data_file:sock_file { create unlink };
     20 
     21 # read/write to /data/misc/camera
     22 allow camera camera_data_file:dir w_dir_perms;
     23 allow camera camera_data_file:file create_file_perms;
     24 
     25 # write to /sys/kernel/range/enable_ps_sensor
     26 allow camera sysfs_camera:file rw_file_perms;
     27 
     28 # Read to /dev/input
     29 allow camera input_device:dir r_dir_perms;
     30 allow camera input_device:chr_file r_file_perms;
     31 
     32 # Find sensorservice
     33 allow camera sensorservice_service:service_manager find;
     34 
     35 # Read persist_camera_file
     36 allow camera persist_file:dir search;
     37 allow camera persist_camera_file:dir search;
     38 allow camera persist_camera_file:file r_file_perms;
     39