mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
su: Drop "id" pledge after switching user
This commit is contained in:
parent
2ab9083420
commit
bfce0fccde
1 changed files with 5 additions and 0 deletions
|
@ -95,6 +95,11 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pledge("stdio exec", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
execl(account.shell().characters(), account.shell().characters(), nullptr);
|
execl(account.shell().characters(), account.shell().characters(), nullptr);
|
||||||
perror("execl");
|
perror("execl");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue