Skip to content
Snippets Groups Projects
Commit ff755159 authored by Andreas Gampe's avatar Andreas Gampe Committed by Android (Google) Code Review
Browse files

Merge "Sepolicy: Give Otapreopt right to write A/B artifacts in /data" into nyc-dev

parents b6480a5e c83614b6
No related branches found
No related tags found
No related merge requests found
...@@ -8,11 +8,21 @@ allow otapreopt self:capability { chown dac_override fowner fsetid setgid setuid ...@@ -8,11 +8,21 @@ allow otapreopt self:capability { chown dac_override fowner fsetid setgid setuid
# Note: /data/ota is created by init (see system/core/rootdir/init.rc) to avoid giving access # Note: /data/ota is created by init (see system/core/rootdir/init.rc) to avoid giving access
# here and having to relabel the directory. # here and having to relabel the directory.
# Read app data (APKs) as input to dex2oat.
r_dir_file(otapreopt, apk_data_file)
# Access to app oat directory.
r_dir_file(otapreopt, dalvikcache_data_file)
# Write to /data/ota(/*). Create symlinks in /data/ota(/*) # Write to /data/ota(/*). Create symlinks in /data/ota(/*)
allow otapreopt ota_data_file:dir create_dir_perms; allow otapreopt ota_data_file:dir create_dir_perms;
allow otapreopt ota_data_file:file create_file_perms; allow otapreopt ota_data_file:file create_file_perms;
allow otapreopt ota_data_file:lnk_file create_file_perms; allow otapreopt ota_data_file:lnk_file create_file_perms;
# Need to write .b files, which are dalvikcache_data_file, not ota_data_file.
# TODO: See whether we can apply ota_data_file?
allow otapreopt dalvikcache_data_file:dir { write add_name remove_name };
allow otapreopt dalvikcache_data_file:file create_file_perms;
# Allow labeling of files under /data/app/com.example/oat/ # Allow labeling of files under /data/app/com.example/oat/
# TODO: Restrict to .b suffix? # TODO: Restrict to .b suffix?
allow otapreopt dalvikcache_data_file:dir relabelto; allow otapreopt dalvikcache_data_file:dir relabelto;
......
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