Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: jmillikin/upstream__rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: unix-ancillary-data-v2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 14 files changed
  • 1 contributor

Commits on Nov 8, 2023

  1. 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.
    jmillikin committed Nov 8, 2023
    Copy the full SHA
    b9eb55c View commit details
  2. Copy the full SHA
    f3a715b View commit details
  3. Copy the full SHA
    c5ab413 View commit details
  4. Copy the full SHA
    faf713c View commit details
  5. Copy the full SHA
    a64928a View commit details
Loading