blob: b05239b78714346c8483cde56d04ed1495eca864 [file] [log] [blame]
Alex Klyubin3a8426b2017-02-16 16:08:22 -08001# HwBinder IPC from clients to server and callbacks
2binder_call(hal_camera_client, hal_camera_server)
3binder_call(hal_camera_server, hal_camera_client)
Eino-Ville Talvala9c43a3f2016-12-22 12:55:02 -08004
Eino-Ville Talvala9c43a3f2016-12-22 12:55:02 -08005# access /data/misc/camera
6allow hal_camera camera_data_file:dir create_dir_perms;
7allow hal_camera camera_data_file:file create_file_perms;
8
9allow hal_camera video_device:dir r_dir_perms;
10allow hal_camera video_device:chr_file rw_file_perms;
11allow hal_camera camera_device:chr_file rw_file_perms;
12allow hal_camera ion_device:chr_file rw_file_perms;
Alex Klyubin3a8426b2017-02-16 16:08:22 -080013# Both the client and the server need to use the graphics allocator
14allow { hal_camera_client hal_camera_server } hal_graphics_allocator:fd use;
Eino-Ville Talvala9c43a3f2016-12-22 12:55:02 -080015
Yin-Chia Yeh6824dfd2017-02-24 17:45:11 -080016# Allow hal_camera to use fd from app,gralloc,and ashmem HAL
Yin-Chia Yeh2dc4d1c2017-02-23 17:48:50 -080017allow hal_camera { appdomain -isolated_app }:fd use;
Yin-Chia Yeh2dc4d1c2017-02-23 17:48:50 -080018allow hal_camera surfaceflinger:fd use;
Alex Klyubin08d6f562017-03-17 16:51:56 -070019allow hal_camera hal_allocator_server:fd use;
Eino-Ville Talvala9c43a3f2016-12-22 12:55:02 -080020
21###
22### neverallow rules
23###
24
25# hal_camera should never execute any executable without a
26# domain transition
27neverallow hal_camera { file_type fs_type }:file execute_no_trans;
28
29# hal_camera should never need network access. Disallow network sockets.
30neverallow hal_camera domain:{ tcp_socket udp_socket rawip_socket } *;
Jeff Vander Stoep7fa59c82017-03-13 22:03:10 -070031
32# Only camera HAL may directly access the camera and video hardware
33neverallow { halserverdomain -hal_camera_server } camera_device:chr_file *;
34neverallow { halserverdomain -hal_camera_server } video_device:chr_file *;