5854941f63
Grant ReadDefaultFstab() callers allow scontext { metadata_file gsi_metadata_file_type }:dir search; allow scontext gsi_public_metadata_file:file r_file_perms; so they can search / read DSU metadata files. The DSU metadata files are required to deduce the correct fstab. Also tighten the neverallow rules in gsid.te. Bug: 181110285 Test: Build pass, presubmit test Test: Boot and check avc denials Test: Boot with DSU and check avc denials Change-Id: Ie464b9a8f7a89f9cf8f4e217dad1322ba3ad0633
37 lines
909 B
Text
37 lines
909 B
Text
type lpdumpd, domain, coredomain;
|
|
type lpdumpd_exec, system_file_type, exec_type, file_type;
|
|
|
|
init_daemon_domain(lpdumpd)
|
|
|
|
# Allow lpdumpd to register itself as a service.
|
|
binder_use(lpdumpd)
|
|
add_service(lpdumpd, lpdump_service)
|
|
|
|
# Allow lpdumpd to find the super partition block device.
|
|
allow lpdumpd block_device:dir r_dir_perms;
|
|
|
|
# Allow lpdumpd to read super partition metadata.
|
|
allow lpdumpd super_block_device_type:blk_file r_file_perms;
|
|
|
|
# Allow lpdumpd to read fstab.
|
|
allow lpdumpd sysfs_dt_firmware_android:dir r_dir_perms;
|
|
allow lpdumpd sysfs_dt_firmware_android:file r_file_perms;
|
|
read_fstab(lpdumpd)
|
|
|
|
### Neverallow rules
|
|
|
|
# Disallow other domains to get lpdump_service and call lpdumpd.
|
|
neverallow {
|
|
domain
|
|
-dumpstate
|
|
-lpdumpd
|
|
-shell
|
|
} lpdump_service:service_manager find;
|
|
|
|
neverallow {
|
|
domain
|
|
-dumpstate
|
|
-lpdumpd
|
|
-shell
|
|
-servicemanager
|
|
} lpdumpd:binder call;
|