replicant-vendor_replicant/sepolicy/recovery.te
Ricardo Cerqueira c738cc26ca selinux: Allow recovery to do recursive deletes
Our partial wipes (preserving media) require that recovery can
rmdir dirs and getattr files

Change-Id: I206f74131f9a37c5887ef30062adeabb58beaa3a
2015-01-03 04:23:08 +00:00

35 lines
1.0 KiB
Plaintext

recovery_only(`
# Secure adb (setup_adbd)
allow adbd adb_keys_file:dir search;
allow recovery adb_keys_file:dir r_dir_perms;
allow recovery adb_keys_file:file r_file_perms;
allow recovery shell_prop:property_service set;
# Recovery dialogs
unix_socket_connect(recovery, vold, vold)
allow recovery tmpfs:sock_file create_file_perms;
# Read packages.xml
allow recovery system_data_file:file r_file_perms;
# Manage fstab and /adb_keys
allow recovery rootfs:file create_file_perms;
allow recovery rootfs:dir { write add_name };
# Read /data/media files and directories
allow recovery media_rw_data_file:dir r_dir_perms;
allow recovery media_rw_data_file:file r_file_perms;
# Control properties
allow recovery recovery_prop:property_service set;
# recursive rm for wipes... :(
allow recovery file_type:dir { rw_dir_perms rmdir };
allow recovery file_type:notdevfile_class_set { unlink getattr };
# wipe saves and restores the layout version
allow recovery install_data_file:file create_file_perms;
allow recovery system_data_file:file create;
')