Skip to content

Peer credentials API for Mac and FreeBSD #1533

@zeenix

Description

@zeenix

Currently, the rustix::net::sockopt::socket_peercred is Linux-specific only. The PR that added the API, had pointers to the API used on other platforms but I didn't find any issues regarding this, so opening this issue.

I am not sure what the API would look like though? Ideally we should just make socket_peercred work on those platforms but getpeereid doesn't give you the PID. Perhaps the solution would be to just add a #[cfg(target_os = "linux")] to rustix::net::UCred::pid but then what about rustix::net::SendAncillaryMessage::ScmCredentials? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions