Skip to content
Snippets Groups Projects
Commit f8fe149f authored by Jeff Vander Stoep's avatar Jeff Vander Stoep Committed by android-build-merger
Browse files

Restore recovery's ability to format cache and preserve logs

am: 87dd195b

Change-Id: Id3fde8b3c5901986a25d0e5daba4e34e8e471c93
parents 91bdd48d 87dd195b
No related branches found
No related tags found
No related merge requests found
...@@ -239,7 +239,7 @@ neverallowxperm domain domain:socket_class_set ioctl { SIOCATMARK }; ...@@ -239,7 +239,7 @@ neverallowxperm domain domain:socket_class_set ioctl { SIOCATMARK };
neverallowxperm * devpts:chr_file ioctl TIOCSTI; neverallowxperm * devpts:chr_file ioctl TIOCSTI;
# Do not allow any domain other than init to create unlabeled files. # Do not allow any domain other than init to create unlabeled files.
neverallow { domain -init } unlabeled:dir_file_class_set create; neverallow { domain -init -recovery } unlabeled:dir_file_class_set create;
# Limit device node creation to these whitelisted domains. # Limit device node creation to these whitelisted domains.
neverallow { neverallow {
......
...@@ -12,7 +12,15 @@ recovery_only(` ...@@ -12,7 +12,15 @@ recovery_only(`
# Recovery can only use HALs in passthrough mode # Recovery can only use HALs in passthrough mode
passthrough_hal_client_domain(recovery, hal_bootctl) passthrough_hal_client_domain(recovery, hal_bootctl)
allow recovery self:global_capability_class_set { dac_override fowner setuid setgid sys_admin sys_tty_config }; allow recovery self:global_capability_class_set {
chown
dac_override
fowner
setuid
setgid
sys_admin
sys_tty_config
};
# Run helpers from / or /system without changing domain. # Run helpers from / or /system without changing domain.
r_dir_file(recovery, rootfs) r_dir_file(recovery, rootfs)
...@@ -26,6 +34,11 @@ recovery_only(` ...@@ -26,6 +34,11 @@ recovery_only(`
allow recovery unlabeled:filesystem ~relabelto; allow recovery unlabeled:filesystem ~relabelto;
allow recovery contextmount_type:filesystem relabelto; allow recovery contextmount_type:filesystem relabelto;
# We may be asked to set an SELinux label for a type not known to the
# currently loaded policy. Allow it.
allow recovery unlabeled:{ file lnk_file } { create_file_perms relabelfrom relabelto };
allow recovery unlabeled:dir { create_dir_perms relabelfrom relabelto };
# Get file contexts # Get file contexts
allow recovery file_contexts_file:file r_file_perms; allow recovery file_contexts_file:file r_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