mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LookupServer: Check the return value after calling unveil()
This commit is contained in:
parent
a7e44d8b3c
commit
f0629e29c9
1 changed files with 9 additions and 2 deletions
|
@ -25,8 +25,15 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unveil("/proc/net/adapters", "r");
|
if (unveil("/proc/net/adapters", "r") < 0) {
|
||||||
unveil(nullptr, nullptr);
|
perror("unveil");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unveil(nullptr, nullptr) < 0) {
|
||||||
|
perror("unveil");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return event_loop.exec();
|
return event_loop.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue