platform_external_selinux/libselinux
Thiébaud Weksteen 3d85f1e116 Use generic isSelector
seapp_contexts supports multiple boolean attributes: isPrivApp,
isEphemeralApp, isIsolatedComputeApp, isSdkSandboxAudit,
isSdkSandboxNext, fromRunAs. Each of these exists to support a specific
labelling scenario from the framework. When a new predicate is required,
an update to libselinux is also required. This change generically
handles any attribute starting with "is" and maps it directly
(case-insensitive) to the same seinfo field.

It is assumed that only one of these is required at a time. An error is
raised if seapp_contexts contains multiple is-selector within one rule.
An error is raised if seinfo contains multiple is-selector.

The order for comparison between seapp_contexts is altered: an entry
with an is-selector will be prioritized over one with an unspecifed
is-selector. This is not quite the previous order (e.g., isPrivApp <
targetSdkVersion < fromRunAs), but it is understood that the previous
order was not intentional and emerged from the incremental contributions
to this library.

The boolean info.isPreinstalledApp is replaced by checking the first
byte of info.partition.

Test: atest --host libselinux_test
Bug: 307635909
Change-Id: Ice3b84870e3255f6d9357d9750acbe9691b45aad
2023-12-01 10:42:50 +11:00
..
fuzzers Fix memory leak in libselinux_selabel_lookup_fuzzer 2021-06-22 10:04:00 +00:00
include Merge tag '3.5' into master 2023-03-21 15:27:40 +11:00
man libselinux: getcon.3: add note about PID races 2023-02-10 22:23:17 -08:00
rust Remove bindgen test boilerplate code 2021-08-11 13:42:52 -04:00
src Use generic isSelector 2023-12-01 10:42:50 +11:00
utils Merge tag '3.5' into master 2023-03-21 15:27:40 +11:00
Android.bp Merge "Revert "Set AGGRESSIVE_FREE_AFTER_REGEX_MATCH"" 2023-01-20 05:13:32 +00:00
exported.map.txt Annotate symbols correctly 2022-09-26 22:15:00 +09:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: use PCRE2 by default 2021-12-09 11:07:00 -05:00
MODULE_LICENSE_PUBLIC_DOMAIN libselinux: add The Android fork files 2016-10-24 11:05:25 -07:00
VERSION Update VERSIONs to 3.5 for release. 2023-02-23 05:16:11 -08:00