bytecodealliance / bytecodealliance/rustix

Peer credentials API for Mac and FreeBSD

Open
#1,533 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
294
Avg merge
4h 7m
Merged PRs (30d)
2

Description

Currently, the `rustix::net::sockopt::socket_peercred` is Linux-specific only. The [PR that added the API](https://github.com/bytecodealliance/rustix/pull/851), 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`? 🤔

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.