Skip to content

Commit

Permalink
Make A/B backuptool permissive
Browse files Browse the repository at this point in the history
Change-Id: Ib1f52f40dab26ac4575e06bfd54b88809b00f8d3
  • Loading branch information
luca020400 committed Jan 5, 2019
1 parent 75ac3aa commit 618adbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 5 additions & 0 deletions common/private/backuptool.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type backuptool, domain, coredomain;

permissive backuptool;

neverallow { domain -update_engine } backuptool:process transition;
13 changes: 5 additions & 8 deletions common/private/update_engine.te
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
allow update_engine self:capability { dac_override dac_read_search sys_rawio };

# Read updates from storage data
r_dir_file(update_engine, mnt_user_file)
r_dir_file(update_engine, storage_file)

allow update_engine self:capability { chown fsetid sys_rawio };

# Allow mount and unmount of system partition
allow update_engine labeledfs:filesystem { mount unmount };

allow update_engine { media_rw_data_file rootfs sdcardfs system_data_file system_file }:dir create_dir_perms;
allow update_engine { media_rw_data_file rootfs sdcardfs system_data_file system_file }:{ file lnk_file } create_file_perms;
allow update_engine { otapreopt_chroot_exec rootfs system_file toolbox_exec }:file rx_file_perms;
allow update_engine { rootfs system_file }:file { relabelfrom relabelto };
# Allow transition to backuptool domain
allow update_engine self:process setexec;
domain_trans(update_engine, otapreopt_chroot_exec, backuptool)

0 comments on commit 618adbf

Please sign in to comment.