uds
A unix domain socket crate that supports abstract addresses, fd-passing and seqpacket sockets.
0.4.2
9.5M downloads/mo
#3199 most downloaded on crates.io
tormol/uds
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.4 years
Nearly every release is documented
notes for 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
14 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
14 releases · Nov 2019 to Dec 2023Releases
latest 14-
0.4.231 Dec 2023Release notes
Open source →- Reduce max path length by one on Apple OSes, Illumos and Solaris. (#19)
While non-NUL-terminated paths work, the man pages says paths must be NUL-terminated.
These OSes support arbitrarily long paths, and this library can't represent those, so it already only supported a subset of all possible path addresses. - Fix
UnixSocketAddr::from_raw()never having worked. (#18) - Fix potentiall soundness issues. (#13 and #14)
- Reduce max path length by one on Apple OSes, Illumos and Solaris. (#19)
-
0.4.120 Aug 2023Release notes
Open source →- Tokio support is back, now for tokio 1.*.
- There's now also tokio versions of the extensions traits:
They don't have any methods that would be async, such as
send_fds()orreceive_fds(), but allow binding and connecting touds::UnixSocketAddrs, and getting information about the peer.
-
0.4.014 Aug 2023Release notes
Open source →- Remove tokio support. Because 0.2 is not much used at this point. 1.* support might be implemented later.
- Remove mio 0.6, mio-uds & mio 0.7 support.
To simplify code and reduce combinations of features to test.
The feature for mio 0.8 support remains"mio_08":"mio"is reserved for mio 1.0.
-
0.3.014 Aug 2023Release notes
Open source →- Don't return truncatedness from
UnixSeqpacketConnandtokio::UnixSeqpacketConnsrecv()andpeek()methods. For consistency with the return types of similar methods on stream and datagram types.
Userecv_vectored()with empty fd buffer if you want to know whether the packet was truncated. - Remove default impl of
UnixDatagramExt::bind_unix_addr(), and removeSizedbound on the trait. - Stop quoting Unnamed in
UnixSocketaddr'sDebugimpl. - Add mio_08 feature, for using this library with mio 0.8.
- Require Rust 1.63. (Mainly to make CI pass, so older versions will likely work.)
- Don't return truncatedness from
-
0.2.714 Aug 2023Release notes
Open source →Out-of-bounds writes could have happened if sending both credentials
and file descriptors, but sending credetials is not exposed,
so that code is unreachable. Puh.Release notes
Open source →- Fix potentialy unaligned accesses and slices in release mode. (Thanks @domenukk!)
Would previously panic in debug mode, but now non-aligned payloads are supported. - Fix large ancillary buffers not being zero-initialized when filling out a buffer to send. (Thanks @domenukk!)
- Fix using wrong macro when calculating required ancillary buffer size when sending.
The only effect of this is was some padding on 64-bit Linux or FreeBSD would not be allocated or sent.
This could therefore not cause out-of-bounds writes.
- Fix potentialy unaligned accesses and slices in release mode. (Thanks @domenukk!)
-
0.2.602 Apr 2021Release notes
Open source →- Add
take_error()andinto_nonblocking()to tokio seqpacket types. - Implement
AsRefto nonblocking variants for tokio seqpacket types.
- Add
-
0.2.501 Apr 2021Release notes
Open source →- Add
send_vectored()andrecv_vectored()to::tokio::UnixSeqpacketConn. - Add
peek()andpeek_vectored()to::tokio::UnixSeqpacketConn. - Add
send_fds()andrecv_fds()to::tokio::UnixSeqpacketConn. - Implement
AsRawfdandIntoRawFdfor tokio seqpacket types. - Add fallible
from_raw_fd()to tokio seqpacket types. - Add
from_nonblocking()to::tokio::UnixSeqpacketListener. - Fix
initial_peer_credentials()impl for Illumos & Solaris writing to stdout.
- Add
-
0.2.424 Mar 2021Release notes
Open source →- Implement peer credentials on NetBSD and DragonFly BSD.
- Add
initial_peer_selinux_context(). - Add
initial_peer_credentials()to::tokio::UnixSeqpacketConn. - Add
bind_addr()andlocal_addr()to::tokio::UnixSeqpacketListener. - Add
connect_addr(),connect_from_addr(),local_addr()andpeer_addr()to::tokio::UnixSeqpacketConn.
-
0.2.306 Mar 2021Release notes
Open source →- Add
send_to_unix_addr(),recv_from_unix_addr(),peek_from_unix_addr()and vectored variants toUnixDatagramExt. - Add
UnixDatagramExt::bind_unix_addr(). (with a fallback default impl that creates a nonblocking socket) - Add
as_pathname()andas_abstract()toUnixSocketAddr. - Add
name()toUnixSocketAddrand renameUnixSocketAddrReftoAddrName, with a type alias for backwards compatibility. - Add
from_raw_bytes()andas_raw_bytes()toUnixSocketAddr. - List DragonFly BSD as supported after testing on it.
- Add
-
0.2.231 Jan 2021Release notes
Open source →- Compile on 64-bit Android (#4).
- Support OpenBSD (including peer credentials).
- Fix
UnixDatagramExt::recv_fds_from()always returning unnamed adress. - Fix
UnixSocketAddr::as_ref()and itsDebugimpl misrepresenting some unnamed addresses as abstract on operating systems that don't have abstract addresses. - Fix
UnixSocketAddr::as_ref()and itsDebugimpl having trailing NULs in paths in rare cases. (this has only happened on OpenBSD so far). - Avoid invoking
accept4()on x86 Android (based on mio #1445).
-
0.2.115 Nov 2020Release notes
Open source →- Add timeout methods to blocking seqpacket types.
- Add
take_error()to all seqpacket types. - Add
peek()andpeek_vectored()to seqpacket connection types. - Remove outdated WiP section of README saying NetBSD and Illumos aren't supported.
-
0.2.021 Oct 2020Release notes
Open source →- Require Rust 1.39.
- Add mio 0.7 support, behind optional feature
mio_07.
(mio 0.6 is still supported and enabled withmiofeature.) - Add tokio seqpacket types, behind optional feature
tokio. (by @jmagnuson). - Add
shutdown()to seqpacket connection types (by @jmagnuson). - Fix creating sockets failing on Illumos & Solaris. (This crate was setting close-on-exec in an unsupported way.)
- Support peer credentials on Illumos / Solaris.
- Enable close-on-exec and non-blocking mode atomically on all OSes where prossible.
(withSOCK_CLOEXEC,SOCK_NONBLOCKandaccept4())
The only place missing these are macOS (and anything else by Apple). - Mark NetBSD and Illumos as supported.
-
0.1.016 Feb 2020Release notes
Open source →- Rename
UnixSocketAddr::unspecified()tonew_unspecified(). - Add
peer_credentials(). - Support macOS and FreeBSD.
- Rename
-
0.0.023 Nov 2019Release notes
Open source →- Add
UnixSocketAddrto support abstract addresses. - Add seqpacket types.
- Add extension traits to support FD passing (and to create and accept
UnixSocketAddr)
- Add