1. seandroid
  2. Untitled project
  3. bootable/recovery


Nick Kralevich  committed fc72951 Merge

Merge "Set SELinux security contexts correctly for init and services."

  • Participants
  • Parent commits 617d1ca, 2c9d5b2
  • Branches master

Comments (0)

Files changed (1)

File etc/init.rc

View file
  • Ignore whitespace
 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
 service ueventd /sbin/ueventd
+    seclabel u:r:ueventd:s0
 service healthd /sbin/healthd -n
+    seclabel u:r:healthd:s0
 service recovery /sbin/recovery
+    seclabel u:r:recovery:s0
 service adbd /sbin/adbd recovery
     socket adbd stream 660 system system
+    seclabel u:r:adbd:s0
 # Always start adbd on userdebug and eng builds
 on property:ro.debuggable=1