1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

useradd: Use pledge()

This commit is contained in:
Brendan Coles 2021-01-12 06:37:40 +00:00 committed by Andreas Kling
parent eeffdb9725
commit eece9edd91

View file

@ -39,6 +39,11 @@ constexpr const char* DEFAULT_SHELL = "/bin/Shell";
int main(int argc, char** argv)
{
if (pledge("stdio wpath rpath cpath chown", nullptr) < 0) {
perror("pledge");
return 1;
}
const char* home_path = nullptr;
int uid = 0;
int gid = USERS_GID;