55e5c9b513
public/property split is landed to selectively export public types to
vendors. So rules happening within system should be in private. This
introduces private/property.te and moves all allow and neverallow rules
from any coredomains to system defiend properties.
Bug: 150331497
Test: system/sepolicy/tools/build_policies.sh
Change-Id: I0d929024ae9f4ae3830d4bf3d59e999febb22cbe
Merged-In: I0d929024ae9f4ae3830d4bf3d59e999febb22cbe
(cherry picked from commit 42c7d8966c
)
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
type charger, domain;
|
|
type charger_exec, system_file_type, exec_type, file_type;
|
|
|
|
# Write to /dev/kmsg
|
|
allow charger kmsg_device:chr_file rw_file_perms;
|
|
|
|
# Read access to pseudo filesystems.
|
|
r_dir_file(charger, rootfs)
|
|
r_dir_file(charger, cgroup)
|
|
|
|
# Allow to read /sys/class/power_supply directory
|
|
allow charger sysfs_type:dir r_dir_perms;
|
|
|
|
allow charger self:global_capability_class_set { sys_tty_config };
|
|
allow charger self:global_capability_class_set sys_boot;
|
|
|
|
wakelock_use(charger)
|
|
|
|
allow charger self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
|
|
|
|
# Read/write to /sys/power/state
|
|
allow charger sysfs_power:file rw_file_perms;
|
|
|
|
r_dir_file(charger, sysfs_batteryinfo)
|
|
|
|
# Read /sys/fs/pstore/console-ramoops
|
|
# Don't worry about overly broad permissions for now, as there's
|
|
# only one file in /sys/fs/pstore
|
|
allow charger pstorefs:dir r_dir_perms;
|
|
allow charger pstorefs:file r_file_perms;
|
|
|
|
allow charger graphics_device:dir r_dir_perms;
|
|
allow charger graphics_device:chr_file rw_file_perms;
|
|
allow charger input_device:dir r_dir_perms;
|
|
allow charger input_device:chr_file r_file_perms;
|
|
allow charger tty_device:chr_file rw_file_perms;
|
|
allow charger proc_sysrq:file rw_file_perms;
|
|
|
|
hal_client_domain(charger, hal_health)
|