623975fa5a
Permissive domains are only intended for development. When a device launches, we want to ensure that all permissive domains are in, at a minimum, unconfined+enforcing. Add FORCE_PERMISSIVE_TO_UNCONFINED to Android.mk. During development, this flag is false, and permissive domains are allowed. When SELinux new feature development has been frozen immediately before release, this flag will be flipped to true. Any previously permissive domains will move into unconfined+enforcing. This will ensure that all SELinux domains have at least a minimal level of protection. Unconditionally enable this flag for all user builds. Change-Id: I1632f0da0022c80170d8eb57c82499ac13fd7858
23 lines
952 B
Text
23 lines
952 B
Text
type sdcardd, domain;
|
|
permissive_or_unconfined(sdcardd)
|
|
type sdcardd_exec, exec_type, file_type;
|
|
|
|
init_daemon_domain(sdcardd)
|
|
|
|
allow sdcardd cgroup:dir create_dir_perms;
|
|
allow sdcardd fuse_device:chr_file rw_file_perms;
|
|
allow sdcardd rootfs:dir mounton;
|
|
allow sdcardd sdcard_type:filesystem mount;
|
|
allow sdcardd self:capability { setuid setgid dac_override sys_admin sys_resource };
|
|
|
|
type_transition sdcardd system_data_file:{ dir file } media_rw_data_file;
|
|
allow sdcardd media_rw_data_file:dir create_dir_perms;
|
|
allow sdcardd media_rw_data_file:file create_file_perms;
|
|
|
|
# Read /data/system/packages.list.
|
|
allow sdcardd system_data_file:file r_file_perms;
|
|
|
|
# Compatibility for existing devices with /data/media in system_data_file.
|
|
# TODO: Remove these lines after we have guaranteed that /data/media has been relabeled to media_rw_data_file.
|
|
allow sdcardd system_data_file:dir create_dir_perms;
|
|
allow sdcardd system_data_file:file create_file_perms;
|