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"));