summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2017-06-15 00:30:39 +0200
committerJeff Vander Stoep <jeffv@google.com>2017-06-15 01:10:50 +0200
commit2330dd8733ce0b207058e3003a3b1efebc022394 (patch)
tree5032a605a8777203352c7f0d3e1b2190ec58a62a /recovery.cpp
parentMerge "Fix a race condition for temperature_logger" am: 8e5fb46e87 am: efa40b4827 am: 54138462b4 (diff)
downloadandroid_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar.gz
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar.bz2
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar.lz
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar.xz
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.tar.zst
android_bootable_recovery-2330dd8733ce0b207058e3003a3b1efebc022394.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 122b89d0b..852f1e862 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -53,6 +53,7 @@
#include <healthd/BatteryMonitor.h>
#include <private/android_logger.h> /* private pmsg functions */
#include <private/android_filesystem_config.h> /* for AID_SYSTEM */
+#include <selinux/android.h>
#include <selinux/label.h>
#include <selinux/selinux.h>
#include <ziparchive/zip_archive.h>
@@ -1481,12 +1482,8 @@ int main(int argc, char **argv) {
ui->SetBackground(RecoveryUI::NONE);
if (show_text) ui->ShowText(true);
- 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) {
ui->Print("Warning: No file_contexts\n");
}