LookupServer: Use pledge()

This commit is contained in:
Brian Gianforcaro 2020-01-12 16:46:03 -08:00 committed by Andreas Kling
parent 1915151116
commit 10c1f27b7a
Notes: sideshowbarker 2024-07-19 10:06:04 +09:00

View file

@ -1,13 +1,24 @@
#include "LookupServer.h"
#include <LibCore/CEventLoop.h>
#include <stdio.h>
int main(int argc, char** argv)
{
(void)argc;
(void)argv;
if (pledge("stdio unix inet cpath rpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
CEventLoop event_loop;
LookupServer server;
if (pledge("stdio unix inet", nullptr) < 0) {
perror("pledge");
return 1;
}
return event_loop.exec();
}