Remove redundant sepolicy
We don't use MLS in Microdroid, so we don't need MLS rules, nor
mlstrusted[subject|object] labels. (We keep one MLS rule to satisfy
checkpolicy.)
A lot of attributes are unused in Microdroid, so we can remove their
declarations and any references to them. (That may not make the
compiled policy smaller, since hopefully they get optimised out
anyway, but it means there is less policy for humans to deal with.)
Remove labels that relate only to apps, which we don't have - MAC
permissions, run-as, seapp_contexts.
In passing, fix a comment snafu in both system & microdroid policy.
Bug: 223596375
Test: Run staged-apex-compile & compos_verify, no denials
Test: atest MicrodroidTests MicrodroidHostTestCases
Change-Id: Ifd3589945a2d8b4c0361e00eec5678795513fd8c
2022-03-09 17:41:06 +01:00
|
|
|
# Domain used for su processes, as well as for adbd and adb shell
|
|
|
|
# after performing an adb root command.
|
|
|
|
|
2017-04-20 20:40:24 +02:00
|
|
|
# All types must be defined regardless of build variant to ensure
|
|
|
|
# policy compilation succeeds with userdebug/user combination at boot
|
|
|
|
type su, domain;
|
|
|
|
|
2016-10-12 23:58:09 +02:00
|
|
|
# File types must be defined for file_contexts.
|
2018-09-27 19:21:37 +02:00
|
|
|
type su_exec, system_file_type, exec_type, file_type;
|