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

LibCore+LibIPC: Recognise %uid in path

This patch allows to insert "%uid" in `IPC_CLIENT_CONNECTION`
declaration and in SystemServer's ini files. This pattern is replaced
then replaced by the UID of the owner of the service. It opens a path
for seamlessly managed, per-user portal.
This commit is contained in:
Lucas CHOLLET 2022-07-19 21:01:04 +02:00 committed by Linus Groh
parent c5b7c9f479
commit 1b36348d8b
21 changed files with 33 additions and 21 deletions

View file

@ -16,7 +16,7 @@ namespace GUI {
class ConnectionToClipboardServer final
: public IPC::ConnectionToServer<ClipboardClientEndpoint, ClipboardServerEndpoint>
, public ClipboardClientEndpoint {
IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/portal/clipboard")
IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/portal/clipboard"sv)
private:
ConnectionToClipboardServer(NonnullOwnPtr<Core::Stream::LocalSocket> socket)

View file

@ -16,7 +16,7 @@ namespace GUI {
class ConnectionToWindowManagerServer final
: public IPC::ConnectionToServer<WindowManagerClientEndpoint, WindowManagerServerEndpoint>
, public WindowManagerClientEndpoint {
IPC_CLIENT_CONNECTION(ConnectionToWindowManagerServer, "/tmp/portal/wm")
IPC_CLIENT_CONNECTION(ConnectionToWindowManagerServer, "/tmp/portal/wm"sv)
public:
static ConnectionToWindowManagerServer& the();

View file

@ -16,7 +16,7 @@ namespace GUI {
class ConnectionToWindowServer final
: public IPC::ConnectionToServer<WindowClientEndpoint, WindowServerEndpoint>
, public WindowClientEndpoint {
IPC_CLIENT_CONNECTION(ConnectionToWindowServer, "/tmp/portal/window")
IPC_CLIENT_CONNECTION(ConnectionToWindowServer, "/tmp/portal/window"sv)
public:
static ConnectionToWindowServer& the();
i32 expose_client_id() { return m_client_id; }

View file

@ -15,7 +15,7 @@ namespace GUI {
class ConnectionToNotificationServer final
: public IPC::ConnectionToServer<NotificationClientEndpoint, NotificationServerEndpoint>
, public NotificationClientEndpoint {
IPC_CLIENT_CONNECTION(ConnectionToNotificationServer, "/tmp/portal/notify")
IPC_CLIENT_CONNECTION(ConnectionToNotificationServer, "/tmp/portal/notify"sv)
friend class Notification;