diff options
author | Kenny Root <kroot@google.com> | 2012-10-16 10:47:27 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-10-16 12:57:26 -0700 |
commit | 7eb7567aa3faebfb22bd052f3505d485ee23d585 (patch) | |
tree | 0462d8372a28cd14dc5a2389b25500687e7950c9 /updater | |
parent | bddbb5b370d925d6e5ae62d560f5e7ad09a6ffac (diff) | |
download | bootable_recovery-7eb7567aa3faebfb22bd052f3505d485ee23d585.zip bootable_recovery-7eb7567aa3faebfb22bd052f3505d485ee23d585.tar.gz bootable_recovery-7eb7567aa3faebfb22bd052f3505d485ee23d585.tar.bz2 |
Remove HAVE_SELINUX guards
Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
Diffstat (limited to 'updater')
-rw-r--r-- | updater/Android.mk | 7 | ||||
-rw-r--r-- | updater/install.c | 4 | ||||
-rw-r--r-- | updater/updater.c | 2 | ||||
-rw-r--r-- | updater/updater.h | 4 |
4 files changed, 1 insertions, 16 deletions
diff --git a/updater/Android.mk b/updater/Android.mk index 8876120..4271371 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -27,17 +27,12 @@ LOCAL_STATIC_LIBRARIES += \ libz endif -ifeq ($(HAVE_SELINUX), true) -LOCAL_C_INCLUDES += external/libselinux/include -LOCAL_STATIC_LIBRARIES += libselinux -LOCAL_CFLAGS += -DHAVE_SELINUX -endif # HAVE_SELINUX - LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libedify libmtdutils libminzip libz LOCAL_STATIC_LIBRARIES += libmincrypt libbz LOCAL_STATIC_LIBRARIES += libminelf LOCAL_STATIC_LIBRARIES += libcutils libstdc++ libc +LOCAL_STATIC_LIBRARIES += libselinux LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. # Each library in TARGET_RECOVERY_UPDATER_LIBS should have a function diff --git a/updater/install.c b/updater/install.c index f981017..9ace125 100644 --- a/updater/install.c +++ b/updater/install.c @@ -78,23 +78,19 @@ Value* MountFn(const char* name, State* state, int argc, Expr* argv[]) { goto done; } -#ifdef HAVE_SELINUX char *secontext = NULL; if (sehandle) { selabel_lookup(sehandle, &secontext, mount_point, 0755); setfscreatecon(secontext); } -#endif mkdir(mount_point, 0755); -#ifdef HAVE_SELINUX if (secontext) { freecon(secontext); setfscreatecon(NULL); } -#endif if (strcmp(partition_type, "MTD") == 0) { mtd_scan_partitions(); diff --git a/updater/updater.c b/updater/updater.c index 5f15808..58ac27f 100644 --- a/updater/updater.c +++ b/updater/updater.c @@ -105,7 +105,6 @@ int main(int argc, char** argv) { return 6; } -#ifdef HAVE_SELINUX struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "/file_contexts" } }; @@ -116,7 +115,6 @@ int main(int argc, char** argv) { fprintf(stderr, "Warning: No file_contexts\n"); fprintf(cmd_pipe, "ui_print Warning: No file_contexts\n"); } -#endif // Evaluate the parsed script. diff --git a/updater/updater.h b/updater/updater.h index a00872c..d2e9011 100644 --- a/updater/updater.h +++ b/updater/updater.h @@ -20,12 +20,8 @@ #include <stdio.h> #include "minzip/Zip.h" -#ifdef HAVE_SELINUX #include <selinux/selinux.h> #include <selinux/label.h> -#else -struct selabel_handle; -#endif typedef struct { FILE* cmd_pipe; |