summaryrefslogtreecommitdiffstats
path: root/updater/updater.c
diff options
context:
space:
mode:
authorKenny Root <kroot@android.com>2012-03-31 00:53:17 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2012-03-31 00:53:17 +0200
commit0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803 (patch)
tree46aacb687e7126a5a64949dd7ade2f284ee57c15 /updater/updater.c
parentam 37d0f260: Reconcile with ics-mr1-release (diff)
parentMerge changes Ied379f26,I09fb9d56 (diff)
downloadandroid_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar.gz
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar.bz2
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar.lz
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar.xz
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.tar.zst
android_bootable_recovery-0b1fee1b2aa7da86ffdabfe4c577ee8adb93d803.zip
Diffstat (limited to 'updater/updater.c')
-rw-r--r--updater/updater.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/updater/updater.c b/updater/updater.c
index aa626d29b..5f1580870 100644
--- a/updater/updater.c
+++ b/updater/updater.c
@@ -32,6 +32,8 @@
// (Note it's "updateR-script", not the older "update-script".)
#define SCRIPT_NAME "META-INF/com/google/android/updater-script"
+struct selabel_handle *sehandle;
+
int main(int argc, char** argv) {
// Various things log information to stdout or stderr more or less
// at random. The log file makes more sense if buffering is
@@ -103,6 +105,19 @@ int main(int argc, char** argv) {
return 6;
}
+#ifdef HAVE_SELINUX
+ struct selinux_opt seopts[] = {
+ { SELABEL_OPT_PATH, "/file_contexts" }
+ };
+
+ sehandle = selabel_open(SELABEL_CTX_FILE, seopts, 1);
+
+ if (!sehandle) {
+ fprintf(stderr, "Warning: No file_contexts\n");
+ fprintf(cmd_pipe, "ui_print Warning: No file_contexts\n");
+ }
+#endif
+
// Evaluate the parsed script.
UpdaterInfo updater_info;