Allow more file ioctls
The shell script interpreter checks if file descriptors are ttys, which causes a bunch of denials. Allow the benign ioctl TCGETS. Addresses the following denials: type=1400 audit(0.0:321): avc: denied { ioctl } for comm="sh" path="/data/misc/perfprofd/perferr.txt" dev="sda13" ino=6817306 ioctlcmd=5401 scontext=u:r:perfprofd:s0 tcontext=u:object_r:perfprofd_data_file:s0 tclass=file permissive=0 type=1400 audit(0.0:3189): avc: denied { ioctl } for comm="ps" path="/data/user_de/0/com.android.shell/files/bugreports/bugreport-XXXXXXXXX-MASTER-2018-10-11-16-52-40.tmp" dev="dm-2" ino=25546 ioctlcmd=0x5401 scontext=u:r:dumpstate:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0 type=1400 audit(0.0:3004): avc: denied { ioctl } for comm="top" path="/data/user_de/0/com.android.shell/files/bugreports/bugreport-XXXXXXXXX-MASTER-2018-10-11-16-52-40.tmp" dev="dm-2" ino=25546 ioctlcmd=0x5401 scontext=u:r:dumpstate:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0 Include the virtual sdcard when allowing F2FS specific sqlite ioctls, since apps write sqlite files to the virtual sdcard. Addresses the following denials: type=1400 audit(0.0:324): avc: denied { ioctl } for comm="amapLocManagerT" path="/storage/emulated/0/amap/openamaplocationsdk/alsn20170807.db" dev="sdcardfs" ino=3546650 ioctlcmd=f50c scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=0 app=com.xiaomi.hm.health Test: policy compiles. Change-Id: I7fc570f2bbf69485b1ee6e6b2d9a421639d29123
Please register or sign in to comment