From 323c403d43f4ceba2d7275cd0d47c8187b07af5b Mon Sep 17 00:00:00 2001 From: ne0ndrag0n Date: Fri, 14 Oct 2022 21:05:48 -0400 Subject: [PATCH] NetworkSettings+SpiceAgent: Update and add required unveil paths --- Userland/Applications/NetworkSettings/main.cpp | 3 ++- Userland/Services/SpiceAgent/ConnectionToClipboardServer.h | 2 +- Userland/Services/SpiceAgent/main.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/NetworkSettings/main.cpp b/Userland/Applications/NetworkSettings/main.cpp index b6fb09d7213..f09c388b80f 100644 --- a/Userland/Applications/NetworkSettings/main.cpp +++ b/Userland/Applications/NetworkSettings/main.cpp @@ -21,9 +21,10 @@ ErrorOr serenity_main(Main::Arguments args) TRY(Core::System::unveil("/bin/NetworkServer", "x")); TRY(Core::System::unveil("/etc/Network.ini", "rwc")); + TRY(Core::System::unveil("/proc/all", "r")); TRY(Core::System::unveil("/proc/net/adapters", "r")); TRY(Core::System::unveil("/res", "r")); - TRY(Core::System::unveil("/tmp/portal/clipboard", "rw")); + TRY(Core::System::unveil("/tmp/session/%sid/portal/clipboard", "rw")); TRY(Core::System::unveil("/tmp/portal/window", "rw")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Services/SpiceAgent/ConnectionToClipboardServer.h b/Userland/Services/SpiceAgent/ConnectionToClipboardServer.h index d553ca7195f..b10cc39b294 100644 --- a/Userland/Services/SpiceAgent/ConnectionToClipboardServer.h +++ b/Userland/Services/SpiceAgent/ConnectionToClipboardServer.h @@ -15,7 +15,7 @@ class ConnectionToClipboardServer final : public IPC::ConnectionToServer , public ClipboardClientEndpoint { - IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/portal/clipboard"sv) + IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/session/%sid/portal/clipboard"sv) public: Function on_data_changed; diff --git a/Userland/Services/SpiceAgent/main.cpp b/Userland/Services/SpiceAgent/main.cpp index 3527bd495e7..890cc1ef2e9 100644 --- a/Userland/Services/SpiceAgent/main.cpp +++ b/Userland/Services/SpiceAgent/main.cpp @@ -18,7 +18,7 @@ ErrorOr serenity_main(Main::Arguments) TRY(Core::System::pledge("unix rpath wpath stdio sendfd recvfd")); TRY(Core::System::unveil(SPICE_DEVICE, "rw"sv)); - TRY(Core::System::unveil("/tmp/portal/clipboard", "rw")); + TRY(Core::System::unveil("/tmp/session/%sid/portal/clipboard", "rw")); TRY(Core::System::unveil(nullptr, nullptr)); int serial_port_fd = TRY(Core::System::open(SPICE_DEVICE, O_RDWR));