From 6ed3d7f584fe84e0a043c017cef965fbe67d7f31 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Wed, 24 Sep 2014 15:08:48 +0800 Subject: init.rc and BoardConfig.mk: make console service run with su domain make the console service run with u:r:su:s0 security context, so that we can run tests like linaro_android_kernel_test that need to run with root user level permission. This change is a hack to make it possible to run the test on the console shell of eng/userdebug build for lava, and this change will break the build of user mode, since user mode does not have the su domain defined. For normal eng/userdebug build, we can change to the root user with su command, and run tests under this context Change-Id: I6d1600cdd31c04515970aae26ff283ef5985c884 Signed-off-by: Yongqin Liu --- BoardConfig.mk | 7 +++++-- init.rc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 76a1343..6aa6009 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -60,8 +60,11 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true BOARD_SEPOLICY_DIRS += device/linaro/common/sepolicy BOARD_SEPOLICY_UNION += \ - netd.te \ - shell.te \ + init.te \ init_shell.te \ + kernel.te \ + logd.te \ mediaserver.te \ + netd.te \ + shell.te \ surfaceflinger.te diff --git a/init.rc b/init.rc index c9e30c4..1ca554d 100644 --- a/init.rc +++ b/init.rc @@ -502,7 +502,7 @@ service console /system/bin/sh console disabled group log - seclabel u:r:shell:s0 + seclabel u:r:su:s0 on property:ro.debuggable=1 start console -- cgit v1.2.3