• 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
5hal_attribute_hwservice(hal_camera, hal_camera_hwservice)
6
7allow hal_camera device:dir r_dir_perms;
8allow hal_camera video_device:dir r_dir_perms;
9allow hal_camera video_device:chr_file rw_file_perms;
10allow hal_camera camera_device:chr_file rw_file_perms;
11allow hal_camera ion_device:chr_file rw_file_perms;
12# Both the client and the server need to use the graphics allocator
13allow { hal_camera_client hal_camera_server } hal_graphics_allocator:fd use;
14
15# Allow hal_camera to use fd from app,gralloc,and ashmem HAL
16allow hal_camera { appdomain -isolated_app }:fd use;
17allow hal_camera surfaceflinger:fd use;
18allow hal_camera hal_allocator_server:fd use;
19
20# Needed to provide debug dump output via dumpsys' pipes.
21allow hal_camera shell:fd use;
22allow hal_camera shell:fifo_file write;
23
24###
25### neverallow rules
26###
27
28# hal_camera should never execute any executable without a
29# domain transition
30neverallow hal_camera_server { file_type fs_type }:file execute_no_trans;
31
32# hal_camera should never need network access. Disallow network sockets.
33neverallow hal_camera_server 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