From 411c696057519e16df1b944d8193ed3cc46697f5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 16 Dec 2021 19:32:23 +0100 Subject: [PATCH] passwd: Use LibCore syscall wrapper for setegid() --- Userland/Utilities/passwd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Userland/Utilities/passwd.cpp b/Userland/Utilities/passwd.cpp index 0b0c76e052..0ee194af8d 100644 --- a/Userland/Utilities/passwd.cpp +++ b/Userland/Utilities/passwd.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"));