Skip to content

Commit

Permalink
Feat(Apple): Add the LOCAL_PEERTOKEN socket option (#3929)
Browse files Browse the repository at this point in the history
* Feat(apple): Add LOCAL_PEERTOKEN

Taken from `sys/un.h`.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>

* Docs(apple): Add description for LOCAL_PEER* socket options

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>

* Chore(test/apple): Add the LOCAL_PEERTOKEN symbol

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>

---------

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
  • Loading branch information
PaulDance authored Sep 30, 2024
1 parent c73a50d commit 0a25ed8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ LOCAL_PEEREPID
LOCAL_PEEREUUID
LOCAL_PEERPID
LOCAL_PEERUUID
LOCAL_PEERTOKEN
LOGIN_PROCESS
LOG_AUTHPRIV
LOG_CRON
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4154,11 +4154,18 @@ pub const TCP_CONNECTION_INFO: ::c_int = 0x106;

pub const SOL_LOCAL: ::c_int = 0;

/// Retrieve peer credentials.
pub const LOCAL_PEERCRED: ::c_int = 0x001;
/// Retrieve peer PID.
pub const LOCAL_PEERPID: ::c_int = 0x002;
/// Retrieve effective peer PID.
pub const LOCAL_PEEREPID: ::c_int = 0x003;
/// Retrieve peer UUID.
pub const LOCAL_PEERUUID: ::c_int = 0x004;
/// Retrieve effective peer UUID.
pub const LOCAL_PEEREUUID: ::c_int = 0x005;
/// Retrieve peer audit token.
pub const LOCAL_PEERTOKEN: ::c_int = 0x006;

pub const SOL_SOCKET: ::c_int = 0xffff;

Expand Down

0 comments on commit 0a25ed8

Please sign in to comment.