Skip to content
Snippets Groups Projects
Commit 9bbe420b authored by Jeff Vander Stoep's avatar Jeff Vander Stoep Committed by Jeffrey Vander Stoep
Browse files

recovery: clean up audit logspam

avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:cache_file:s0 tclass=dir
avc: granted { getattr } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir

Fixes: 62619253
Test: policy builds, no more "granted" messages in dmesg for recovery.
Merged-In: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
Change-Id: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
(cherry picked from commit ea1d6e7d)
parent dd57e698
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ auditallow { ...@@ -7,6 +7,7 @@ auditallow {
domain_deprecated domain_deprecated
-appdomain -appdomain
-installd -installd
-recovery
-sdcardd -sdcardd
-surfaceflinger -surfaceflinger
-system_server -system_server
...@@ -25,6 +26,7 @@ auditallow { ...@@ -25,6 +26,7 @@ auditallow {
-fsck -fsck
-healthd -healthd
-installd -installd
-recovery
-servicemanager -servicemanager
-system_server -system_server
-ueventd -ueventd
...@@ -36,6 +38,7 @@ auditallow { ...@@ -36,6 +38,7 @@ auditallow {
domain_deprecated domain_deprecated
-healthd -healthd
-installd -installd
-recovery
-servicemanager -servicemanager
-system_server -system_server
-ueventd -ueventd
...@@ -48,6 +51,7 @@ auditallow { ...@@ -48,6 +51,7 @@ auditallow {
-appdomain -appdomain
-healthd -healthd
-installd -installd
-recovery
-servicemanager -servicemanager
-system_server -system_server
-ueventd -ueventd
...@@ -138,17 +142,20 @@ allow domain_deprecated cache_file:lnk_file r_file_perms; ...@@ -138,17 +142,20 @@ allow domain_deprecated cache_file:lnk_file r_file_perms;
userdebug_or_eng(` userdebug_or_eng(`
auditallow { auditallow {
domain_deprecated domain_deprecated
-recovery
-system_server -system_server
-vold -vold
} cache_file:dir { open read search ioctl lock }; } cache_file:dir { open read search ioctl lock };
auditallow { auditallow {
domain_deprecated domain_deprecated
-appdomain -appdomain
-recovery
-system_server -system_server
-vold -vold
} cache_file:dir getattr; } cache_file:dir getattr;
auditallow { auditallow {
domain_deprecated domain_deprecated
-recovery
-system_server -system_server
-vold -vold
} cache_file:file { getattr read }; } cache_file:file { getattr read };
...@@ -190,6 +197,7 @@ auditallow { ...@@ -190,6 +197,7 @@ auditallow {
-healthd -healthd
-netd -netd
-rild -rild
-recovery
-system_app -system_app
-surfaceflinger -surfaceflinger
-system_server -system_server
...@@ -203,6 +211,7 @@ auditallow { ...@@ -203,6 +211,7 @@ auditallow {
-healthd -healthd
-netd -netd
-rild -rild
-recovery
-system_app -system_app
-surfaceflinger -surfaceflinger
-system_server -system_server
...@@ -216,6 +225,7 @@ auditallow { ...@@ -216,6 +225,7 @@ auditallow {
-healthd -healthd
-netd -netd
-rild -rild
-recovery
-system_app -system_app
-surfaceflinger -surfaceflinger
-system_server -system_server
......
...@@ -18,6 +18,7 @@ recovery_only(` ...@@ -18,6 +18,7 @@ recovery_only(`
allow recovery self:capability2 mac_admin; allow recovery self:capability2 mac_admin;
# Run helpers from / or /system without changing domain. # Run helpers from / or /system without changing domain.
r_dir_file(recovery, rootfs)
allow recovery rootfs:file execute_no_trans; allow recovery rootfs:file execute_no_trans;
allow recovery system_file:file execute_no_trans; allow recovery system_file:file execute_no_trans;
allow recovery toolbox_exec:file rx_file_perms; allow recovery toolbox_exec:file rx_file_perms;
...@@ -51,6 +52,7 @@ recovery_only(` ...@@ -51,6 +52,7 @@ recovery_only(`
# Write to /sys/class/android_usb/android0/enable. # Write to /sys/class/android_usb/android0/enable.
# TODO: create more specific label? # TODO: create more specific label?
r_dir_file(recovery, sysfs)
allow recovery sysfs:file w_file_perms; allow recovery sysfs:file w_file_perms;
# Write to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq. # Write to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment