Allow apexd to write to /apex/apex-info-list.xml

After non-staged install apexd needs to be update apex-info-list.xml.

Test: m
Bug: 187864524
Bug: 188713178
Change-Id: I78e182c70b5c34b8a763ed41ddd8130fa3e787a6
Merged-In: I78e182c70b5c34b8a763ed41ddd8130fa3e787a6
(cherry picked from commit 894657bea3)
This commit is contained in:
Nikita Ioffe 2021-06-04 18:39:32 +01:00
parent c9b4286e05
commit 5b4e13f73f

View file

@ -83,6 +83,9 @@ allow apexd apex_mnt_dir:lnk_file create_file_perms;
# allow apexd to create /apex/apex-info-list.xml and relabel to apex_info_file # allow apexd to create /apex/apex-info-list.xml and relabel to apex_info_file
allow apexd apex_mnt_dir:file { create_file_perms relabelfrom mounton }; allow apexd apex_mnt_dir:file { create_file_perms relabelfrom mounton };
allow apexd apex_info_file:file relabelto; allow apexd apex_info_file:file relabelto;
# apexd needs to update /apex/apex-info-list.xml after non-staged APEX update.
allow apexd apex_info_file:file rw_file_perms;
# allow apexd to unlink apex files in /data/apex/active # allow apexd to unlink apex files in /data/apex/active
# note that apexd won't be able to unlink files in /data/app-staging/session_XXXX, # note that apexd won't be able to unlink files in /data/app-staging/session_XXXX,
# because it doesn't have write permission for staging_data_file object. # because it doesn't have write permission for staging_data_file object.