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 --- partition.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'partition.cpp') diff --git a/partition.cpp b/partition.cpp index 359d70c86..bbee37d81 100644 --- a/partition.cpp +++ b/partition.cpp @@ -65,10 +65,8 @@ extern "C" { #define CRYPT_FOOTER_OFFSET 0x4000 #endif } -#ifdef HAVE_SELINUX -#include "selinux/selinux.h" +#include #include -#endif #ifdef HAVE_CAPABILITIES #include #include @@ -1910,7 +1908,7 @@ bool TWPartition::Wipe_EXT4() { if (!UnMount(true)) return false; -#if defined(HAVE_SELINUX) && defined(USE_EXT4) +#if defined(USE_EXT4) int ret; char *secontext = NULL; @@ -2619,14 +2617,14 @@ void TWPartition::Recreate_Media_Folder(void) { #ifdef TW_INTERNAL_STORAGE_PATH mkdir(EXPAND(TW_INTERNAL_STORAGE_PATH), 0770); #endif -#ifdef HAVE_SELINUX + // Afterwards, we will try to set the // default metadata that we were hopefully able to get during // early boot. tw_set_default_metadata(Media_Path.c_str()); if (!Internal_path.empty()) tw_set_default_metadata(Internal_path.c_str()); -#endif + // Toggle mount to ensure that "internal sdcard" gets mounted PartitionManager.UnMount_By_Path(Symlink_Mount_Point, true); PartitionManager.Mount_By_Path(Symlink_Mount_Point, true); -- cgit v1.2.3