e49714542e
This CL lists all the exported platform properties in private/exported_property_contexts. Additionally accessing core_property_type from vendor components is restricted. Instead public_readable_property_type is used to allow vendor components to read exported platform properties, and accessibility from vendor_init is also specified explicitly. Note that whitelisting would be applied only if PRODUCT_COMPATIBLE_PROPERTY is set on. Bug: 38146102 Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
43 lines
1.4 KiB
Text
43 lines
1.4 KiB
Text
# charger seclabel is specified in init.rc since
|
|
# it lives in the rootfs and has no unique file type.
|
|
type charger, domain;
|
|
|
|
# Write to /dev/kmsg
|
|
allow charger kmsg_device:chr_file rw_file_perms;
|
|
|
|
# Read access to pseudo filesystems.
|
|
allow charger sysfs_type:dir search;
|
|
r_dir_file(charger, rootfs)
|
|
r_dir_file(charger, cgroup)
|
|
|
|
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;
|
|
|
|
# charger needs to tell init to continue the boot
|
|
# process when running in charger mode.
|
|
set_prop(charger, system_prop)
|
|
set_prop(charger, exported_system_prop)
|
|
set_prop(charger, exported2_system_prop)
|
|
set_prop(charger, exported3_system_prop)
|