Allow linkerconfig to use pseudo tty

I just found it's reported in some bugreports when logging errors from
linkerconfig.

avc:  denied  { ioctl } for  pid=314 comm="linkerconfig"
path="/dev/pts/0" dev="devpts" ino=3 ioctlcmd=0x5401
scontext=u:r:linkerconfig:s0 tcontext=u:object_r:devpts:s0
tclass=chr_file permissive=1

Bug: 276386338
Test: m && boot
Change-Id: I57c9cc655e610dc81a95bc8578a6649c52798c93
This commit is contained in:
Jooyung Han 2023-04-10 10:55:40 +09:00
parent d970b34331
commit 3aaead5256

View file

@ -11,7 +11,7 @@ allow linkerconfig linkerconfig_file:file create_file_perms;
allow linkerconfig kmsg_device:chr_file w_file_perms;
# Allow linkerconfig to be invoked with logwrapper from init.
allow linkerconfig devpts:chr_file { read write };
allow linkerconfig devpts:chr_file { getattr ioctl read write };
# Allow linkerconfig to scan for apex modules
allow linkerconfig apex_mnt_dir:dir r_dir_perms;