Base: Launch Request at session start-up

This commit is contained in:
Lucas CHOLLET 2022-07-24 15:11:06 +02:00 committed by Linus Groh
parent 07e89ad538
commit 266e18e0b6
5 changed files with 12 additions and 13 deletions

View file

@ -1,13 +1,3 @@
[RequestServer]
Socket=/tmp/portal/request
SocketPermissions=600
Lazy=true
Priority=low
User=anon
SystemModes=text,graphical
MultiInstance=true
AcceptSocketConnections=true
[FileSystemAccessServer]
Socket=/tmp/portal/filesystemaccess
SocketPermissions=660

View file

@ -2,6 +2,15 @@
Socket=/tmp/user/%uid/portal/config
SocketPermissions=600
[RequestServer]
Socket=/tmp/user/%uid/portal/request
SocketPermissions=600
Lazy=true
Priority=low
SystemModes=text,graphical
MultiInstance=true
AcceptSocketConnections=true
[LaunchServer]
Socket=/tmp/user/%uid/portal/launch
SocketPermissions=600

View file

@ -87,7 +87,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/request", "rw"));
TRY(Core::System::unveil("/bin/BrowserSettings", "x"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -20,7 +20,7 @@ class Request;
class RequestClient final
: public IPC::ConnectionToServer<RequestClientEndpoint, RequestServerEndpoint>
, public RequestClientEndpoint {
IPC_CLIENT_CONNECTION(RequestClient, "/tmp/portal/request"sv)
IPC_CLIENT_CONNECTION(RequestClient, "/tmp/user/%uid/portal/request"sv)
public:
template<typename RequestHashMapTraits = Traits<String>>

View file

@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::pledge("stdio recvfd sendfd accept unix rpath"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/etc/timezone", "r"));
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/request", "rw"));
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
TRY(Core::System::unveil("/tmp/portal/websocket", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));