aboutsummaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-08-08 13:42:20 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-08-08 13:42:20 -0700
commitef3f7fa32b451bd6f180c4c1586a98cee41aa296 (patch)
treefe2f59ac3da17fb714f345541c77fa621586afbe /init/init.c
parent8261d27115746f58a6bbf37e6dcf18a093ee8c85 (diff)
parente096e36e50b4b66638ebc4d3c09c2ee35f538dfa (diff)
downloadsystem_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.tar.gz
system_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.tar.bz2
system_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.zip
Merge "Set the SELinux security label on new directories."
Diffstat (limited to 'init/init.c')
-rwxr-xr-xinit/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 4f571443..cc98afcf 100755
--- a/init/init.c
+++ b/init/init.c
@@ -901,6 +901,12 @@ int main(int argc, char **argv)
#ifdef HAVE_SELINUX
INFO("loading selinux policy\n");
selinux_load_policy();
+ /* These directories were necessarily created before policy load
+ * and therefore need their security context restored to the proper value.
+ * This must happen before /dev is populated by ueventd.
+ */
+ restorecon("/dev");
+ restorecon("/dev/socket");
#endif
is_charger = !strcmp(bootmode, "charger");