From e9448817b37b2d14ab8e00dfff4b60347512aae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thi=C3=A9baud=20Weksteen?= Date: Mon, 4 Sep 2023 14:14:05 +1000 Subject: [PATCH] Remove APEX sepolicy support Test: boot aosp_cf_x86_64_phone Bug: 297794885 Change-Id: Ia447f1ce783eb83db41454aaee5e93f7f09c36b1 --- libselinux/src/android/android.c | 3 --- libselinux/src/android/android_internal.h | 4 ++-- libselinux/src/android/android_seapp.c | 7 ------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/libselinux/src/android/android.c b/libselinux/src/android/android.c index 4e330599..83066118 100644 --- a/libselinux/src/android/android.c +++ b/libselinux/src/android/android.c @@ -21,9 +21,6 @@ static const path_alts_t service_context_paths = { .paths = { "/system/etc/selinux/plat_service_contexts", "/plat_service_contexts" }, - { - "/dev/selinux/apex_service_contexts" - }, { "/system_ext/etc/selinux/system_ext_service_contexts", "/system_ext_service_contexts" diff --git a/libselinux/src/android/android_internal.h b/libselinux/src/android/android_internal.h index 4960e729..0f11ce8a 100644 --- a/libselinux/src/android/android_internal.h +++ b/libselinux/src/android/android_internal.h @@ -11,8 +11,8 @@ extern "C" { #endif // Context files (file_contexts, service_contexts, etc) may be spread over -// multiple partitions: system, apex, system_ext, product, vendor and/or odm. -#define MAX_CONTEXT_PATHS 6 +// multiple partitions: system, system_ext, product, vendor and/or odm. +#define MAX_CONTEXT_PATHS 5 // The maximum number of alternatives for a file on one partition. #define MAX_ALT_CONTEXT_PATHS 2 typedef struct path_alts { diff --git a/libselinux/src/android/android_seapp.c b/libselinux/src/android/android_seapp.c index 4529e59f..e29c74e9 100644 --- a/libselinux/src/android/android_seapp.c +++ b/libselinux/src/android/android_seapp.c @@ -27,9 +27,6 @@ static const path_alts_t file_context_paths = { .paths = { "/system/etc/selinux/plat_file_contexts", "/plat_file_contexts" }, - { - "/dev/selinux/apex_file_contexts", - }, { "/system_ext/etc/selinux/system_ext_file_contexts", "/system_ext_file_contexts" @@ -61,9 +58,6 @@ static const path_alts_t seapp_context_paths = { .paths = { "/system/etc/selinux/plat_seapp_contexts", "/plat_seapp_contexts" }, - { - "/dev/selinux/apex_seapp_contexts", - }, { "/system_ext/etc/selinux/system_ext_seapp_contexts", "/system_ext_seapp_contexts" @@ -82,7 +76,6 @@ static const path_alts_t seapp_context_paths = { .paths = { } }, .partitions= { "system", - "system", // regard APEX sepolicy as system "system_ext", "product", "vendor",