Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ivi sepolicy #297

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions camera-ext/ivi/cameraserver.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#============= cameraserver ==============
allow cameraserver gpu_device:dir search;
allow cameraserver gpu_device:chr_file rw_file_perms;
allow cameraserver hal_graphics_allocator_default_tmpfs:file { read write map};
5 changes: 5 additions & 0 deletions camera-ext/ivi/file_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/dev/media[0-9]+ u:object_r:video_device:s0
/(vendor|system/vendor)/bin/android\.hardware\.automotive\.evs@1\.[0-9]-sample u:object_r:hal_evs_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.vendor\.hardware\.camera\.provider@2\.[0-9]+-ivi-service u:object_r:hal_camera_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.vendor\.hardware\.camera\.provider@2\.[0-9]+-ivi-service u:object_r:hal_camera_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.iacamera\.provider@2\.[0-9]+-ivi-service u:object_r:hal_camera_default_exec:s0
10 changes: 10 additions & 0 deletions camera-ext/ivi/hal_camera_default.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#============= hal_camera_default ==============
vndbinder_use(hal_camera_default);

allow hal_camera_default gpu_device:chr_file rw_file_perms;
allow hal_camera_default gpu_device:dir search;
allow hal_camera_default hal_graphics_allocator_default_tmpfs:file { map read write };
allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
allow hal_camera_default hal_graphics_composer_default:fd use;
allow hal_camera_default self:{ socket vsock_socket } { create read write listen accept bind };
set_prop(hal_camera_default, vendor_camera_default_prop)
6 changes: 6 additions & 0 deletions camera-ext/ivi/init.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# init
#

# wait on /dev/video0 a shared buffer used for camera processing
allow init video_device:chr_file getattr;
1 change: 1 addition & 0 deletions camera-ext/ivi/logwrapper.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set_prop(logwrapper, vendor_camera_default_prop)
1 change: 1 addition & 0 deletions camera-ext/ivi/property.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor_internal_prop(vendor_camera_default_prop)
8 changes: 8 additions & 0 deletions camera-ext/ivi/property_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ro.vendor.remote.sf.fake_camera u:object_r:vendor_camera_default_prop:s0
ro.vendor.camera.in_frame_format.h264 u:object_r:vendor_camera_default_prop:s0
ro.vendor.camera.in_frame_format.i420 u:object_r:vendor_camera_default_prop:s0
ro.vendor.camera.decode.vaapi u:object_r:vendor_camera_default_prop:s0
ro.vendor.remote.sf.back_camera_hal u:object_r:vendor_camera_default_prop:s0
ro.vendor.remote.sf.front_camera_hal u:object_r:vendor_camera_default_prop:s0
ro.vendor.camera.transference u:object_r:vendor_camera_default_prop:s0
vendor.camera.external u:object_r:vendor_camera_default_prop:s0
1 change: 1 addition & 0 deletions camera-ext/ivi/vendor_init.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set_prop(vendor_init, vendor_camera_default_prop)