mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 17:55:06 +00:00
Kernel+LibC: Implement a few mount flags
We now support these mount flags: * MS_NODEV: disallow opening any devices from this file system * MS_NOEXEC: disallow executing any executables from this file system * MS_NOSUID: ignore set-user-id bits on executables from this file system The fourth flag, MS_BIND, is defined, but currently ignored.
This commit is contained in:
parent
2fcbb846fb
commit
61c1106d9f
4 changed files with 19 additions and 5 deletions
|
@ -750,10 +750,12 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
|
|||
// Copy of the master TLS region that we will clone for new threads
|
||||
m_master_tls_region = master_tls_region;
|
||||
|
||||
if (metadata.is_setuid())
|
||||
m_euid = metadata.uid;
|
||||
if (metadata.is_setgid())
|
||||
m_egid = metadata.gid;
|
||||
if (!(description->custody()->mount_flags() & MS_NOSUID)) {
|
||||
if (metadata.is_setuid())
|
||||
m_euid = metadata.uid;
|
||||
if (metadata.is_setgid())
|
||||
m_egid = metadata.gid;
|
||||
}
|
||||
|
||||
current->set_default_signal_dispositions();
|
||||
current->m_signal_mask = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue