1# cameraserver - camera daemon 2type cameraserver, domain; 3type cameraserver_exec, exec_type, file_type; 4 5init_daemon_domain(cameraserver) 6 7binder_use(cameraserver) 8binder_call(cameraserver, binderservicedomain) 9binder_call(cameraserver, appdomain) 10binder_service(cameraserver) 11 12# access /data/misc/camera 13allow cameraserver camera_data_file:dir create_dir_perms; 14allow cameraserver camera_data_file:file create_file_perms; 15 16allow cameraserver video_device:dir r_dir_perms; 17allow cameraserver video_device:chr_file rw_file_perms; 18allow cameraserver ion_device:chr_file rw_file_perms; 19 20allow cameraserver appops_service:service_manager find; 21allow cameraserver audioserver_service:service_manager find; 22allow cameraserver batterystats_service:service_manager find; 23allow cameraserver cameraproxy_service:service_manager find; 24allow cameraserver cameraserver_service:service_manager add; 25allow cameraserver mediaserver_service:service_manager find; 26allow cameraserver processinfo_service:service_manager find; 27allow cameraserver scheduling_policy_service:service_manager find; 28allow cameraserver surfaceflinger_service:service_manager find; 29 30### 31### neverallow rules 32### 33 34# cameraserver should never execute any executable without a 35# domain transition 36neverallow cameraserver { file_type fs_type }:file execute_no_trans; 37 38# cameraserver should never need network access. Disallow network sockets. 39neverallow cameraserver domain:{ tcp_socket udp_socket rawip_socket } *; 40