device_google_gs101/whitechapel/vendor/google/init-display-sh.te
Yi-Yo Chiang 829c6fb863 init-display-sh: Don't audit writing to kmsg
modprobe would log errors to /dev/kmsg, need to explicit allow this.

```
avc:  denied  { write } for  comm="modprobe" name="kmsg" dev="tmpfs" ino=5 scontext=u:r:init-display-sh:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
```

Bug: 388717752
Test: DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I62a43416291d4d79164765004f156f2bdb69b0b5
2025-01-20 01:38:19 -08:00

12 lines
463 B
Text

type init-display-sh, domain;
type init-display-sh_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(init-display-sh)
allow init-display-sh self:capability sys_module;
allow init-display-sh vendor_kernel_modules:system module_load;
allow init-display-sh vendor_toolbox_exec:file execute_no_trans;
dontaudit init-display-sh proc_cmdline:file r_file_perms;
# Allow modprobe to log to kmsg.
allow init-display-sh kmsg_device:chr_file w_file_perms;