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:
parent
dcd47655d0
commit
171bfcff36
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue