From 619ac653025d96916c310417fdf89b6add30875a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 20 Aug 2022 22:41:49 +0200 Subject: [PATCH] Kernel: Get GID from credentials object in sys$setgroups() I missed one instance of these. Thanks Anthony Iacono for spotting it! --- Kernel/Syscalls/setuid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/setuid.cpp b/Kernel/Syscalls/setuid.cpp index 53200d5d19..2039df0839 100644 --- a/Kernel/Syscalls/setuid.cpp +++ b/Kernel/Syscalls/setuid.cpp @@ -274,7 +274,7 @@ ErrorOr Process::sys$setgroups(size_t count, Userspace HashTable unique_extra_gids; for (auto& extra_gid : new_extra_gids) { - if (extra_gid != gid()) + if (extra_gid != credentials->gid()) TRY(unique_extra_gids.try_set(extra_gid)); }