From 4c47b3951d5c8839e6b74674001579717fd66a5f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Jun 2021 17:52:15 +0200 Subject: Clipboard: Tighten pledge promises a bit earlier :^) --- Userland/Services/Clipboard/main.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Userland/Services/Clipboard/main.cpp') diff --git a/Userland/Services/Clipboard/main.cpp b/Userland/Services/Clipboard/main.cpp index 6afb6ad421..2b56915182 100644 --- a/Userland/Services/Clipboard/main.cpp +++ b/Userland/Services/Clipboard/main.cpp @@ -12,7 +12,7 @@ int main(int, char**) { - if (pledge("stdio recvfd sendfd accept unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd accept", nullptr) < 0) { perror("pledge"); return 1; } @@ -26,11 +26,6 @@ int main(int, char**) bool ok = server->take_over_from_system_server(); VERIFY(ok); - if (pledge("stdio recvfd sendfd accept", nullptr) < 0) { - perror("pledge"); - return 1; - } - server->on_ready_to_accept = [&] { auto client_socket = server->accept(); if (!client_socket) { -- cgit v1.2.3