1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 03:07:34 +00:00

Everywhere: Pledge "sendfd" in WindowServer client programs

This is needed for the new way we transfer window backing stores.
This commit is contained in:
Andreas Kling 2021-01-15 12:14:42 +01:00
parent 0b0514d46b
commit 20915795a8
49 changed files with 98 additions and 98 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -73,7 +73,7 @@ static String build_backtrace(const CoreDump::Reader& coredump)
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer accept cpath rpath unix fattr", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept cpath rpath unix fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -105,7 +105,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio shared_buffer accept rpath unix", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept rpath unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

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

View file

@ -80,7 +80,7 @@ static void show_properties(const String& container_dir_path, const String& path
int main(int argc, char** argv)
{
if (pledge("stdio thread shared_buffer accept unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) {
if (pledge("stdio thread sendfd shared_buffer accept unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -99,7 +99,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio thread shared_buffer accept cpath rpath wpath fattr proc exec unix", nullptr) < 0) {
if (pledge("stdio thread sendfd shared_buffer accept cpath rpath wpath fattr proc exec unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

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

View file

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

View file

@ -31,14 +31,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) {
if (pledge("stdio sendfd 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 shared_buffer accept rpath cpath wpath thread", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept rpath cpath wpath thread", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -33,7 +33,7 @@
int main(int argc, char** argv)
{
if (pledge("stdio inet dns unix shared_buffer cpath rpath fattr wpath cpath", nullptr) < 0) {
if (pledge("stdio inet dns unix sendfd shared_buffer cpath rpath fattr wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -45,7 +45,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio inet dns unix shared_buffer rpath wpath cpath", nullptr) < 0) {
if (pledge("stdio inet dns unix sendfd shared_buffer rpath wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -40,14 +40,14 @@ int main(int argc, char** argv)
args_parser.add_positional_argument(path, "Keyboard character mapping file.", "file", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio thread rpath accept cpath wpath shared_buffer", nullptr) < 0) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -45,7 +45,7 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath accept cpath wpath shared_buffer unix fattr proc exec", nullptr) < 0) {
if (pledge("stdio rpath accept cpath wpath sendfd shared_buffer unix fattr proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -53,7 +53,7 @@ int main(int argc, char** argv)
// If there is no command line parameter go for GUI.
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio rpath accept shared_buffer proc exec", nullptr) < 0) {
if (pledge("stdio rpath accept sendfd shared_buffer proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

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

View file

@ -44,14 +44,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", 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) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

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

View file

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

View file

@ -37,14 +37,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer accept rpath thread unix cpath fattr", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept rpath thread unix cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio shared_buffer accept rpath thread unix", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept rpath thread unix", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -52,7 +52,7 @@ int main(int argc, char** argv)
auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake();
if (pledge("stdio shared_buffer accept rpath thread", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer accept rpath thread", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -41,14 +41,14 @@
int main(int argc, char* argv[])
{
if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) {
if (pledge("stdio sendfd 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) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -105,14 +105,14 @@ static bool can_access_pid(pid_t pid)
int main(int argc, char** argv)
{
if (pledge("stdio proc shared_buffer accept rpath exec unix cpath fattr", nullptr) < 0) {
if (pledge("stdio proc sendfd shared_buffer accept rpath exec unix cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio proc shared_buffer accept rpath exec", nullptr) < 0) {
if (pledge("stdio proc sendfd shared_buffer accept rpath exec", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -303,7 +303,7 @@ static RefPtr<GUI::Window> create_find_window(TerminalWidget& terminal)
int main(int argc, char** argv)
{
if (pledge("stdio tty rpath accept cpath wpath shared_buffer proc exec unix fattr sigaction", nullptr) < 0) {
if (pledge("stdio tty rpath accept cpath wpath sendfd shared_buffer proc exec unix fattr sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
@ -320,7 +320,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio tty rpath accept cpath wpath shared_buffer proc exec unix", nullptr) < 0) {
if (pledge("stdio tty rpath accept cpath wpath sendfd shared_buffer proc exec unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

@ -31,14 +31,14 @@
int main(int argc, char** argv)
{
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", 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) {
if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) {
perror("pledge");
return 1;
}

View file

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

View file

@ -113,14 +113,14 @@ static Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer rpath unix cpath fattr", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer rpath unix cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio shared_buffer rpath", nullptr) < 0) {
if (pledge("stdio sendfd shared_buffer rpath", nullptr) < 0) {
perror("pledge");
return 1;
}