mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
useradd: Use pledge()
This commit is contained in:
parent
eeffdb9725
commit
eece9edd91
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue