From 874136434a6ef13dffec9c6c8c136d2424a32c33 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Tue, 17 Jan 2017 21:14:46 -0600 Subject: SELinux can be assumed for Android 4.4+ Change-Id: I7410a0c8e439eec90a955ee9201efd9a92bb9635 --- fixContexts.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'fixContexts.cpp') diff --git a/fixContexts.cpp b/fixContexts.cpp index 64429446e..7e650c209 100644 --- a/fixContexts.cpp +++ b/fixContexts.cpp @@ -25,16 +25,13 @@ #include "fixContexts.hpp" #include "twrp-functions.hpp" #include "twcommon.h" -#ifdef HAVE_SELINUX -#include "selinux/selinux.h" -#include "selinux/label.h" -#include "selinux/android.h" -#include "selinux/label.h" -#endif +#include +#include +#include +#include using namespace std; -#ifdef HAVE_SELINUX struct selabel_handle *sehandle; struct selinux_opt selinux_options[] = { { SELABEL_OPT_PATH, "/file_contexts" } @@ -146,18 +143,3 @@ int fixContexts::fixDataMediaContexts(string Mount_Point) { selabel_close(sehandle); return 0; } - -#else - -int fixContexts::restorecon(string entry __unused, struct stat *sb __unused) { - return -1; -} - -int fixContexts::fixContextsRecursively(string name __unused, int level __unused) { - return -1; -} - -int fixContexts::fixDataMediaContexts(string Mount_Point __unused) { - return -1; -} -#endif -- cgit v1.2.3