1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +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:
Anthony Iacono 2022-08-20 18:21:01 -04:00 committed by Andreas Kling
parent 8026d8926c
commit f86b671de2
27 changed files with 109 additions and 94 deletions

View file

@ -235,13 +235,6 @@ public:
NonnullRefPtr<Credentials> credentials() const;
UserID euid() const;
GroupID egid() const;
UserID uid() const;
GroupID gid() const;
UserID suid() const;
GroupID sgid() const;
bool is_dumpable() const
{
return with_protected_data([](auto& protected_data) { return protected_data.dumpable; });
@ -476,8 +469,6 @@ public:
ErrorOr<LoadResult> load(NonnullLockRefPtr<OpenFileDescription> main_program_description, LockRefPtr<OpenFileDescription> interpreter_description, const ElfW(Ehdr) & main_program_header);
bool is_superuser() const { return euid() == 0; }
void terminate_due_to_signal(u8 signal);
ErrorOr<void> send_signal(u8 signal, Process* sender);