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/TTY/MasterPTY.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/TTY/MasterPTY.cpp')
-rw-r--r-- | Kernel/TTY/MasterPTY.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index c286a1765c..195b62b33b 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -33,8 +33,9 @@ MasterPTY::MasterPTY(unsigned index, NonnullOwnPtr<DoubleBuffer> buffer) , m_buffer(move(buffer)) { auto& process = Process::current(); - set_uid(process.uid()); - set_gid(process.gid()); + auto credentials = process.credentials(); + set_uid(credentials->uid()); + set_gid(credentials->gid()); m_buffer->set_unblock_callback([this]() { if (m_slave) |