1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

su: Drop "id" pledge after switching user

This commit is contained in:
Andreas Kling 2021-01-22 19:40:30 +01:00
parent 2ab9083420
commit bfce0fccde

View file

@ -95,6 +95,11 @@ int main(int argc, char** argv)
return 1;
}
if (pledge("stdio exec", nullptr) < 0) {
perror("pledge");
return 1;
}
execl(account.shell().characters(), account.shell().characters(), nullptr);
perror("execl");
return 1;