mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
SystemServer: Re-mount / as non-writable, nosuid and nodev
This is a preparation before we remove the default root mount flags from the kernel code.
This commit is contained in:
parent
328a64fbdc
commit
73bc856c16
1 changed files with 4 additions and 0 deletions
|
@ -386,6 +386,10 @@ static ErrorOr<void> populate_devtmpfs()
|
|||
|
||||
static ErrorOr<void> prepare_synthetic_filesystems()
|
||||
{
|
||||
// FIXME: Don't hardcode the fs type as the ext2 filesystem and once there's
|
||||
// more than this filesystem implementation (which is suitable for usage on
|
||||
// physical storage), find a way to detect it.
|
||||
TRY(Core::System::mount(-1, "/"sv, "ext2"sv, MS_REMOUNT | MS_NODEV | MS_NOSUID | MS_RDONLY));
|
||||
// FIXME: Find a better way to all of this stuff, without hardcoding all of this!
|
||||
TRY(Core::System::mount(-1, "/proc"sv, "proc"sv, MS_NOSUID));
|
||||
TRY(Core::System::mount(-1, "/sys"sv, "sys"sv, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue