mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
Kernel: Make mknod() respect the process umask
Otherwise the /bin/mknod command would create world-writable inodes by default (when run by superuser) which you probably don't want.
This commit is contained in:
parent
c7eb3ff1b3
commit
3f7de2713e
1 changed files with 1 additions and 1 deletions
|
@ -3483,7 +3483,7 @@ int Process::sys$mknod(const char* pathname, mode_t mode, dev_t dev)
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
return VFS::the().mknod(StringView(pathname), mode, dev, current_directory());
|
||||
return VFS::the().mknod(StringView(pathname), mode & ~umask(), dev, current_directory());
|
||||
}
|
||||
|
||||
int Process::sys$dump_backtrace()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue