From 048e136653f0e2d4f2b86eac823dddc319c81ef3 Mon Sep 17 00:00:00 2001
From: Jiyong Park <jiyong@google.com>
Date: Thu, 3 Jan 2019 21:41:11 +0900
Subject: [PATCH] Label the dynamic linker in the runtime APEX correctly

e2bc9fe9d5ac82457bc6050bf705ff43a1b05cbf in platform/art project added
the dynamic linker to the runtime APEX. Since the dynamic linker has
been labeled as 'system_linker_exec' so does the linker in the APEX.

Bug: 120266448
Test: ls -Z /apex/com.android.runtime/bin/linker
u:object_r:system_linker_exec:s0 /apex/com.android.runtime/bin/linker

Change-Id: I243b86a74d94058b3283830c32232c6584639ff3
---
 apex/com.android.runtime.debug-file_contexts   | 1 +
 apex/com.android.runtime.release-file_contexts | 1 +
 2 files changed, 2 insertions(+)

diff --git a/apex/com.android.runtime.debug-file_contexts b/apex/com.android.runtime.debug-file_contexts
index 35ef891d1..507d6654b 100644
--- a/apex/com.android.runtime.debug-file_contexts
+++ b/apex/com.android.runtime.debug-file_contexts
@@ -5,5 +5,6 @@
 /bin/dex2oat(d)?         u:object_r:dex2oat_exec:s0
 /bin/dexoptanalyzer(d)?  u:object_r:dexoptanalyzer_exec:s0
 /bin/profman(d)?         u:object_r:profman_exec:s0
+/bin/linker(64)?         u:object_r:system_linker_exec:s0
 /lib(64)?(/.*)?          u:object_r:system_lib_file:s0
 /etc/tz(/.*)?            u:object_r:system_zoneinfo_file:s0
diff --git a/apex/com.android.runtime.release-file_contexts b/apex/com.android.runtime.release-file_contexts
index 207704df2..286d6983f 100644
--- a/apex/com.android.runtime.release-file_contexts
+++ b/apex/com.android.runtime.release-file_contexts
@@ -5,5 +5,6 @@
 /bin/dex2oat             u:object_r:dex2oat_exec:s0
 /bin/dexoptanalyzer      u:object_r:dexoptanalyzer_exec:s0
 /bin/profman             u:object_r:profman_exec:s0
+/bin/linker(64)?         u:object_r:system_linker_exec:s0
 /lib(64)?(/.*)?          u:object_r:system_lib_file:s0
 /etc/tz(/.*)?            u:object_r:system_zoneinfo_file:s0
-- 
GitLab