summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorTom Cherry2018-08-01 16:02:35 -0500
committerGerrit Code Review2018-08-01 16:02:35 -0500
commit6e05552e357b97403ffa73d8feaf6431689d28a1 (patch)
tree42b18b935aa6e546f1dc12f8d02e37c930b9c7dc /init
parent10601fd5126590a8667a8ac9e98c0f3cbb56c435 (diff)
parent81ae07509d3b911915a63dddcd83ac2398dd9583 (diff)
downloadplatform-system-core-6e05552e357b97403ffa73d8feaf6431689d28a1.tar.gz
platform-system-core-6e05552e357b97403ffa73d8feaf6431689d28a1.tar.xz
platform-system-core-6e05552e357b97403ffa73d8feaf6431689d28a1.zip
Merge "init: run fsck for early mount partitions"
Diffstat (limited to 'init')
-rw-r--r--init/init.cpp4
-rw-r--r--init/selinux.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/init/init.cpp b/init/init.cpp
index 73194bdd9..7ad9ec396 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -670,6 +670,10 @@ int main(int argc, char** argv) {
670 CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8))); 670 CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8)));
671 CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9))); 671 CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9)));
672 672
673 // This is needed for log wrapper, which gets called before ueventd runs.
674 CHECKCALL(mknod("/dev/ptmx", S_IFCHR | 0666, makedev(5, 2)));
675 CHECKCALL(mknod("/dev/null", S_IFCHR | 0666, makedev(1, 3)));
676
673 // Mount staging areas for devices managed by vold 677 // Mount staging areas for devices managed by vold
674 // See storage config details at http://source.android.com/devices/storage/ 678 // See storage config details at http://source.android.com/devices/storage/
675 CHECKCALL(mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, 679 CHECKCALL(mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV,
diff --git a/init/selinux.cpp b/init/selinux.cpp
index 94f206ede..b788be9d6 100644
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -414,6 +414,8 @@ void SelinuxRestoreContext() {
414 if constexpr (WORLD_WRITABLE_KMSG) { 414 if constexpr (WORLD_WRITABLE_KMSG) {
415 selinux_android_restorecon("/dev/kmsg_debug", 0); 415 selinux_android_restorecon("/dev/kmsg_debug", 0);
416 } 416 }
417 selinux_android_restorecon("/dev/null", 0);
418 selinux_android_restorecon("/dev/ptmx", 0);
417 selinux_android_restorecon("/dev/socket", 0); 419 selinux_android_restorecon("/dev/socket", 0);
418 selinux_android_restorecon("/dev/random", 0); 420 selinux_android_restorecon("/dev/random", 0);
419 selinux_android_restorecon("/dev/urandom", 0); 421 selinux_android_restorecon("/dev/urandom", 0);