LookupServer: Check the return value after calling unveil()

This commit is contained in:
Andreas Kling 2021-05-06 13:34:36 +02:00
commit f0629e29c9
Notes: sideshowbarker 2024-07-18 18:38:54 +09:00

View file

@ -25,8 +25,15 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
return 1;
}
unveil("/proc/net/adapters", "r");
unveil(nullptr, nullptr);
if (unveil("/proc/net/adapters", "r") < 0) {
perror("unveil");
return 1;
}
if (unveil(nullptr, nullptr) < 0) {
perror("unveil");
return 1;
}
return event_loop.exec();
}