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

LibCore: Make LocalServer aware of %uid in path

This commit is contained in:
Lucas CHOLLET 2022-07-24 17:44:15 +02:00 committed by Linus Groh
parent 9cfd1b1a67
commit 26e85dabb0

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/Account.h>
#include <LibCore/LocalServer.h>
#include <LibCore/Notifier.h>
#include <LibCore/Stream.h>
@ -37,7 +38,8 @@ ErrorOr<void> LocalServer::take_over_from_system_server(String const& socket_pat
if (m_listening)
return Error::from_string_literal("Core::LocalServer: Can't perform socket takeover when already listening");
auto socket = TRY(take_over_socket_from_system_server(socket_path));
auto const parsed_path = Core::Account::parse_path_with_uid(socket_path);
auto socket = TRY(take_over_socket_from_system_server(parsed_path));
m_fd = TRY(socket->release_fd());
m_listening = true;