Skip to content
Snippets Groups Projects
Commit 5b3494eb authored by Yifan Hong's avatar Yifan Hong
Browse files

Update selinux policy for policyvers retrieval.

Test: pass
Bug: 62073522
Change-Id: I3d53d0d5ec701c87fb3d45080799f424f7ba3792
parent 4b20ba9b
No related branches found
No related tags found
No related merge requests found
...@@ -478,7 +478,6 @@ neverallow appdomain ...@@ -478,7 +478,6 @@ neverallow appdomain
neverallow appdomain kernel:system { syslog_read syslog_mod syslog_console }; neverallow appdomain kernel:system { syslog_read syslog_mod syslog_console };
# SELinux is not an API for apps to use # SELinux is not an API for apps to use
neverallow { appdomain -shell } selinuxfs:file no_rw_file_perms;
neverallow { appdomain -shell } *:security { compute_av check_context }; neverallow { appdomain -shell } *:security { compute_av check_context };
neverallow { appdomain -shell } *:netlink_selinux_socket *; neverallow { appdomain -shell } *:netlink_selinux_socket *;
......
...@@ -166,6 +166,9 @@ neverallow all_untrusted_apps { ...@@ -166,6 +166,9 @@ neverallow all_untrusted_apps {
-hidl_token_hwservice # Designed for use by any domain -hidl_token_hwservice # Designed for use by any domain
}:hwservice_manager find; }:hwservice_manager find;
# SELinux is not an API for untrusted apps to use
neverallow all_untrusted_apps selinuxfs:file no_rw_file_perms;
# Restrict *Binder access from apps to HAL domains. We can only do this on full # Restrict *Binder access from apps to HAL domains. We can only do this on full
# Treble devices where *Binder communications between apps and HALs are tightly # Treble devices where *Binder communications between apps and HALs are tightly
# restricted. # restricted.
......
...@@ -108,6 +108,9 @@ allow priv_app preloads_media_file:dir r_dir_perms; ...@@ -108,6 +108,9 @@ allow priv_app preloads_media_file:dir r_dir_perms;
# Allow privileged apps (e.g. GMS core) to generate unique hardware IDs # Allow privileged apps (e.g. GMS core) to generate unique hardware IDs
allow priv_app keystore:keystore_key gen_unique_id; allow priv_app keystore:keystore_key gen_unique_id;
# Allow GMS core to access /sys/fs/selinux/policyvers for compatibility check
allow priv_app selinuxfs:file r_file_perms;
read_runtime_log_tags(priv_app) read_runtime_log_tags(priv_app)
### ###
......
...@@ -75,6 +75,9 @@ recovery_only(` ...@@ -75,6 +75,9 @@ recovery_only(`
allow recovery functionfs:dir search; allow recovery functionfs:dir search;
allow recovery functionfs:file rw_file_perms; allow recovery functionfs:file rw_file_perms;
# Access to /sys/fs/selinux/policyvers for compatibility check
allow recovery selinuxfs:file r_file_perms;
# Required to e.g. wipe userdata/cache. # Required to e.g. wipe userdata/cache.
allow recovery device:dir r_dir_perms; allow recovery device:dir r_dir_perms;
allow recovery block_device:dir r_dir_perms; allow recovery block_device:dir r_dir_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