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

utmpupdate: Use pledge() and unveil()

This commit is contained in:
Andreas Kling 2020-09-06 16:14:27 +02:00
parent dcd47655d0
commit 171bfcff36

View file

@ -9,6 +9,18 @@
int main(int argc, char** argv)
{
if (pledge("stdio wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}
if (unveil("/var/run/utmp", "rwc") < 0) {
perror("unveil");
return 1;
}
unveil(nullptr, nullptr);
pid_t pid = 0;
bool flag_create = false;
bool flag_delete = false;