diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-18 02:26:43 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-18 02:26:43 +0000 |
commit | f4d460216beb5f5fccf7ce3e5553a35ff1760030 (patch) | |
tree | 668ceeb6d16b5403131da69f608faead32aec2c5 | |
parent | 4f509f4fadbc58cc65ad3c3d498101c2f2bd0d20 (diff) | |
parent | 26ca350563052cbfdfffd400ac193e6befb8e445 (diff) | |
download | selinux-o-mr1-iot-preview-6.tar.gz |
release-request-c7ef57d3-badc-414a-a047-fc71124a9598-for-git_oc-mr1-iot-release-4343992 snap-temp-L17700000103593829android-o-mr1-iot-release-1.0.8android-o-mr1-iot-release-1.0.7android-o-mr1-iot-release-1.0.5android-o-mr1-iot-release-1.0.4android-o-mr1-iot-release-1.0.3android-o-mr1-iot-release-1.0.2android-o-mr1-iot-release-1.0.14android-o-mr1-iot-release-1.0.13android-o-mr1-iot-release-1.0.12android-o-mr1-iot-release-1.0.10android-o-mr1-iot-release-1.0.1android-o-mr1-iot-release-1.0.0android-o-mr1-iot-preview-8android-o-mr1-iot-preview-7android-o-mr1-iot-preview-6oreo-mr1-iot-releaseo-mr1-iot-preview-8o-mr1-iot-preview-7o-mr1-iot-preview-6
Change-Id: I8e9a3bef62ea563169cc7049e5f6db57e460cb09
-rw-r--r-- | libselinux/Android.bp | 6 | ||||
-rw-r--r-- | libselinux/src/android/android.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libselinux/Android.bp b/libselinux/Android.bp index 65607d1b..3e881c24 100644 --- a/libselinux/Android.bp +++ b/libselinux/Android.bp @@ -87,6 +87,12 @@ cc_defaults { } }, + product_variables: { + treble: { + cflags: ["-DFULL_TREBLE"], + }, + }, + local_include_dirs: ["include"], export_include_dirs: ["include"], } diff --git a/libselinux/src/android/android.c b/libselinux/src/android/android.c index 391fc1b8..b79b4635 100644 --- a/libselinux/src/android/android.c +++ b/libselinux/src/android/android.c @@ -63,8 +63,12 @@ struct selabel_handle* selinux_android_service_context_handle(void) seopts_service = seopts_service_rootfs; } - // TODO(b/36866029) full treble devices can't load non-plat +#ifdef FULL_TREBLE + // Treble compliant devices can only serve plat_service_contexts from servicemanager + return selinux_android_service_open_context_handle(seopts_service, 1); +#else return selinux_android_service_open_context_handle(seopts_service, 2); +#endif } struct selabel_handle* selinux_android_hw_service_context_handle(void) |