mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user