aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recovery.cpp9
-rw-r--r--updater/updater.cpp6
2 files changed, 6 insertions, 9 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 122b89d0..852f1e86 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -53,6 +53,7 @@
53#include <healthd/BatteryMonitor.h> 53#include <healthd/BatteryMonitor.h>
54#include <private/android_logger.h> /* private pmsg functions */ 54#include <private/android_logger.h> /* private pmsg functions */
55#include <private/android_filesystem_config.h> /* for AID_SYSTEM */ 55#include <private/android_filesystem_config.h> /* for AID_SYSTEM */
56#include <selinux/android.h>
56#include <selinux/label.h> 57#include <selinux/label.h>
57#include <selinux/selinux.h> 58#include <selinux/selinux.h>
58#include <ziparchive/zip_archive.h> 59#include <ziparchive/zip_archive.h>
@@ -1481,12 +1482,8 @@ int main(int argc, char **argv) {
1481 ui->SetBackground(RecoveryUI::NONE); 1482 ui->SetBackground(RecoveryUI::NONE);
1482 if (show_text) ui->ShowText(true); 1483 if (show_text) ui->ShowText(true);
1483 1484
1484 struct selinux_opt seopts[] = { 1485 sehandle = selinux_android_file_context_handle();
1485 { SELABEL_OPT_PATH, "/file_contexts" } 1486 selinux_android_set_sehandle(sehandle);
1486 };
1487
1488 sehandle = selabel_open(SELABEL_CTX_FILE, seopts, 1);
1489
1490 if (!sehandle) { 1487 if (!sehandle) {
1491 ui->Print("Warning: No file_contexts\n"); 1488 ui->Print("Warning: No file_contexts\n");
1492 } 1489 }
diff --git a/updater/updater.cpp b/updater/updater.cpp
index f5ff6df9..1d8fa8e9 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -25,6 +25,7 @@
25 25
26#include <android-base/logging.h> 26#include <android-base/logging.h>
27#include <android-base/strings.h> 27#include <android-base/strings.h>
28#include <selinux/android.h>
28#include <selinux/label.h> 29#include <selinux/label.h>
29#include <selinux/selinux.h> 30#include <selinux/selinux.h>
30#include <ziparchive/zip_archive.h> 31#include <ziparchive/zip_archive.h>
@@ -139,9 +140,8 @@ int main(int argc, char** argv) {
139 return 6; 140 return 6;
140 } 141 }
141 142
142 struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "/file_contexts" } }; 143 sehandle = selinux_android_file_context_handle();
143 144 selinux_android_set_sehandle(sehandle);
144 sehandle = selabel_open(SELABEL_CTX_FILE, seopts, 1);
145 145
146 if (!sehandle) { 146 if (!sehandle) {
147 fprintf(cmd_pipe, "ui_print Warning: No file_contexts\n"); 147 fprintf(cmd_pipe, "ui_print Warning: No file_contexts\n");