SELinux can be assumed for Android 4.4+

Change-Id: I7410a0c8e439eec90a955ee9201efd9a92bb9635
This commit is contained in:
Matt Mower
2017-01-17 21:14:46 -06:00
committed by Ethan Yonker
parent a0cd91d317
commit 874136434a
15 changed files with 61 additions and 152 deletions
+4 -22
View File
@@ -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