mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Kernel: Make Socket::connect() take credentials as input
This commit is contained in:
parent
51318d51a4
commit
8997c6a4d1
6 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue