Skip to content

Commit

Permalink
Replace logwrapper domain with auto_detection
Browse files Browse the repository at this point in the history
auto_detection will be executed by init directly now.

Tracked-On: OAM-128889
Signed-off-by: Zhenlong Z Ji <[email protected]>
  • Loading branch information
ceiba1985 authored and sysopenci committed Dec 26, 2024
1 parent fd1cb69 commit 39c2e23
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 44 deletions.
41 changes: 41 additions & 0 deletions aafd/auto_detection.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
type auto_detection, domain;
type auto_detection_exec, exec_type, file_type, vendor_file_type;

init_daemon_domain(auto_detection)

allow auto_detection devpts:chr_file rw_file_perms;
r_dir_file(auto_detection, sysfs_type)

allow auto_detection vendor_shell_exec:file rx_file_perms;
allow auto_detection vendor_toolbox_exec:file rx_file_perms;
allow auto_detection vendor_file:file rx_file_perms;
allow auto_detection sysfs:dir { open read };
allow auto_detection sysfs_app_readable:file { getattr open read };
allow auto_detection sysfs_gpu:dir search;
allow auto_detection sysfs_gpu:file { getattr open read };
allow auto_detection sysfs:file r_file_perms;
allow auto_detection proc:file r_file_perms;
allow auto_detection kernel:system module_request;
no_debugfs_restriction(`
allow auto_detection debugfs_graphics:file r_file_perms;
')

allow auto_detection self:bluetooth_socket create_socket_perms_no_ioctl;

set_prop(auto_detection, vendor_mount_ep0_prop)
set_prop(auto_detection, vendor_graphics_hwcomposer_prop)
set_prop(auto_detection, vendor_video_codec_prop)
set_prop(auto_detection, vendor_audio_default_prop)

set_prop(auto_detection, vendor_hwcomposer_prop)

set_prop(auto_detection, vendor_usb_controller_prop)
set_prop(auto_detection, vendor_fixed_perf_prop)

allow auto_detection p9fs2:file r_file_perms;
allow auto_detection p9fs2:dir r_dir_perms;
set_prop(auto_detection, vendor_suspend_prop)
set_prop(auto_detection, vendor_intel_ipaddr_prop)
set_prop(auto_detection, vendor_graphics_gles_prop)
set_prop(auto_detection, vendor_media_platform_prop)
set_prop(auto_detection, vendor_display_prop)
2 changes: 2 additions & 0 deletions aafd/file_contexts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
(/system)?/vendor/bin/aafd u:object_r:aafd_exec:s0

(/system)?/vendor/bin/auto_detection.sh u:object_r:auto_detection_exec:s0
33 changes: 0 additions & 33 deletions aafd/logwrapper.te

This file was deleted.

3 changes: 3 additions & 0 deletions camera-ext/ext-camera-only/auto_detection.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module_only(`aafd', `
set_prop(auto_detection, vendor_camera_default_prop)
')
1 change: 0 additions & 1 deletion camera-ext/ext-camera-only/logwrapper.te

This file was deleted.

3 changes: 3 additions & 0 deletions camera-ext/ivi/auto_detection.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module_only(`aafd', `
set_prop(auto_detection, vendor_camera_default_prop)
')
1 change: 0 additions & 1 deletion camera-ext/ivi/logwrapper.te

This file was deleted.

3 changes: 3 additions & 0 deletions thermal/auto_detection.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module_only(`aafd', `
set_prop(auto_detection, vendor_thermal_prop)
')
1 change: 0 additions & 1 deletion thermal/logwrapper.te

This file was deleted.

1 change: 0 additions & 1 deletion vendor/file_contexts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/vendor/bin/logwrapper u:object_r:logwrapper_exec:s0
/vendor/bin/hw/android\.hardware\.graphics\.allocator-service\.minigbm u:object_r:hal_graphics_allocator_default_exec:s0
/vendor/bin/hw/android\.hardware\.graphics\.allocator@4\.0-service\.minigbm_intel u:object_r:hal_graphics_allocator_default_exec:s0
/vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@4\.0-impl\.minigbm_intel\.so u:object_r:same_process_hal_file:s0
Expand Down
7 changes: 0 additions & 7 deletions vendor/logwrapper.te

This file was deleted.

0 comments on commit 39c2e23

Please sign in to comment.