diff options
author | Anthony Iacono <anthonyiacono@gmail.com> | 2022-08-20 18:21:01 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-22 12:46:32 +0200 |
commit | f86b671de23a7eb76e8ddb3460369c053f726384 (patch) | |
tree | 59fb1eddeb2cbcae124c31503ab8c10b3be5dd34 /Kernel/Thread.cpp | |
parent | 8026d8926c703b819ce8384d7abc7fe4dfc42d2b (diff) | |
download | serenity-f86b671de23a7eb76e8ddb3460369c053f726384.zip |
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.
Diffstat (limited to 'Kernel/Thread.cpp')
-rw-r--r-- | Kernel/Thread.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 91b38eb34f..fc4ae0b549 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -1131,7 +1131,7 @@ DispatchSignalResult Thread::dispatch_signal(u8 signal) // Set for SI_TIMER, we don't have the data here. .si_errno = 0, .si_pid = sender_pid.value(), - .si_uid = sender ? sender->uid().value() : 0, + .si_uid = sender ? sender->credentials()->uid().value() : 0, // Set for SIGILL, SIGFPE, SIGSEGV and SIGBUS // FIXME: We don't generate these signals in a way that can be handled. .si_addr = 0, @@ -1346,7 +1346,8 @@ static ErrorOr<bool> symbolicate(RecognizedSymbol const& symbol, Process& proces if (symbol.address == 0) return false; - bool mask_kernel_addresses = !process.is_superuser(); + auto credentials = process.credentials(); + bool mask_kernel_addresses = !credentials->is_superuser(); if (!symbol.symbol) { if (!Memory::is_user_address(VirtualAddress(symbol.address))) { TRY(builder.try_append("0xdeadc0de\n"sv)); |