mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
committed by
Linus Groh
parent
c5b7c9f479
commit
1b36348d8b
Notes:
sideshowbarker
2024-07-17 09:56:35 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/1b36348d8b Pull-request: https://github.com/SerenityOS/serenity/pull/14673 Reviewed-by: https://github.com/linusg
@@ -322,7 +322,7 @@ Service::Service(Core::ConfigFile const& config, StringView name)
|
||||
|
||||
// Need i here to iterate along with all other vectors.
|
||||
for (unsigned i = 0; i < socket_paths.size(); i++) {
|
||||
String& path = socket_paths.at(i);
|
||||
auto const path = Core::Account::parse_path_with_uid(socket_paths.at(i), m_account.has_value() ? m_account.value().uid() : Optional<uid_t> {});
|
||||
|
||||
// Socket path (plus NUL) must fit into the structs sent to the Kernel.
|
||||
VERIFY(path.length() < UNIX_PATH_MAX);
|
||||
|
||||
Reference in New Issue
Block a user