diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-16 19:32:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-16 22:48:17 +0100 |
commit | 411c696057519e16df1b944d8193ed3cc46697f5 (patch) | |
tree | 3dd759d5f95d18e3f198194e4d9e06f0938350a7 /Userland/Utilities/passwd.cpp | |
parent | 99eaeedf4ebdf1334f940118214164c3f2b04275 (diff) | |
download | serenity-411c696057519e16df1b944d8193ed3cc46697f5.zip |
passwd: Use LibCore syscall wrapper for setegid()
Diffstat (limited to 'Userland/Utilities/passwd.cpp')
-rw-r--r-- | Userland/Utilities/passwd.cpp | 5 |
1 files changed, 1 insertions, 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<int> 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")); |