1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

Userland: Tighten a *lot* of pledges! :^)

Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
This commit is contained in:
Andreas Kling 2021-05-13 23:20:26 +02:00
parent 04d78adaf7
commit 31d4bcf5bf
59 changed files with 97 additions and 163 deletions

View file

@ -24,7 +24,7 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -46,7 +46,7 @@ int main(int argc, char** argv)
config->sync();
if (pledge("stdio rpath recvfd sendfd wpath cpath accept", nullptr) < 0) {
if (pledge("stdio rpath recvfd sendfd wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -15,7 +15,7 @@
int main(int argc, char** argv)
{
if (pledge("stdio recvfd sendfd rpath wpath cpath accept unix fattr", nullptr) < 0) {
if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -28,7 +28,7 @@ int main(int argc, char** argv)
RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Chess");
if (pledge("stdio rpath accept wpath cpath recvfd sendfd thread proc exec", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -15,14 +15,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd cpath unix", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio rpath recvfd sendfd accept", nullptr) < 0) {
if (pledge("stdio rpath recvfd sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -21,14 +21,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath accept wpath cpath recvfd sendfd unix fattr", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio rpath accept wpath cpath recvfd sendfd", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -16,14 +16,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd cpath unix", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio rpath wpath cpath recvfd sendfd accept", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -19,14 +19,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio rpath wpath cpath recvfd sendfd accept", nullptr) < 0) {
if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}