mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
LookupServer: Use pledge()
This commit is contained in:
parent
1915151116
commit
10c1f27b7a
Notes:
sideshowbarker
2024-07-19 10:06:04 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/10c1f27b7ab Pull-request: https://github.com/SerenityOS/serenity/pull/1066 Reviewed-by: https://github.com/bugaevc
1 changed files with 11 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue