2019-03-14 23:45:03 +01:00
|
|
|
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;
|
|
|
|
|
2019-03-22 21:55:13 +01:00
|
|
|
# Allow lpdumpd to read super partition metadata.
|
|
|
|
allow lpdumpd super_block_device_type:blk_file r_file_perms;
|
2019-03-14 23:45:03 +01:00
|
|
|
|
|
|
|
# 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;
|
2021-03-22 06:46:12 +01:00
|
|
|
read_fstab(lpdumpd)
|
2019-03-14 23:45:03 +01:00
|
|
|
|
|
|
|
### 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
|
2019-11-27 02:34:29 +01:00
|
|
|
-servicemanager
|
2019-03-14 23:45:03 +01:00
|
|
|
} lpdumpd:binder call;
|