Kernel: Add support for SCM_CREDENTIALS and fix recvmsg

recvmsg was broken when receiving into more than a single iovec
This commit is contained in:
2025-11-18 02:51:28 +02:00
parent b8a2573bb4
commit d60f12d3b8
3 changed files with 163 additions and 47 deletions

View File

@@ -42,8 +42,6 @@ namespace Kernel
UnixDomainSocket(Socket::Type, const Socket::Info&);
~UnixDomainSocket();
BAN::ErrorOr<void> add_packet(const msghdr&, size_t total_size, BAN::Vector<FDWrapper>&& fds_to_send);
bool is_bound() const { return !m_bound_file.canonical_path.empty(); }
bool is_bound_to_unused() const { return !m_bound_file.inode; }
@@ -70,8 +68,11 @@ namespace Kernel
{
size_t size;
BAN::Vector<FDWrapper> fds;
BAN::Optional<struct ucred> ucred;
};
BAN::ErrorOr<void> add_packet(const msghdr&, PacketInfo&&);
private:
const Socket::Type m_socket_type;
VirtualFileSystem::File m_bound_file;