summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2012-10-17 02:49:23 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-17 02:49:23 +0200
commita0d9ddb8f2922088b08219326afeaf532b3af5ac (patch)
treec657c4603c41f1cac92c540bd5e1eb07b4b0c9ad /updater
parentam d0d4d44d: (-s ours) Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge (diff)
parentresolved conflicts for merge of 78afed1c to jb-mr1-dev-plus-aosp (diff)
downloadandroid_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar.gz
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar.bz2
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar.lz
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar.xz
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.tar.zst
android_bootable_recovery-a0d9ddb8f2922088b08219326afeaf532b3af5ac.zip
Diffstat (limited to '')
-rw-r--r--updater/Android.mk7
-rw-r--r--updater/install.c4
-rw-r--r--updater/updater.c2
-rw-r--r--updater/updater.h4
4 files changed, 1 insertions, 16 deletions
diff --git a/updater/Android.mk b/updater/Android.mk
index 8876120b0..4271371e9 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 41f053d01..19054236c 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 5f1580870..58ac27f9e 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 a00872ca4..d2e901141 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;