mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +00:00
SystemServer: Don't rely on fstab to specify where to mount the ProcFS
For now, just hardcode the mounting in SystemServer code.
This commit is contained in:
parent
3d5ddbab74
commit
a7cb2ca1bf
2 changed files with 9 additions and 5 deletions
|
@ -9,5 +9,4 @@
|
||||||
/var /var bind bind,nodev,nosuid
|
/var /var bind bind,nodev,nosuid
|
||||||
/www /www bind bind,nodev,nosuid
|
/www /www bind bind,nodev,nosuid
|
||||||
|
|
||||||
none /proc proc nosuid
|
|
||||||
none /tmp tmp nodev,nosuid
|
none /tmp tmp nodev,nosuid
|
||||||
|
|
|
@ -323,10 +323,15 @@ static void populate_devfs()
|
||||||
umask(old_mask);
|
umask(old_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare_devfs()
|
static void prepare_synthetic_filesystems()
|
||||||
{
|
{
|
||||||
// FIXME: Find a better way to all of this stuff, without hardcoding all of this!
|
// FIXME: Find a better way to all of this stuff, without hardcoding all of this!
|
||||||
int rc = mount(-1, "/sys", "sys", 0);
|
int rc = mount(-1, "/proc", "proc", MS_NOSUID);
|
||||||
|
if (rc != 0) {
|
||||||
|
VERIFY_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = mount(-1, "/sys", "sys", 0);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
@ -445,14 +450,14 @@ static void create_tmp_coredump_directory()
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
prepare_devfs();
|
mount_all_filesystems();
|
||||||
|
prepare_synthetic_filesystems();
|
||||||
|
|
||||||
if (pledge("stdio proc exec tty accept unix rpath wpath cpath chown fattr id sigaction", nullptr) < 0) {
|
if (pledge("stdio proc exec tty accept unix rpath wpath cpath chown fattr id sigaction", nullptr) < 0) {
|
||||||
perror("pledge");
|
perror("pledge");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mount_all_filesystems();
|
|
||||||
create_tmp_coredump_directory();
|
create_tmp_coredump_directory();
|
||||||
parse_boot_mode();
|
parse_boot_mode();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue