summaryrefslogtreecommitdiffstats
path: root/fixContexts.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2017-01-18 04:14:46 +0100
committerEthan Yonker <dees_troy@teamw.in>2017-01-18 19:40:26 +0100
commit874136434a6ef13dffec9c6c8c136d2424a32c33 (patch)
tree5875f18cd9ea090a36b692de24f29e69a2b4f65d /fixContexts.cpp
parentRestore file system type logline on restore (diff)
downloadandroid_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar.gz
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar.bz2
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar.lz
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar.xz
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.tar.zst
android_bootable_recovery-874136434a6ef13dffec9c6c8c136d2424a32c33.zip
Diffstat (limited to '')
-rw-r--r--fixContexts.cpp26
1 files changed, 4 insertions, 22 deletions
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 <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/android.h>
+#include <selinux/label.h>
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