summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-01-13 20:59:15 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-13 20:59:15 +0100
commitc22a444cdd631e2644996f52a13abb77acb46bc9 (patch)
treec7437051f8309ae7e3af1d35a3e6eed23fd00ebc /etc
parentremove dead code from minzip (diff)
parentam fc729512: Merge "Set SELinux security contexts correctly for init and services." (diff)
downloadandroid_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar.gz
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar.bz2
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar.lz
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar.xz
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.tar.zst
android_bootable_recovery-c22a444cdd631e2644996f52a13abb77acb46bc9.zip
Diffstat (limited to 'etc')
-rw-r--r--etc/init.rc11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/init.rc b/etc/init.rc
index 9b2a99143..554ed7a5d 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -1,6 +1,13 @@
import /init.recovery.${ro.hardware}.rc
on early-init
+ # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
+ write /sys/fs/selinux/checkreqprot 0
+
+ # Set the security context for the init process.
+ # This should occur before anything else (e.g. ueventd) is started.
+ setcon u:r:init:s0
+
start ueventd
start healthd
@@ -43,15 +50,19 @@ on property:sys.powerctl=*
service ueventd /sbin/ueventd
critical
+ seclabel u:r:ueventd:s0
service healthd /sbin/healthd -r
critical
+ seclabel u:r:healthd:s0
service recovery /sbin/recovery
+ seclabel u:r:recovery:s0
service adbd /sbin/adbd recovery
disabled
socket adbd stream 660 system system
+ seclabel u:r:adbd:s0
# Always start adbd on userdebug and eng builds
on property:ro.debuggable=1