From e35926e1aff2e6b9b54656bd59c8178e295a1b7e Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Wed, 14 Jun 2017 15:30:39 -0700 Subject: Fix "No file_contexts" warning Fixed by Loading the file_contexts specified in libselinux, whereas previously recovery loaded /file_contexts which no longer exists. Bug: 62587423 Test: build and flash recovery on Angler. Warning is gone. Test: Wipe data and cache. Test: sideload OTA Change-Id: I11581c878b860ac5f412e6e8e7acde811f37870f (cherry picked from commit 2330dd8733ce0b207058e3003a3b1efebc022394) --- updater/updater.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'updater') diff --git a/updater/updater.cpp b/updater/updater.cpp index c09e267a5..f3e282044 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -139,9 +140,8 @@ int main(int argc, char** argv) { return 6; } - struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "/file_contexts" } }; - - sehandle = selabel_open(SELABEL_CTX_FILE, seopts, 1); + sehandle = selinux_android_file_context_handle(); + selinux_android_set_sehandle(sehandle); if (!sehandle) { fprintf(cmd_pipe, "ui_print Warning: No file_contexts\n"); -- cgit v1.2.3