mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
Kernel: Use Process::credentials() and remove user ID/group ID helpers
Move away from using the group ID/user ID helpers in the process to allow for us to take advantage of the immutable credentials instead.
This commit is contained in:
parent
8026d8926c
commit
f86b671de2
Notes:
sideshowbarker
2024-07-17 08:05:08 +09:00
Author: https://github.com/AnthonyIacono 🔰
Commit: f86b671de2
Pull-request: https://github.com/SerenityOS/serenity/pull/14944
27 changed files with 109 additions and 94 deletions
|
@ -62,7 +62,8 @@ ErrorOr<void> InodeFile::ioctl(OpenFileDescription& description, unsigned reques
|
|||
{
|
||||
switch (request) {
|
||||
case FIBMAP: {
|
||||
if (!Process::current().is_superuser())
|
||||
auto current_process_credentials = Process::current().credentials();
|
||||
if (!current_process_credentials->is_superuser())
|
||||
return EPERM;
|
||||
|
||||
auto user_block_number = static_ptr_cast<int*>(arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue