From 99eaeedf4ebdf1334f940118214164c3f2b04275 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 16 Dec 2021 19:32:01 +0100 Subject: [PATCH] usermod: Use LibCore syscall wrapper for setegid() --- Userland/Utilities/usermod.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Userland/Utilities/usermod.cpp b/Userland/Utilities/usermod.cpp index 2b4a121407..b9d91e4ece 100644 --- a/Userland/Utilities/usermod.cpp +++ b/Userland/Utilities/usermod.cpp @@ -21,10 +21,7 @@ ErrorOr serenity_main(Main::Arguments arguments) return 1; } - if (setegid(0) < 0) { - perror("setegid"); - return 1; - } + TRY(Core::System::setegid(0)); TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty")); TRY(Core::System::unveil("/etc", "rwc"));