• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HwBinder IPC from clients to server and callbacks
2binder_call(hal_camera_client, hal_camera_server)
3binder_call(hal_camera_server, hal_camera_client)
4
5add_hwservice(hal_camera_server, hal_camera_hwservice)
6allow hal_camera_client hal_camera_hwservice:hwservice_manager find;
7
8# access /data/misc/camera
9allow hal_camera camera_data_file:dir create_dir_perms;
10allow hal_camera camera_data_file:file create_file_perms;
11
12allow hal_camera video_device:dir r_dir_perms;
13allow hal_camera video_device:chr_file rw_file_perms;
14allow hal_camera camera_device:chr_file rw_file_perms;
15allow hal_camera ion_device:chr_file rw_file_perms;
16# Both the client and the server need to use the graphics allocator
17allow { hal_camera_client hal_camera_server } hal_graphics_allocator:fd use;
18
19# Allow hal_camera to use fd from app,gralloc,and ashmem HAL
20allow hal_camera { appdomain -isolated_app }:fd use;
21allow hal_camera surfaceflinger:fd use;
22allow hal_camera hal_allocator_server:fd use;
23
24###
25### neverallow rules
26###
27
28# hal_camera should never execute any executable without a
29# domain transition
30neverallow hal_camera { file_type fs_type }:file execute_no_trans;
31
32# hal_camera should never need network access. Disallow network sockets.
33neverallow hal_camera domain:{ tcp_socket udp_socket rawip_socket } *;
34
35# Only camera HAL may directly access the camera hardware
36neverallow { halserverdomain -hal_camera_server } camera_device:chr_file *;
37