Skip to content
Snippets Groups Projects
Commit 6397d7e0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "coredomain_batteryinfo"

* changes:
  vold: not allowed to read sysfs_batteryinfo
  full_treble: coredomain must not have access to sysfs_batteryinfo
parents 280c6afa 711908e6
Branches pie-dev
No related tags found
No related merge requests found
...@@ -1406,3 +1406,22 @@ neverallow { ...@@ -1406,3 +1406,22 @@ neverallow {
domain domain
-coredomain -coredomain
} mnt_product_file:dir *; } mnt_product_file:dir *;
# Platform must not have access to sysfs_batteryinfo, but should do it via health HAL and healthd
full_treble_only(`
neverallow {
coredomain
-healthd
-shell
# Generate uevents for health info
-ueventd
# Recovery uses health HAL passthrough implementation.
-recovery
# Charger uses health HAL passthrough implementation.
-charger
# TODO(b/110891300): remove this exception
-incidentd
# TODO(b/110890430): remove this exception
-perfprofd
} sysfs_batteryinfo:file { open read };
')
...@@ -13,7 +13,7 @@ userdebug_or_eng(` ...@@ -13,7 +13,7 @@ userdebug_or_eng(`
auditallow vold proc_net_type:{ dir file lnk_file } { getattr open read }; auditallow vold proc_net_type:{ dir file lnk_file } { getattr open read };
') ')
r_dir_file(vold, sysfs_type) r_dir_file(vold, { sysfs_type -sysfs_batteryinfo })
# XXX Label sysfs files with a specific type? # XXX Label sysfs files with a specific type?
allow vold sysfs:file w_file_perms; # writing to /sys/*/uevent during coldboot. allow vold sysfs:file w_file_perms; # writing to /sys/*/uevent during coldboot.
allow vold sysfs_dm:file w_file_perms; allow vold sysfs_dm:file w_file_perms;
......
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