mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Applications: Use pledge and unveil
This commit is contained in:
parent
9efcb5d290
commit
ed5469c1c2
5 changed files with 84 additions and 7 deletions
|
@ -40,6 +40,18 @@
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char* filename = nullptr;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
@ -54,13 +66,6 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (unveil("/tmp/portal/webcontent", "rw") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue