mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 18:31:13 +00:00
utmpupdate: Use pledge() and unveil()
This commit is contained in:
parent
dcd47655d0
commit
171bfcff36
Notes:
sideshowbarker
2024-07-19 02:53:21 +09:00
Author: https://github.com/awesomekling
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