diff options
author | bors <bors@rust-lang.org> | 2021-03-08 19:40:40 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-03-08 19:40:40 +0000 |
commit | 24ce55f72e549b9ab06ac1f286664942635b2a9b (patch) | |
tree | 4756e9e15c7123f0c20fda6af4974d4713485fc8 | |
parent | fc51a0f327ba148ffc1e6a11b7448f649b80608a (diff) | |
parent | 3f62e51d24c1590b7773fa4cbcf256e2e1a9c109 (diff) | |
download | rust-libc-24ce55f72e549b9ab06ac1f286664942635b2a9b.tar.gz |
Auto merge of #2105 - tormol:udx, r=JohnTitor
Add more unix domain socket peer information to more targets
* Add NetBSD peer credentials struct `unpcbid` and socket option `SO_PEEREID` (similar to Linux struct `ucred`).
(and some other socket options too along the way)
* Add `struct xucred`, `LOCAL_PEERCRED` and related to DragonFly BSD too.
* Add new `cr_pid` field to FreeBSD `struct xucred` (added in FreeBSD 13).
It is added through an union as in the C header to make sure the alignment is correct, but could probably be a simple field with padding too.
* Add `SO_PEERSEC` and `SO_PASSEC` to Android and all Linux architectures that they hadn't already been added to.
21 files changed, 147 insertions, 13 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 99763e29aa..978aec7781 100755 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1821,6 +1821,9 @@ fn test_freebsd(target: &str) { }); cfg.skip_struct(move |ty| { + if ty.starts_with("__c_anonymous_") { + return true; + } match ty { // `mmsghdr` is not available in FreeBSD 10 "mmsghdr" if Some(10) == freebsd_ver => true, @@ -1898,6 +1901,9 @@ fn test_freebsd(target: &str) { ("Elf32_Phdr", "p_type") => true, ("Elf64_Phdr", "p_type") => true, + // not available until FreeBSD 12, and is an anonymous union there. + ("xucred", "cr_pid__c_anonymous_union") => true, + _ => false, } }); diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 0330183d3f..7056cc5484 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -171,6 +171,14 @@ s! { pub sdl_route: [::c_ushort; 16], } + pub struct xucred { + pub cr_version: ::c_uint, + pub cr_uid: ::uid_t, + pub cr_ngroups: ::c_short, + pub cr_groups: [::gid_t; 16], + __cr_unused1: *mut ::c_void, + } + pub struct stack_t { pub ss_sp: *mut ::c_char, pub ss_size: ::size_t, @@ -238,7 +246,6 @@ s_no_extra_traits! { pub sigev_value: ::sigval, __unused3: *mut ::c_void //actually a function pointer } - } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 04bc48dcd6..18a38bd533 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -89,14 +89,6 @@ s! { pub msg_ctime: ::time_t, } - pub struct xucred { - pub cr_version: ::c_uint, - pub cr_uid: ::uid_t, - pub cr_ngroups: ::c_short, - pub cr_groups: [::gid_t;16], - __cr_unused1: *mut ::c_void, - } - pub struct stack_t { pub ss_sp: *mut ::c_void, pub ss_size: ::size_t, @@ -143,6 +135,23 @@ s_no_extra_traits! { pub __ut_spare: [::c_char; 64], } + #[cfg(libc_union)] + pub union __c_anonymous_cr_pid { + __cr_unused: *mut ::c_void, + pub cr_pid: ::pid_t, + } + + pub struct xucred { + pub cr_version: ::c_uint, + pub cr_uid: ::uid_t, + pub cr_ngroups: ::c_short, + pub cr_groups: [::gid_t; 16], + #[cfg(libc_union)] + pub cr_pid__c_anonymous_union: __c_anonymous_cr_pid, + #[cfg(not(libc_union))] + __cr_unused1: *mut ::c_void, + } + pub struct sockaddr_dl { pub sdl_len: ::c_uchar, pub sdl_family: ::c_uchar, @@ -225,6 +234,73 @@ cfg_if! { } } + #[cfg(libc_union)] + impl PartialEq for __c_anonymous_cr_pid { + fn eq(&self, other: &__c_anonymous_cr_pid) -> bool { + unsafe { self.cr_pid == other.cr_pid} + } + } + #[cfg(libc_union)] + impl Eq for __c_anonymous_cr_pid {} + #[cfg(libc_union)] + impl ::fmt::Debug for __c_anonymous_cr_pid { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("cr_pid") + .field("cr_pid", unsafe { &self.cr_pid }) + .finish() + } + } + #[cfg(libc_union)] + impl ::hash::Hash for __c_anonymous_cr_pid { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + unsafe { self.cr_pid.hash(state) }; + } + } + + impl PartialEq for xucred { + fn eq(&self, other: &xucred) -> bool { + #[cfg(libc_union)] + let equal_cr_pid = self.cr_pid__c_anonymous_union + == other.cr_pid__c_anonymous_union; + #[cfg(not(libc_union))] + let equal_cr_pid = self.__cr_unused1 == other.__cr_unused1; + + self.cr_version == other.cr_version + && self.cr_uid == other.cr_uid + && self.cr_ngroups == other.cr_ngroups + && self.cr_groups == other.cr_groups + && equal_cr_pid + } + } + impl Eq for xucred {} + impl ::fmt::Debug for xucred { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + let mut struct_formatter = f.debug_struct("xucred"); + struct_formatter.field("cr_version", &self.cr_version); + struct_formatter.field("cr_uid", &self.cr_uid); + struct_formatter.field("cr_ngroups", &self.cr_ngroups); + struct_formatter.field("cr_groups", &self.cr_groups); + #[cfg(libc_union)] + struct_formatter.field( + "cr_pid__c_anonymous_union", + &self.cr_pid__c_anonymous_union + ); + struct_formatter.finish() + } + } + impl ::hash::Hash for xucred { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.cr_version.hash(state); + self.cr_uid.hash(state); + self.cr_ngroups.hash(state); + self.cr_groups.hash(state); + #[cfg(libc_union)] + self.cr_pid__c_anonymous_union.hash(state); + #[cfg(not(libc_union))] + self.__cr_unused1.hash(state); + } + } + impl PartialEq for sockaddr_dl { fn eq(&self, other: &sockaddr_dl) -> bool { self.sdl_len == other.sdl_len @@ -629,7 +705,6 @@ pub const SO_PROTOCOL: ::c_int = 0x1016; pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL; pub const SO_VENDOR: ::c_int = 0x80000000; -pub const LOCAL_PEERCRED: ::c_int = 1; pub const LOCAL_CREDS: ::c_int = 2; pub const LOCAL_CONNWAIT: ::c_int = 4; pub const LOCAL_VENDOR: ::c_int = SO_VENDOR; @@ -1103,9 +1178,6 @@ pub const _PC_ACL_NFS4: ::c_int = 64; pub const _SC_CPUSET_SIZE: ::c_int = 122; -pub const XU_NGROUPS: ::c_int = 16; -pub const XUCRED_VERSION: ::c_uint = 0; - // Flags which can be passed to pdfork(2) pub const PD_DAEMON: ::c_int = 0x00000001; pub const PD_CLOEXEC: ::c_int = 0x00000002; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 94d30972e8..32bf7e7e7b 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -947,6 +947,8 @@ pub const SO_RCVTIMEO: ::c_int = 0x1006; pub const SO_ERROR: ::c_int = 0x1007; pub const SO_TYPE: ::c_int = 0x1008; +pub const LOCAL_PEERCRED: ::c_int = 1; + pub const SHUT_RD: ::c_int = 0; pub const SHUT_WR: ::c_int = 1; pub const SHUT_RDWR: ::c_int = 2; @@ -1133,6 +1135,9 @@ pub const ST_NOSUID: ::c_ulong = 2; pub const NI_MAXHOST: ::size_t = 1025; +pub const XU_NGROUPS: ::c_int = 16; +pub const XUCRED_VERSION: ::c_uint = 0; + pub const RTLD_LOCAL: ::c_int = 0; pub const RTLD_NODELETE: ::c_int = 0x1000; pub const RTLD_NOLOAD: ::c_int = 0x2000; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 7833138798..b789f47ec9 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -299,6 +299,12 @@ s! { pub sc_groups: [::gid_t; 1], } + pub struct unpcbid { + pub unp_pid: ::pid_t, + pub unp_euid: ::uid_t, + pub unp_egid: ::gid_t, + } + pub struct sockaddr_dl { pub sdl_len: ::c_uchar, pub sdl_family: ::c_uchar, @@ -1047,6 +1053,12 @@ pub const SO_TIMESTAMP: ::c_int = 0x2000; pub const SO_OVERFLOWED: ::c_int = 0x1009; pub const SO_NOHEADER: ::c_int = 0x100a; +// http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/un.h?annotate +pub const LOCAL_OCREDS: ::c_int = 0x0001; // pass credentials to receiver +pub const LOCAL_CONNWAIT: ::c_int = 0x0002; // connects block until accepted +pub const LOCAL_PEEREID: ::c_int = 0x0003; // get peer identification +pub const LOCAL_CREDS: ::c_int = 0x0004; // pass credentials to receiver + // https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373 pub const IFF_UP: ::c_int = 0x0001; // interface is up pub const IFF_BROADCAST: ::c_int = 0x0002; // broadcast address valid diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index f1d6ef4b2b..a86bf96f94 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1078,8 +1078,10 @@ pub const SO_SNDTIMEO: ::c_int = 21; pub const SO_BINDTODEVICE: ::c_int = 25; pub const SO_TIMESTAMP: ::c_int = 29; pub const SO_ACCEPTCONN: ::c_int = 30; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SO_MARK: ::c_int = 36; pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; diff --git a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs index d084450b9f..86ba299775 100644 --- a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs @@ -321,8 +321,10 @@ pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SA_SIGINFO: ::c_int = 0x00000004; pub const SA_NOCLDWAIT: ::c_int = 0x00000002; diff --git a/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs index c22b792402..e3483cd592 100644 --- a/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -325,6 +325,8 @@ pub const SO_RCVTIMEO: ::c_int = 18; pub const SO_SNDTIMEO: ::c_int = 19; pub const SO_PASSCRED: ::c_int = 20; pub const SO_PEERCRED: ::c_int = 21; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const SA_SIGINFO: ::c_int = 0x00000004; pub const SA_NOCLDWAIT: ::c_int = 0x00000002; diff --git a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index 33400b3a72..662dac731a 100644 --- a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -324,6 +324,8 @@ pub const SOL_SOCKET: ::c_int = 0xffff; pub const SO_PASSCRED: ::c_int = 2; pub const SO_REUSEADDR: ::c_int = 4; +pub const SO_PEERSEC: ::c_int = 0x001e; +pub const SO_PASSSEC: ::c_int = 0x001f; pub const SO_TYPE: ::c_int = 0x1008; pub const SO_ERROR: ::c_int = 0x1007; pub const SO_DONTROUTE: ::c_int = 16; diff --git a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 130ed85095..95b69d9574 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -526,6 +526,8 @@ pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const SA_SIGINFO: ::c_int = 0x00000004; pub const SA_NOCLDWAIT: ::c_int = 0x00000002; diff --git a/src/unix/linux_like/linux/gnu/b64/s390x.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs index fcd1f7b16f..3be90a1656 100644 --- a/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -486,8 +486,10 @@ pub const SO_PEERCRED: ::c_int = 17; pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_ACCEPTCONN: ::c_int = 30; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SIGTTIN: ::c_int = 21; pub const SIGTTOU: ::c_int = 22; diff --git a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index bcf0fd6222..29ab8b866c 100644 --- a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -334,6 +334,8 @@ pub const SO_PASSCRED: ::c_int = 2; pub const SO_REUSEADDR: ::c_int = 4; pub const SO_BINDTODEVICE: ::c_int = 0x000d; pub const SO_TIMESTAMP: ::c_int = 0x001d; +pub const SO_PEERSEC: ::c_int = 0x001e; +pub const SO_PASSSEC: ::c_int = 0x001f; pub const SO_MARK: ::c_int = 0x0022; pub const SO_RXQ_OVFL: ::c_int = 0x0024; pub const SO_PEEK_OFF: ::c_int = 0x0026; diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index 88e8d56b99..2beb5f9e45 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -377,8 +377,10 @@ pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; pub const SO_ACCEPTCONN: ::c_int = 30; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index 2e17ccc637..f84b125426 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -388,8 +388,10 @@ pub const SO_PRIORITY: ::c_int = 12; pub const SO_BSDCOMPAT: ::c_int = 14; pub const SO_PASSCRED: ::c_int = 17; pub const SO_PEERCRED: ::c_int = 18; +pub const SO_PEERSEC: ::c_int = 30; pub const SO_SNDBUFFORCE: ::c_int = 31; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SA_ONSTACK: ::c_int = 0x08000000; pub const SA_SIGINFO: ::c_int = 8; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index b94bb7b15e..64f8f23778 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -379,8 +379,10 @@ pub const SO_SNDTIMEO: ::c_int = 19; pub const SO_PASSCRED: ::c_int = 20; pub const SO_PEERCRED: ::c_int = 21; pub const SO_ACCEPTCONN: ::c_int = 30; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 82ef84a96e..4d9af72976 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -437,8 +437,10 @@ pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; pub const SO_ACCEPTCONN: ::c_int = 30; +pub const SO_PEERSEC: ::c_int = 31; pub const SO_SNDBUFFORCE: ::c_int = 32; pub const SO_RCVBUFFORCE: ::c_int = 33; +pub const SO_PASSSEC: ::c_int = 34; pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 88c252ea6c..8864dea851 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -598,6 +598,8 @@ pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const EXTPROC: ::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index 2533ffd6d3..c1618ad519 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -613,6 +613,8 @@ pub const SO_RCVLOWAT: ::c_int = 16; pub const SO_SNDLOWAT: ::c_int = 17; pub const SO_RCVTIMEO: ::c_int = 18; pub const SO_SNDTIMEO: ::c_int = 19; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const EXTPROC: ::tcflag_t = 0x10000000; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index 1229bec172..b3f1e6aa94 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -903,6 +903,8 @@ pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const EXTPROC: ::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; diff --git a/src/unix/linux_like/linux/uclibc/arm/mod.rs b/src/unix/linux_like/linux/uclibc/arm/mod.rs index 1cafdb61c4..60e526bd78 100644 --- a/src/unix/linux_like/linux/uclibc/arm/mod.rs +++ b/src/unix/linux_like/linux/uclibc/arm/mod.rs @@ -262,6 +262,8 @@ pub const MAP_HUGETLB: ::c_int = 0x040000; // from linux/other/mod.rs pub const SO_BUSY_POLL: ::c_int = 46; // from src/unix/linux_like/mod.rs pub const SO_PEEK_OFF: ::c_int = 42; // from src/unix/linux_like/mod.rs pub const SO_REUSEPORT: ::c_int = 15; // from src/unix/linux_like/mod.rs +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; // autogenerated constants with hand tuned types pub const B0: ::speed_t = 0; diff --git a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 80c9583372..af42d0fb10 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -324,6 +324,8 @@ pub const SO_RCVTIMEO: ::c_int = 20; pub const SO_REUSEADDR: ::c_int = 2; pub const SO_SNDTIMEO: ::c_int = 21; pub const SO_TIMESTAMP: ::c_int = 0x1d; +pub const SO_PEERSEC: ::c_int = 31; +pub const SO_PASSSEC: ::c_int = 34; pub const RLIM_INFINITY: u64 = 0xffffffffffffffff; pub const __SIZEOF_PTHREAD_COND_T: usize = 48; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; |