diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-21 16:35:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-21 16:35:03 +0200 |
commit | 8997c6a4d1f1047e53d640982568e1e45ed8f171 (patch) | |
tree | ab4ce0fd48cc69947772d08ba17688fd58bcaa33 /Kernel/Net/LocalSocket.cpp | |
parent | 51318d51a4836753ea61e595c8e845858569ddc4 (diff) | |
download | serenity-8997c6a4d1f1047e53d640982568e1e45ed8f171.zip |
Kernel: Make Socket::connect() take credentials as input
Diffstat (limited to 'Kernel/Net/LocalSocket.cpp')
-rw-r--r-- | Kernel/Net/LocalSocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp index 9415bb7ab1..d5820aad41 100644 --- a/Kernel/Net/LocalSocket.cpp +++ b/Kernel/Net/LocalSocket.cpp @@ -160,7 +160,7 @@ ErrorOr<void> LocalSocket::bind(Credentials const& credentials, Userspace<sockad return {}; } -ErrorOr<void> LocalSocket::connect(OpenFileDescription& description, Userspace<sockaddr const*> user_address, socklen_t address_size) +ErrorOr<void> LocalSocket::connect(Credentials const& credentials, OpenFileDescription& description, Userspace<sockaddr const*> user_address, socklen_t address_size) { VERIFY(!m_bound); @@ -179,7 +179,7 @@ ErrorOr<void> LocalSocket::connect(OpenFileDescription& description, Userspace<s auto path = SOCKET_TRY(KString::try_create(StringView { address.sun_path, strnlen(address.sun_path, sizeof(address.sun_path)) })); dbgln_if(LOCAL_SOCKET_DEBUG, "LocalSocket({}) connect({})", this, *path); - auto file = SOCKET_TRY(VirtualFileSystem::the().open(Process::current().credentials(), path->view(), O_RDWR, 0, Process::current().current_directory())); + auto file = SOCKET_TRY(VirtualFileSystem::the().open(credentials, path->view(), O_RDWR, 0, Process::current().current_directory())); auto inode = file->inode(); m_inode = inode; |