bors 6639672554 Auto merge of #117156 - jmillikin:os-unix-socket-ext, r=Amanieu,dtolnay
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.
2024-03-11 07:46:01 +00:00
..
2023-10-09 14:02:57 +08:00
2023-09-21 17:31:25 +02:00
2023-11-15 19:40:51 -05:00
2023-10-28 23:10:45 -07:00
2024-01-24 17:23:51 +03:00
2023-11-15 19:40:51 -05:00
2023-09-22 17:23:33 +05:30
2023-11-15 19:40:51 -05:00