Skip to content

Commit

Permalink
Add Widevine L3 sepolicy
Browse files Browse the repository at this point in the history
Tracked-On: OAM-123406
Signed-off-by: Long, Hanyu <[email protected]>
  • Loading branch information
HawieLong authored and sysopenci committed Aug 14, 2024
1 parent 77c6f8b commit 4cbfbd0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions widevine/gen/gen_common/file.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type mediadrm_vendor_data_file, file_type, data_file_type;
3 changes: 3 additions & 0 deletions widevine/gen/gen_common/file_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm-service\.widevine u:object_r:hal_drm_widevine_exec:s0
/data/vendor/mediadrm(/.*)? u:object_r:mediadrm_vendor_data_file:s0

21 changes: 21 additions & 0 deletions widevine/gen/gen_common/hal_drm_widevine.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
type hal_drm_widevine, domain;
hal_server_domain(hal_drm_widevine, hal_drm)

type hal_drm_widevine_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_drm_widevine)

allow hal_drm mediacodec:fd use;

# get_prop(ramdump, public_vendor_default_prop)

vndbinder_use(hal_drm_widevine)
hal_client_domain(hal_drm_widevine, hal_graphics_composer);
allow hal_drm_widevine servicemanager:binder { call transfer };
allow hal_drm_widevine hal_drm_service:service_manager add;
allow hal_drm_widevine { appdomain -isolated_app_all }:fd use;
allow hal_drm_widevine hal_allocator_server:fd use;
allow hal_drm_widevine gpu_device:dir search;
allow hal_drm_widevine gpu_device:chr_file rw_file_perms;
allow hal_drm_widevine mediadrm_vendor_data_file:dir create_dir_perms;
allow hal_drm_widevine mediadrm_vendor_data_file:file create_file_perms;
allow hal_drm_widevine tmpfs:file { read write map };
1 change: 1 addition & 0 deletions widevine/gen/gen_common/service_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android.hardware.drm.IDrmFactory/widevine u:object_r:hal_drm_service:s0

0 comments on commit 4cbfbd0

Please sign in to comment.