diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2012-08-08 13:42:20 -0700 |
|---|---|---|
| committer | android code review <noreply-gerritcodereview@google.com> | 2012-08-08 13:42:20 -0700 |
| commit | ef3f7fa32b451bd6f180c4c1586a98cee41aa296 (patch) | |
| tree | fe2f59ac3da17fb714f345541c77fa621586afbe /init/init.c | |
| parent | 8261d27115746f58a6bbf37e6dcf18a093ee8c85 (diff) | |
| parent | e096e36e50b4b66638ebc4d3c09c2ee35f538dfa (diff) | |
| download | system_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-x | init/init.c | 6 |
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"); |
