mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
Kernel+Userland: Add mount MS_SRCHIDDEN option
Either we mount from a loop device or other source, the user might want to obfuscate the given source for security reasons, so this option will ensure this will happen. If passed during a mount, the source will be hidden when reading from the /sys/kernel/df node.
This commit is contained in:
parent
0739b5df11
commit
0734de9f9a
3 changed files with 21 additions and 11 deletions
|
@ -43,6 +43,8 @@ static int parse_options(StringView options)
|
|||
flags |= MS_AXALLOWED;
|
||||
else if (part == "noregular")
|
||||
flags |= MS_NOREGULAR;
|
||||
else if (part == "srchidden")
|
||||
flags |= MS_SRCHIDDEN;
|
||||
else
|
||||
warnln("Ignoring invalid option: {}", part);
|
||||
}
|
||||
|
@ -181,6 +183,8 @@ static ErrorOr<void> print_mounts()
|
|||
out(",nodev");
|
||||
if (mount_flags & MS_NOREGULAR)
|
||||
out(",noregular");
|
||||
if (mount_flags & MS_SRCHIDDEN)
|
||||
out(",srcobfuscate");
|
||||
if (mount_flags & MS_NOEXEC)
|
||||
out(",noexec");
|
||||
if (mount_flags & MS_NOSUID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue