summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-04-24 17:37:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-24 17:37:42 +0000
commitd6069e21ee5c6941844b31b29732f9ccb84304b5 (patch)
tree063ed69dea89da8c64e46d1d4aeb4e40c0e31758 /rootdir
parente203d278e4f6949d0cbb0443ae873454376f6369 (diff)
parentb706a8acff9c62da7b4045374b93a8739671a8a0 (diff)
downloadsystem_core-d6069e21ee5c6941844b31b29732f9ccb84304b5.tar.gz
system_core-d6069e21ee5c6941844b31b29732f9ccb84304b5.tar.bz2
system_core-d6069e21ee5c6941844b31b29732f9ccb84304b5.zip
am b706a8ac: am 2db3cd3e: am 46fee19c: Merge "Revert "Make init re-exec itself for its SELinux domain transition.""
* commit 'b706a8acff9c62da7b4045374b93a8739671a8a0': Revert "Make init re-exec itself for its SELinux domain transition."
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index bdcaee482..c8818f3fe 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -14,6 +14,13 @@ on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_score_adj -1000
+ # 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
+
# Set the security context of /adb_keys if present.
restorecon /adb_keys