nix v0.23.1 Release Notes

Release Date: 2021-12-16 // 5 months ago
  • โž• Added

    ๐Ÿ”„ Changed

    • โช Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts #1492. From now on, the MSRV is not guaranteed to work with all versions of all dependencies, just with some version of all dependencies. (#1607)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed soundness issues in FdSet::insert, FdSet::remove, and FdSet::contains involving file descriptors outside of the range 0..FD_SETSIZE. (#1575)

Previous changes from v0.23.0

  • โž• Added

    • โž• Added the LocalPeerCred sockopt. (#1482)
    • Added TimeSpec::from_duration and TimeSpec::from_timespec (#1465)
    • โž• Added IPV6_V6ONLY sockopt. (#1470)
    • โž• Added impl From<User> for libc::passwd trait implementation to convert a User into a libc::passwd. Consumes the User struct to give ownership over the member pointers. (#1471)
    • โž• Added pthread_kill. (#1472)
    • โž• Added mknodat. (#1473)
    • โž• Added setrlimit and getrlimit. (#1302)
    • โž• Added ptrace::interrupt method for platforms that support PTRACE_INTERRUPT (#1422)
    • Added IP6T_SO_ORIGINAL_DST sockopt. (#1490)
    • Added the PTRACE_EVENT_STOP variant to the sys::ptrace::Event enum (#1335)
    • Exposed SockAddr::from_raw_sockaddr (#1447)
    • โž• Added TcpRepair (#1503)
    • Enabled pwritev and preadv for more operating systems. (#1511)
    • โž• Added support for TCP_MAXSEG TCP Maximum Segment Size socket options (#1292)
    • โž• Added Ipv4RecvErr and Ipv6RecvErr sockopts and associated control messages. (#1514)
    • โž• Added AsRawFd implementation on PollFd. (#1516)
    • โž• Added Ipv4Ttl and Ipv6Ttl sockopts. (#1515)
    • Added MAP_EXCL, MAP_ALIGNED_SUPER, and MAP_CONCEAL mmap flags, and exposed MAP_ANONYMOUS for all operating systems. (#1522) (#1525) (#1531) (#1534)
    • โž• Added read/write accessors for 'events' on PollFd. (#1517)

    ๐Ÿ”„ Changed

    • FdSet::{contains, highest, fds} no longer require a mutable reference. (#1464)
    • ๐Ÿ‘ User::gecos and corresponding libc::passwd::pw_gecos are supported on 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#1471)
    • ๐Ÿ‘ eventfds are supported on Android, change conditional compilation to include sys::eventfd::eventfd and sys::eventfd::EfdFlagsfor Android builds. (#1481)
    • Most enums that come from C, for example Errno, are now marked as #[non_exhaustive]. (#1474)
    • Many more functions, mostly contructors, are now const. (#1476) (#1492)
    • sys::event::KEvent::filter now returns a Result instead of being infalliable. The only cases where it will now return an error are cases where it previously would've had undefined behavior. (#1484)
    • ๐Ÿ‘ Minimum supported Rust version is now 1.46.0. (#1492)
    • ๐Ÿ‘ Rework UnixAddr to encapsulate internals better in order to fix soundness issues. No longer allows creating a UnixAddr from a raw sockaddr_un. (#1496)
    • Raised bitflags to 1.3.0 and the MSRV to 1.46.0. (#1492)

    ๐Ÿ›  Fixed

    • posix_fadvise now returns errors in the conventional way, rather than as a non-zero value in Ok(). (#1538)
    • โž• Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#1467)
    • ๐Ÿ›  Fixed potential undefined behavior in Signal::try_from on some platforms. (#1484)
    • ๐Ÿ›  Fixed buffer overflow in unistd::getgrouplist. (#1545)

    โœ‚ Removed

    • โœ‚ Removed a couple of termios constants on redox that were never actually supported. (#1483)
    • โœ‚ Removed nix::sys::signal::NSIG. It was of dubious utility, and not correct for all platforms. (#1484)
    • โœ‚ Removed support for 32-bit Apple targets, since they've been dropped by both Rustc and Xcode. (#1492)
    • Deprecated SockAddr/InetAddr::to_str in favor of ToString::to_string (#1495)
    • โœ‚ Removed SigevNotify on OpenBSD and Redox. (#1511)