Skip to content

Commit bd30fe1

Browse files
PaulDancetgross35
authored andcommitted
Feat(Apple): Add the LOCAL_PEERTOKEN socket option (#3929)
* 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> (backport <#3929>) (cherry picked from commit 0a25ed8)
1 parent a648a8e commit bd30fe1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ LOCAL_PEEREPID
849849
LOCAL_PEEREUUID
850850
LOCAL_PEERPID
851851
LOCAL_PEERUUID
852+
LOCAL_PEERTOKEN
852853
LOGIN_PROCESS
853854
LOG_AUTHPRIV
854855
LOG_CRON

src/unix/bsd/apple/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4194,11 +4194,18 @@ pub const TCP_CONNECTION_INFO: ::c_int = 0x106;
41944194

41954195
pub const SOL_LOCAL: ::c_int = 0;
41964196

4197+
/// Retrieve peer credentials.
41974198
pub const LOCAL_PEERCRED: ::c_int = 0x001;
4199+
/// Retrieve peer PID.
41984200
pub const LOCAL_PEERPID: ::c_int = 0x002;
4201+
/// Retrieve effective peer PID.
41994202
pub const LOCAL_PEEREPID: ::c_int = 0x003;
4203+
/// Retrieve peer UUID.
42004204
pub const LOCAL_PEERUUID: ::c_int = 0x004;
4205+
/// Retrieve effective peer UUID.
42014206
pub const LOCAL_PEEREUUID: ::c_int = 0x005;
4207+
/// Retrieve peer audit token.
4208+
pub const LOCAL_PEERTOKEN: ::c_int = 0x006;
42024209

42034210
pub const SOL_SOCKET: ::c_int = 0xffff;
42044211

0 commit comments

Comments
 (0)