blob: bd46ca46eec311674503af9d286791004a5528d2 [file] [log] [blame]
Kiyoung Kimaffa6f32019-07-08 19:02:05 +09001type linkerconfig, domain, coredomain;
2type linkerconfig_exec, exec_type, file_type, system_file_type;
3
4init_daemon_domain(linkerconfig)
5
6## Read and write linkerconfig subdirectory.
Kiyoung Kimb55d4442020-01-20 13:40:08 +09007allow linkerconfig linkerconfig_file:dir create_dir_perms;
Kiyoung Kimaffa6f32019-07-08 19:02:05 +09008allow linkerconfig linkerconfig_file:file create_file_perms;
9
Kiyoung Kim2d5f2e22019-07-23 13:41:19 +090010# Allow linkerconfig to log to the kernel.
11allow linkerconfig kmsg_device:chr_file w_file_perms;
12
Kiyoung Kim6f733962019-12-18 13:30:28 +090013# Allow linkerconfig to be invoked with logwrapper from init.
Jooyung Han3aaead52023-04-10 10:55:40 +090014allow linkerconfig devpts:chr_file { getattr ioctl read write };
Kiyoung Kim6f733962019-12-18 13:30:28 +090015
Kiyoung Kimb55d4442020-01-20 13:40:08 +090016# Allow linkerconfig to scan for apex modules
17allow linkerconfig apex_mnt_dir:dir r_dir_perms;
18
Jooyung Han86f22842020-07-30 01:11:15 +090019# Allow linkerconfig to read apex-info-list.xml
20allow linkerconfig apex_info_file:file r_file_perms;
21
Jooyung Hanb6211b82023-05-31 17:51:14 +090022# Allow linkerconfig to read apex_manifest.pb file from vendor apex
23r_dir_file(linkerconfig, vendor_apex_metadata_file)
24
Alex Light16dfb432021-03-11 11:26:08 -080025# Allow linkerconfig to be called in the otapreopt_chroot
26allow linkerconfig otapreopt_chroot:fd use;
27allow linkerconfig postinstall_apex_mnt_dir:dir r_dir_perms;
28allow linkerconfig postinstall_apex_mnt_dir:file r_file_perms;
29
Jeff Vander Stoep4c0259d2021-03-05 19:54:30 +010030neverallow { domain -init -linkerconfig -otapreopt_chroot } linkerconfig_exec:file no_x_file_perms;