about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorJohn Millikin <john@john-millikin.com>2023-10-25 17:01:21 +0900
committerJohn Millikin <john@john-millikin.com>2023-10-25 17:01:21 +0900
commit93f2f2c8ee44a8cb469fd7e656599c2b9546a1af (patch)
tree0b13df0e4eafa08383ffbe8e13f69b876748e3b3 /compiler/rustc_interface/src/errors.rs
parentd3d145ea1cae47ad392173f890577788117da3d9 (diff)
downloadrust-93f2f2c8ee44a8cb469fd7e656599c2b9546a1af.tar.gz
rust-93f2f2c8ee44a8cb469fd7e656599c2b9546a1af.zip
Convert `Unix{Datagram,Stream}::{set_}passcred()` to per-OS traits
These methods are the pre-stabilized API for obtaining peer credentials
from an `AF_UNIX` socket, part of the `unix_socket_ancillary_data` feature.

Their current behavior is to get/set one of the `SO_PASSCRED` (Linux),
`LOCAL_CREDS_PERSISTENT` (FreeBSD), or `LOCAL_CREDS` (NetBSD) socket
options. On other targets the `{set_}passcred()` methods do not exist.

There are two problems with this approach:

1. Having public methods only exist for certain targets isn't permitted
   in a stable `std` API.

2. These options have generally similar purposes, but they are non-POSIX
   and their details can differ in subtle and surprising ways (such as
   whether they continue to be set after the next call to `recvmsg()`).

Splitting into OS-specific extension traits is the preferred solution to
both problems.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions