android_device_samsung_msm8.../sepolicy/camera.te
PythonLimited c5c5560011 HAL: adding a needed config so normal users dont use this advanced stuff when compiling
also fixed camera sepolicy

Change-Id: Ifc4d36d2d6b8916ba228cade1683ece257d2c5ea
2018-02-20 17:02:11 +01:00

37 lines
1.4 KiB
Text

# Qualcomm MSM camera
type camera, domain;
type camera_exec, exec_type, file_type;
# Started by init
init_daemon_domain(camera)
allow camera self:process execmem;
allow camera camera_device:dir search;
allow camera { video_device camera_device }:chr_file rw_file_perms;
allow camera { surfaceflinger mediaserver }:fd use;
# Create /data/cam_socket0 as camera_socket
type_transition camera system_data_file:sock_file camera_socket "cam_socket0";
type_transition camera system_data_file:sock_file camera_socket "cam_socket1";
allow camera camera_socket:sock_file { create unlink };
allow camera system_data_file:dir remove_name;
allow camera system_data_file:sock_file unlink;
# All others under /data get camera_data_file
file_type_auto_trans(camera, system_data_file, camera_data_file);
allow camera camera_data_file:dir { write add_name };
allow camera camera_data_file:file create_file_perms;
# Connect to /data/app/sensor_ctl_socket
unix_socket_connect(camera, sensors, sensors)
allow camera sensors_socket:sock_file read;
allow camera devpts:chr_file { read write getattr };
allow camera device:chr_file { ioctl };
allow camera mpdecision:unix_stream_socket connectto;
allow camera servicemanager:binder call;
allow camera socket_device:sock_file write;
#allow camera system:binder call;
#allow camera system:unix_stream_socket { read write setopt };
allow camera system_data_file:file { open };