1# Change Log 2 3All notable changes to this project will be documented in this file. 4This project adheres to [Semantic Versioning](https://semver.org/). 5 6## [0.26.4] - 2023-08-28 7 8### Fixed 9 10- Fixed an unintended API change in release 0.26.3, due to the upgrade of the 11 bitflags dependency. 12 ([#2117](https://github.com/nix-rust/nix/pull/2117)) 13 14## [0.26.3] - 2023-08-27 15 16### Fixed 17- Fix: send `ETH_P_ALL` in htons format 18 ([#1925](https://github.com/nix-rust/nix/pull/1925)) 19- Fix: `recvmsg` now sets the length of the received `sockaddr_un` field 20 correctly on Linux platforms. ([#2041](https://github.com/nix-rust/nix/pull/2041)) 21- Fix potentially invalid conversions in 22 `SockaddrIn::from<std::net::SocketAddrV4>`, 23 `SockaddrIn6::from<std::net::SockaddrV6>`, `IpMembershipRequest::new`, and 24 `Ipv6MembershipRequest::new` with future Rust versions. 25 ([#2061](https://github.com/nix-rust/nix/pull/2061)) 26- Fixed an incorrect lifetime returned from `recvmsg`. 27 ([#2095](https://github.com/nix-rust/nix/pull/2095)) 28 29## [0.26.2] - 2023-01-18 30### Fixed 31- Fix `SockaddrIn6` bug that was swapping flowinfo and scope_id byte ordering. 32 ([#1964](https://github.com/nix-rust/nix/pull/1964)) 33 34## [0.26.1] - 2022-11-29 35### Fixed 36- Fix UB with `sys::socket::sockopt::SockType` using `SOCK_PACKET`. 37 ([#1821](https://github.com/nix-rust/nix/pull/1821)) 38 39## [0.26.0] - 2022-11-29 40### Added 41 42- Added `SockaddrStorage::{as_unix_addr, as_unix_addr_mut}` 43 ([#1871](https://github.com/nix-rust/nix/pull/1871)) 44- Added `MntFlags` and `unmount` on all of the BSDs. 45- Added `any()` and `all()` to `poll::PollFd`. 46 ([#1877](https://github.com/nix-rust/nix/pull/1877)) 47- Add `MntFlags` and `unmount` on all of the BSDs. 48 ([#1849](https://github.com/nix-rust/nix/pull/1849)) 49- Added a `Statfs::flags` method. 50 ([#1849](https://github.com/nix-rust/nix/pull/1849)) 51- Added `NSFS_MAGIC` FsType on Linux and Android. 52 ([#1829](https://github.com/nix-rust/nix/pull/1829)) 53- Added `sched_getcpu` on platforms that support it. 54 ([#1825](https://github.com/nix-rust/nix/pull/1825)) 55- Added `sched_getaffinity` and `sched_setaffinity` on FreeBSD. 56 ([#1804](https://github.com/nix-rust/nix/pull/1804)) 57- Added `line_discipline` field to `Termios` on Linux, Android and Haiku 58 ([#1805](https://github.com/nix-rust/nix/pull/1805)) 59- Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13) 60 ([#1808](https://github.com/nix-rust/nix/pull/1808)) 61- Added `domainname` field of `UtsName` on Android and Linux 62 ([#1817](https://github.com/nix-rust/nix/pull/1817)) 63- Re-export `RLIM_INFINITY` from `libc` 64 ([#1831](https://github.com/nix-rust/nix/pull/1831)) 65- Added `syncfs(2)` on Linux 66 ([#1833](https://github.com/nix-rust/nix/pull/1833)) 67- Added `faccessat(2)` on illumos 68 ([#1841](https://github.com/nix-rust/nix/pull/1841)) 69- Added `eaccess()` on FreeBSD, DragonFly and Linux (glibc and musl). 70 ([#1842](https://github.com/nix-rust/nix/pull/1842)) 71- Added `IP_TOS` `SO_PRIORITY` and `IPV6_TCLASS` sockopts for Linux 72 ([#1853](https://github.com/nix-rust/nix/pull/1853)) 73- Added `new_unnamed` and `is_unnamed` for `UnixAddr` on Linux and Android. 74 ([#1857](https://github.com/nix-rust/nix/pull/1857)) 75- Added `SockProtocol::Raw` for raw sockets 76 ([#1848](https://github.com/nix-rust/nix/pull/1848)) 77- added `IP_MTU` (`IpMtu`) `IPPROTO_IP` sockopt on Linux and Android. 78 ([#1865](https://github.com/nix-rust/nix/pull/1865)) 79 80### Changed 81 82- The MSRV is now 1.56.1 83 ([#1792](https://github.com/nix-rust/nix/pull/1792)) 84- The `addr` argument of `sys::mman::mmap` is now of type `Option<NonZeroUsize>`. 85 ([#1870](https://github.com/nix-rust/nix/pull/1870)) 86- The `length` argument of `sys::mman::mmap` is now of type `NonZeroUsize`. 87 ([#1873](https://github.com/nix-rust/nix/pull/1873)) 88 89### Fixed 90 91- Fixed using `SockaddrStorage` to store a Unix-domain socket address on Linux. 92 ([#1871](https://github.com/nix-rust/nix/pull/1871)) 93- Fix microsecond calculation for `TimeSpec`. 94 ([#1801](https://github.com/nix-rust/nix/pull/1801)) 95- Fix `User::from_name` and `Group::from_name` panicking 96 when given a name containing a nul. 97 ([#1815](https://github.com/nix-rust/nix/pull/1815)) 98- Fix `User::from_uid` and `User::from_name` crash on Android platform. 99 ([#1824](https://github.com/nix-rust/nix/pull/1824)) 100- Workaround XNU bug causing netmasks returned by `getifaddrs` to misbehave. 101 ([#1788](https://github.com/nix-rust/nix/pull/1788)) 102 103### Removed 104 105- Removed deprecated error constants and conversions. 106 ([#1860](https://github.com/nix-rust/nix/pull/1860)) 107 108## [0.25.0] - 2022-08-13 109### Added 110 111- Added `faccessat` 112 ([#1780](https://github.com/nix-rust/nix/pull/1780)) 113- Added `memfd` on Android. 114 (#[1773](https://github.com/nix-rust/nix/pull/1773)) 115- Added `ETH_P_ALL` to `SockProtocol` enum 116 (#[1768](https://github.com/nix-rust/nix/pull/1768)) 117- Added four non-standard Linux `SysconfVar` variants 118 (#[1761](https://github.com/nix-rust/nix/pull/1761)) 119- Added const constructors for `TimeSpec` and `TimeVal` 120 (#[1760](https://github.com/nix-rust/nix/pull/1760)) 121- Added `chflags`. 122 (#[1758](https://github.com/nix-rust/nix/pull/1758)) 123- Added `aio_writev` and `aio_readv`. 124 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 125- impl `From<uid_t>` for `Uid` and `From<gid_t>` for `Gid` 126 (#[1727](https://github.com/nix-rust/nix/pull/1727)) 127- impl `From<SockaddrIn>` for `std::net::SocketAddrV4` and 128 impl `From<SockaddrIn6>` for `std::net::SocketAddrV6`. 129 (#[1711](https://github.com/nix-rust/nix/pull/1711)) 130- Added support for the `x86_64-unknown-haiku` target. 131 (#[1703](https://github.com/nix-rust/nix/pull/1703)) 132- Added `ptrace::read_user` and `ptrace::write_user` for Linux. 133 (#[1697](https://github.com/nix-rust/nix/pull/1697)) 134- Added `getrusage` and helper types `UsageWho` and `Usage` 135 (#[1747](https://github.com/nix-rust/nix/pull/1747)) 136- Added the `DontRoute` SockOpt 137 (#[1752](https://github.com/nix-rust/nix/pull/1752)) 138- Added `signal::SigSet::from_sigset_t_unchecked()`. 139 (#[1741](https://github.com/nix-rust/nix/pull/1741)) 140- Added the `Ipv4OrigDstAddr` sockopt and control message. 141 (#[1772](https://github.com/nix-rust/nix/pull/1772)) 142- Added the `Ipv6OrigDstAddr` sockopt and control message. 143 (#[1772](https://github.com/nix-rust/nix/pull/1772)) 144- Added the `Ipv4SendSrcAddr` control message. 145 (#[1776](https://github.com/nix-rust/nix/pull/1776)) 146 147### Changed 148 149- Reimplemented sendmmsg/recvmmsg to avoid allocations and with better API 150 (#[1744](https://github.com/nix-rust/nix/pull/1744)) 151 152- Rewrote the aio module. The new module: 153 * Does more type checking at compile time rather than runtime. 154 * Gives the caller control over whether and when to `Box` an aio operation. 155 * Changes the type of the `priority` arguments to `i32`. 156 * Changes the return type of `aio_return` to `usize`. 157 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 158- `nix::poll::ppoll`: `sigmask` parameter is now optional. 159 (#[1739](https://github.com/nix-rust/nix/pull/1739)) 160- Changed `gethostname` to return an owned `OsString`. 161 (#[1745](https://github.com/nix-rust/nix/pull/1745)) 162- `signal:SigSet` is now marked as `repr(transparent)`. 163 (#[1741](https://github.com/nix-rust/nix/pull/1741)) 164 165### Removed 166 167- Removed support for resubmitting partially complete `lio_listio` operations. 168 It was too complicated, and didn't fit Nix's theme of zero-cost abstractions. 169 Instead, it can be reimplemented downstream. 170 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 171 172## [0.24.2] - 2022-07-17 173### Fixed 174 175- Fixed buffer overflow in `nix::sys::socket::recvfrom`. 176 (#[1763](https://github.com/nix-rust/nix/pull/1763)) 177- Enabled `SockaddrStorage::{as_link_addr, as_link_addr_mut}` for Linux-like 178 operating systems. 179 (#[1729](https://github.com/nix-rust/nix/pull/1729)) 180- Fixed `SockaddrLike::from_raw` implementations for `VsockAddr` and 181 `SysControlAddr`. 182 (#[1736](https://github.com/nix-rust/nix/pull/1736)) 183 184## [0.24.1] - 2022-04-22 185### Fixed 186 187- Fixed `UnixAddr::size` on Linux-based OSes. 188 (#[1702](https://github.com/nix-rust/nix/pull/1702)) 189 190## [0.24.0] - 2022-04-21 191### Added 192 193- Added fine-grained features flags. Most Nix functionality can now be 194 conditionally enabled. By default, all features are enabled. 195 (#[1611](https://github.com/nix-rust/nix/pull/1611)) 196- Added statfs FS type magic constants for `target_os = "android"` 197 and synced constants with libc v0.2.121. 198 (#[1690](https://github.com/nix-rust/nix/pull/1690)) 199- Added `fexecve` on DragonFly. 200 (#[1577](https://github.com/nix-rust/nix/pull/1577)) 201- `sys::uio::IoVec` is now `Send` and `Sync` 202 (#[1582](https://github.com/nix-rust/nix/pull/1582)) 203- Added `EPOLLEXCLUSIVE` on Android. 204 (#[1567](https://github.com/nix-rust/nix/pull/1567)) 205- Added `fdatasync` for FreeBSD, Fuchsia, NetBSD, and OpenBSD. 206 (#[1581](https://github.com/nix-rust/nix/pull/1581)) 207- Added `sched_setaffinity` and `sched_getaffinity` on DragonFly. 208 (#[1537](https://github.com/nix-rust/nix/pull/1537)) 209- Added `posix_fallocate` on DragonFly. 210 (#[1621](https://github.com/nix-rust/nix/pull/1621)) 211- Added `SO_TIMESTAMPING` support 212 (#[1547](https://github.com/nix-rust/nix/pull/1547)) 213- Added getter methods to `MqAttr` struct 214 (#[1619](https://github.com/nix-rust/nix/pull/1619)) 215- Added the `TxTime` sockopt and control message. 216 (#[1564](https://github.com/nix-rust/nix/pull/1564)) 217- Added POSIX per-process timer support 218 (#[1622](https://github.com/nix-rust/nix/pull/1622)) 219- Added `sendfile` on DragonFly. 220 (#[1615](https://github.com/nix-rust/nix/pull/1615)) 221- Added `UMOUNT_NOFOLLOW`, `FUSE_SUPER_MAGIC` on Linux. 222 (#[1634](https://github.com/nix-rust/nix/pull/1634)) 223- Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD. 224 (#[1628](https://github.com/nix-rust/nix/pull/1628)) 225- Added `MAP_FIXED_NOREPLACE` on Linux. 226 (#[1636](https://github.com/nix-rust/nix/pull/1636)) 227- Added `fspacectl` on FreeBSD 228 (#[1640](https://github.com/nix-rust/nix/pull/1640)) 229- Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. 230 (#[1654](https://github.com/nix-rust/nix/pull/1654)) 231- Added `AsRawFd` implementation on `OwningIter`. 232 (#[1563](https://github.com/nix-rust/nix/pull/1563)) 233- Added `process_vm_readv` and `process_vm_writev` on Android. 234 (#[1557](https://github.com/nix-rust/nix/pull/1557)) 235- Added `nix::uncontext` module on s390x. 236 (#[1662](https://github.com/nix-rust/nix/pull/1662)) 237- Implemented `Extend`, `FromIterator`, and `IntoIterator` for `SigSet` and 238 added `SigSet::iter` and `SigSetIter`. 239 (#[1553](https://github.com/nix-rust/nix/pull/1553)) 240- Added `ENOTRECOVERABLE` and `EOWNERDEAD` error codes on DragonFly. 241 (#[1665](https://github.com/nix-rust/nix/pull/1665)) 242- Implemented `Read` and `Write` for `&PtyMaster` 243 (#[1664](https://github.com/nix-rust/nix/pull/1664)) 244- Added `MSG_NOSIGNAL` for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. 245 (#[1670](https://github.com/nix-rust/nix/pull/1670)) 246- Added `waitid`. 247 (#[1584](https://github.com/nix-rust/nix/pull/1584)) 248- Added `Ipv6DontFrag` for android, iOS, linux and macOS. 249- Added `IpDontFrag` for iOS, macOS. 250 (#[1692](https://github.com/nix-rust/nix/pull/1692)) 251 252### Changed 253 254- `mqueue` functions now operate on a distinct type, `nix::mqueue::MqdT`. 255 Accessors take this type by reference, not by value. 256 (#[1639](https://github.com/nix-rust/nix/pull/1639)) 257- Removed `SigSet::extend` in favor of `<SigSet as Extend<Signal>>::extend`. 258 Because of this change, you now need `use std::iter::Extend` to call `extend` 259 on a `SigSet`. 260 (#[1553](https://github.com/nix-rust/nix/pull/1553)) 261- Removed the the `PATH_MAX` restriction from APIs accepting paths. Paths 262 will now be allocated on the heap if they are too long. In addition, large 263 instruction count improvements (~30x) were made to path handling. 264 (#[1656](https://github.com/nix-rust/nix/pull/1656)) 265- Changed `getrlimit` and `setrlimit` to use `rlim_t` directly 266 instead of `Option<rlim_t>`. 267 (#[1668](https://github.com/nix-rust/nix/pull/1668)) 268- Deprecated `InetAddr` and `SockAddr` in favor of `SockaddrIn`, `SockaddrIn6`, 269 and `SockaddrStorage`. 270 (#[1684](https://github.com/nix-rust/nix/pull/1684)) 271- Deprecated `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` in favor of their equivalents 272 from the standard library. 273 (#[1685](https://github.com/nix-rust/nix/pull/1685)) 274- `uname` now returns a `Result<UtsName>` instead of just a `UtsName` and 275 ignoring failures from libc. And getters on the `UtsName` struct now return 276 an `&OsStr` instead of `&str`. 277 (#[1672](https://github.com/nix-rust/nix/pull/1672)) 278- Replaced `IoVec` with `IoSlice` and `IoSliceMut`, and replaced `IoVec::from_slice` with 279 `IoSlice::new`. (#[1643](https://github.com/nix-rust/nix/pull/1643)) 280 281### Fixed 282 283- `InetAddr::from_std` now sets the `sin_len`/`sin6_len` fields on the BSDs. 284 (#[1642](https://github.com/nix-rust/nix/pull/1642)) 285- Fixed a panic in `LinkAddr::addr`. That function now returns an `Option`. 286 (#[1675](https://github.com/nix-rust/nix/pull/1675)) 287 (#[1677](https://github.com/nix-rust/nix/pull/1677)) 288 289### Removed 290 291- Removed public access to the inner fields of `NetlinkAddr`, `AlgAddr`, 292 `SysControlAddr`, `LinkAddr`, and `VsockAddr`. 293 (#[1614](https://github.com/nix-rust/nix/pull/1614)) 294- Removed `EventFlag::EV_SYSFLAG`. 295 (#[1635](https://github.com/nix-rust/nix/pull/1635)) 296 297## [0.23.1] - 2021-12-16 298 299### Changed 300 301- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts 302 #1492. From now on, the MSRV is not guaranteed to work with all versions of 303 all dependencies, just with some version of all dependencies. 304 (#[1607](https://github.com/nix-rust/nix/pull/1607)) 305 306### Fixed 307 308- Fixed soundness issues in `FdSet::insert`, `FdSet::remove`, and 309 `FdSet::contains` involving file descriptors outside of the range 310 `0..FD_SETSIZE`. 311 (#[1575](https://github.com/nix-rust/nix/pull/1575)) 312 313## [0.23.0] - 2021-09-28 314### Added 315 316- Added the `LocalPeerCred` sockopt. 317 (#[1482](https://github.com/nix-rust/nix/pull/1482)) 318- Added `TimeSpec::from_duration` and `TimeSpec::from_timespec` 319 (#[1465](https://github.com/nix-rust/nix/pull/1465)) 320- Added `IPV6_V6ONLY` sockopt. 321 (#[1470](https://github.com/nix-rust/nix/pull/1470)) 322- Added `impl From<User> for libc::passwd` trait implementation to convert a `User` 323 into a `libc::passwd`. Consumes the `User` struct to give ownership over 324 the member pointers. 325 (#[1471](https://github.com/nix-rust/nix/pull/1471)) 326- Added `pthread_kill`. 327 (#[1472](https://github.com/nix-rust/nix/pull/1472)) 328- Added `mknodat`. 329 (#[1473](https://github.com/nix-rust/nix/pull/1473)) 330- Added `setrlimit` and `getrlimit`. 331 (#[1302](https://github.com/nix-rust/nix/pull/1302)) 332- Added `ptrace::interrupt` method for platforms that support `PTRACE_INTERRUPT` 333 (#[1422](https://github.com/nix-rust/nix/pull/1422)) 334- Added `IP6T_SO_ORIGINAL_DST` sockopt. 335 (#[1490](https://github.com/nix-rust/nix/pull/1490)) 336- Added the `PTRACE_EVENT_STOP` variant to the `sys::ptrace::Event` enum 337 (#[1335](https://github.com/nix-rust/nix/pull/1335)) 338- Exposed `SockAddr::from_raw_sockaddr` 339 (#[1447](https://github.com/nix-rust/nix/pull/1447)) 340- Added `TcpRepair` 341 (#[1503](https://github.com/nix-rust/nix/pull/1503)) 342- Enabled `pwritev` and `preadv` for more operating systems. 343 (#[1511](https://github.com/nix-rust/nix/pull/1511)) 344- Added support for `TCP_MAXSEG` TCP Maximum Segment Size socket options 345 (#[1292](https://github.com/nix-rust/nix/pull/1292)) 346- Added `Ipv4RecvErr` and `Ipv6RecvErr` sockopts and associated control messages. 347 (#[1514](https://github.com/nix-rust/nix/pull/1514)) 348- Added `AsRawFd` implementation on `PollFd`. 349 (#[1516](https://github.com/nix-rust/nix/pull/1516)) 350- Added `Ipv4Ttl` and `Ipv6Ttl` sockopts. 351 (#[1515](https://github.com/nix-rust/nix/pull/1515)) 352- Added `MAP_EXCL`, `MAP_ALIGNED_SUPER`, and `MAP_CONCEAL` mmap flags, and 353 exposed `MAP_ANONYMOUS` for all operating systems. 354 (#[1522](https://github.com/nix-rust/nix/pull/1522)) 355 (#[1525](https://github.com/nix-rust/nix/pull/1525)) 356 (#[1531](https://github.com/nix-rust/nix/pull/1531)) 357 (#[1534](https://github.com/nix-rust/nix/pull/1534)) 358- Added read/write accessors for 'events' on `PollFd`. 359 (#[1517](https://github.com/nix-rust/nix/pull/1517)) 360 361### Changed 362 363- `FdSet::{contains, highest, fds}` no longer require a mutable reference. 364 (#[1464](https://github.com/nix-rust/nix/pull/1464)) 365- `User::gecos` and corresponding `libc::passwd::pw_gecos` are supported on 366 64-bit Android, change conditional compilation to include the field in 367 64-bit Android builds 368 (#[1471](https://github.com/nix-rust/nix/pull/1471)) 369- `eventfd`s are supported on Android, change conditional compilation to 370 include `sys::eventfd::eventfd` and `sys::eventfd::EfdFlags`for Android 371 builds. 372 (#[1481](https://github.com/nix-rust/nix/pull/1481)) 373- Most enums that come from C, for example `Errno`, are now marked as 374 `#[non_exhaustive]`. 375 (#[1474](https://github.com/nix-rust/nix/pull/1474)) 376- Many more functions, mostly contructors, are now `const`. 377 (#[1476](https://github.com/nix-rust/nix/pull/1476)) 378 (#[1492](https://github.com/nix-rust/nix/pull/1492)) 379- `sys::event::KEvent::filter` now returns a `Result` instead of being 380 infalliable. The only cases where it will now return an error are cases 381 where it previously would've had undefined behavior. 382 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 383- Minimum supported Rust version is now 1.46.0. 384 ([#1492](https://github.com/nix-rust/nix/pull/1492)) 385- Rework `UnixAddr` to encapsulate internals better in order to fix soundness 386 issues. No longer allows creating a `UnixAddr` from a raw `sockaddr_un`. 387 ([#1496](https://github.com/nix-rust/nix/pull/1496)) 388- Raised bitflags to 1.3.0 and the MSRV to 1.46.0. 389 ([#1492](https://github.com/nix-rust/nix/pull/1492)) 390 391### Fixed 392 393- `posix_fadvise` now returns errors in the conventional way, rather than as a 394 non-zero value in `Ok()`. 395 (#[1538](https://github.com/nix-rust/nix/pull/1538)) 396- Added more errno definitions for better backwards compatibility with 397 Nix 0.21.0. 398 (#[1467](https://github.com/nix-rust/nix/pull/1467)) 399- Fixed potential undefined behavior in `Signal::try_from` on some platforms. 400 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 401- Fixed buffer overflow in `unistd::getgrouplist`. 402 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 403 404 405### Removed 406 407- Removed a couple of termios constants on redox that were never actually 408 supported. 409 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 410- Removed `nix::sys::signal::NSIG`. It was of dubious utility, and not correct 411 for all platforms. 412 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 413- Removed support for 32-bit Apple targets, since they've been dropped by both 414 Rustc and Xcode. 415 (#[1492](https://github.com/nix-rust/nix/pull/1492)) 416- Deprecated `SockAddr/InetAddr::to_str` in favor of `ToString::to_string` 417 (#[1495](https://github.com/nix-rust/nix/pull/1495)) 418- Removed `SigevNotify` on OpenBSD and Redox. 419 (#[1511](https://github.com/nix-rust/nix/pull/1511)) 420 421## [0.22.3] - 22 January 2022 422### Changed 423- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts 424 #1492. From now on, the MSRV is not guaranteed to work with all versions of 425 all dependencies, just with some version of all dependencies. 426 (#[1607](https://github.com/nix-rust/nix/pull/1607)) 427 428## [0.22.2] - 28 September 2021 429### Fixed 430- Fixed buffer overflow in `unistd::getgrouplist`. 431 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 432- Added more errno definitions for better backwards compatibility with 433 Nix 0.21.0. 434 (#[1467](https://github.com/nix-rust/nix/pull/1467)) 435 436## [0.22.1] - 13 August 2021 437### Fixed 438- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 439 440### Removed 441- Removed a couple of termios constants on redox that were never actually 442 supported. 443 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 444 445## [0.22.0] - 9 July 2021 446### Added 447- Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445)) 448- Added `nmount` for FreeBSD. 449 (#[1453](https://github.com/nix-rust/nix/pull/1453)) 450- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android. 451 (#[1456](https://github.com/nix-rust/nix/pull/1456)) 452- Added `TcpUserTimeout` socket option (sockopt) on Linux and Fuchsia. 453 (#[1457](https://github.com/nix-rust/nix/pull/1457)) 454- Added `renameat2` for Linux 455 (#[1458](https://github.com/nix-rust/nix/pull/1458)) 456- Added `RxqOvfl` support on Linux, Fuchsia and Android. 457 (#[1455](https://github.com/nix-rust/nix/pull/1455)) 458 459### Changed 460- `ptsname_r` now returns a lossily-converted string in the event of bad UTF, 461 just like `ptsname`. 462 ([#1446](https://github.com/nix-rust/nix/pull/1446)) 463- Nix's error type is now a simple wrapper around the platform's Errno. This 464 means it is now `Into<std::io::Error>`. It's also `Clone`, `Copy`, `Eq`, and 465 has a small fixed size. It also requires less typing. For example, the old 466 enum variant `nix::Error::Sys(nix::errno::Errno::EINVAL)` is now simply 467 `nix::Error::EINVAL`. 468 ([#1446](https://github.com/nix-rust/nix/pull/1446)) 469 470## [0.21.2] - 29 September 2021 471### Fixed 472- Fixed buffer overflow in `unistd::getgrouplist`. 473 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 474 475## [0.21.1] - 13 August 2021 476### Fixed 477- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 478 479### Removed 480- Removed a couple of termios constants on redox that were never actually 481 supported. 482 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 483 484## [0.21.0] - 31 May 2021 485### Added 486- Added `getresuid` and `getresgid` 487 (#[1430](https://github.com/nix-rust/nix/pull/1430)) 488- Added TIMESTAMPNS support for linux 489 (#[1402](https://github.com/nix-rust/nix/pull/1402)) 490- Added `sendfile64` (#[1439](https://github.com/nix-rust/nix/pull/1439)) 491- Added `MS_LAZYTIME` to `MsFlags` 492 (#[1437](https://github.com/nix-rust/nix/pull/1437)) 493 494### Changed 495- Made `forkpty` unsafe, like `fork` 496 (#[1390](https://github.com/nix-rust/nix/pull/1390)) 497- Made `Uid`, `Gid` and `Pid` methods `from_raw` and `as_raw` a `const fn` 498 (#[1429](https://github.com/nix-rust/nix/pull/1429)) 499- Made `Uid::is_root` a `const fn` 500 (#[1429](https://github.com/nix-rust/nix/pull/1429)) 501- `AioCb` is now always pinned. Once a `libc::aiocb` gets sent to the kernel, 502 its address in memory must not change. Nix now enforces that by using 503 `std::pin`. Most users won't need to change anything, except when using 504 `aio_suspend`. See that method's documentation for the new usage. 505 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 506- `LioCb` is now constructed using a distinct `LioCbBuilder` struct. This 507 avoids a soundness issue with the old `LioCb`. Usage is similar but 508 construction now uses the builder pattern. See the documentation for 509 details. 510 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 511- Minimum supported Rust version is now 1.41.0. 512 ([#1440](https://github.com/nix-rust/nix/pull/1440)) 513- Errno aliases are now associated consts on `Errno`, instead of consts in the 514 `errno` module. 515 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 516 517### Fixed 518- Allow `sockaddr_ll` size, as reported by the Linux kernel, to be smaller then it's definition 519 (#[1395](https://github.com/nix-rust/nix/pull/1395)) 520- Fix spurious errors using `sendmmsg` with multiple cmsgs 521 (#[1414](https://github.com/nix-rust/nix/pull/1414)) 522- Added `Errno::EOPNOTSUPP` to FreeBSD, where it was missing. 523 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 524 525### Removed 526 527- Removed `sys::socket::accept4` from Android arm because libc removed it in 528 version 0.2.87. 529 ([#1399](https://github.com/nix-rust/nix/pull/1399)) 530- `AioCb::from_boxed_slice` and `AioCb::from_boxed_mut_slice` have been 531 removed. They were useful with earlier versions of Rust, but should no 532 longer be needed now that async/await are available. `AioCb`s now work 533 exclusively with borrowed buffers, not owned ones. 534 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 535- Removed some Errno values from platforms where they aren't actually defined. 536 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 537 538## [0.20.2] - 28 September 2021 539### Fixed 540- Fixed buffer overflow in `unistd::getgrouplist`. 541 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 542 543## [0.20.1] - 13 August 2021 544### Fixed 545- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 546 547### Removed 548- Removed a couple of termios constants on redox that were never actually 549 supported. 550 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 551 552## [0.20.0] - 20 February 2021 553### Added 554 555- Added a `passwd` field to `Group` (#[1338](https://github.com/nix-rust/nix/pull/1338)) 556- Added `mremap` (#[1306](https://github.com/nix-rust/nix/pull/1306)) 557- Added `personality` (#[1331](https://github.com/nix-rust/nix/pull/1331)) 558- Added limited Fuchsia support (#[1285](https://github.com/nix-rust/nix/pull/1285)) 559- Added `getpeereid` (#[1342](https://github.com/nix-rust/nix/pull/1342)) 560- Implemented `IntoIterator` for `Dir` 561 (#[1333](https://github.com/nix-rust/nix/pull/1333)). 562 563### Changed 564 565- Minimum supported Rust version is now 1.40.0. 566 ([#1356](https://github.com/nix-rust/nix/pull/1356)) 567- i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated 568 by Xcode. 569 (#[1350](https://github.com/nix-rust/nix/pull/1350)) 570- Fixed calling `recvfrom` on an `AddrFamily::Packet` socket 571 (#[1344](https://github.com/nix-rust/nix/pull/1344)) 572 573### Fixed 574- `TimerFd` now closes the underlying fd on drop. 575 ([#1381](https://github.com/nix-rust/nix/pull/1381)) 576- Define `*_MAGIC` filesystem constants on Linux s390x 577 (#[1372](https://github.com/nix-rust/nix/pull/1372)) 578- mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 579 (#[1366](https://github.com/nix-rust/nix/pull/1366)) 580 581### Removed 582 583- `Dir`, `SignalFd`, and `PtyMaster` are no longer `Clone`. 584 (#[1382](https://github.com/nix-rust/nix/pull/1382)) 585- Removed `SockLevel`, which hasn't been used for a few years 586 (#[1362](https://github.com/nix-rust/nix/pull/1362)) 587- Removed both `Copy` and `Clone` from `TimerFd`. 588 ([#1381](https://github.com/nix-rust/nix/pull/1381)) 589 590## [0.19.1] - 28 November 2020 591### Fixed 592- Fixed bugs in `recvmmsg`. 593 (#[1341](https://github.com/nix-rust/nix/pull/1341)) 594 595## [0.19.0] - 6 October 2020 596### Added 597- Added Netlink protocol families to the `SockProtocol` enum 598 (#[1289](https://github.com/nix-rust/nix/pull/1289)) 599- Added `clock_gettime`, `clock_settime`, `clock_getres`, 600 `clock_getcpuclockid` functions and `ClockId` struct. 601 (#[1281](https://github.com/nix-rust/nix/pull/1281)) 602- Added wrapper functions for `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP`. 603 (#[1300](https://github.com/nix-rust/nix/pull/1300)) 604- Add support for Vsock on Android rather than just Linux. 605 (#[1301](https://github.com/nix-rust/nix/pull/1301)) 606- Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options. 607 (#[1283](https://github.com/nix-rust/nix/pull/1283)) 608### Changed 609- Expose `SeekData` and `SeekHole` on all Linux targets 610 (#[1284](https://github.com/nix-rust/nix/pull/1284)) 611- Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s). 612 (#[1278](https://github.com/nix-rust/nix/pull/1278)) 613- Made `unistd::fork` an unsafe funtion, bringing it in line with [libstd's decision](https://github.com/rust-lang/rust/pull/58059). 614 (#[1293](https://github.com/nix-rust/nix/pull/1293)) 615 616## [0.18.0] - 26 July 2020 617### Added 618- Added `fchown(2)` wrapper. 619 (#[1257](https://github.com/nix-rust/nix/pull/1257)) 620- Added support on linux systems for `MAP_HUGE_`_`SIZE`_ family of flags. 621 (#[1211](https://github.com/nix-rust/nix/pull/1211)) 622- Added support for `F_OFD_*` `fcntl` commands on Linux and Android. 623 (#[1195](https://github.com/nix-rust/nix/pull/1195)) 624- Added `env::clearenv()`: calls `libc::clearenv` on platforms 625 where it's available, and clears the environment of all variables 626 via `std::env::vars` and `std::env::remove_var` on others. 627 (#[1185](https://github.com/nix-rust/nix/pull/1185)) 628- `FsType` inner value made public. 629 (#[1187](https://github.com/nix-rust/nix/pull/1187)) 630- Added `unistd::setfsuid` and `unistd::setfsgid` to set the user or group 631 identity for filesystem checks per-thread. 632 (#[1163](https://github.com/nix-rust/nix/pull/1163)) 633- Derived `Ord`, `PartialOrd` for `unistd::Pid` (#[1189](https://github.com/nix-rust/nix/pull/1189)) 634- Added `select::FdSet::fds` method to iterate over file descriptors in a set. 635 ([#1207](https://github.com/nix-rust/nix/pull/1207)) 636- Added support for UDP generic segmentation offload (GSO) and generic 637 receive offload (GRO) ([#1209](https://github.com/nix-rust/nix/pull/1209)) 638- Added support for `sendmmsg` and `recvmmsg` calls 639 (#[1208](https://github.com/nix-rust/nix/pull/1208)) 640- Added support for `SCM_CREDS` messages (`UnixCredentials`) on FreeBSD/DragonFly 641 (#[1216](https://github.com/nix-rust/nix/pull/1216)) 642- Added `BindToDevice` socket option (sockopt) on Linux 643 (#[1233](https://github.com/nix-rust/nix/pull/1233)) 644- Added `EventFilter` bitflags for `EV_DISPATCH` and `EV_RECEIPT` on OpenBSD. 645 (#[1252](https://github.com/nix-rust/nix/pull/1252)) 646- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage`. 647 (#[1222](https://github.com/nix-rust/nix/pull/1222)) 648- `CpuSet` and `UnixCredentials` now implement `Default`. 649 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 650- Added `unistd::ttyname` 651 (#[1259](https://github.com/nix-rust/nix/pull/1259)) 652- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage` for iOS and Android. 653 (#[1265](https://github.com/nix-rust/nix/pull/1265)) 654- Added support for `TimerFd`. 655 (#[1261](https://github.com/nix-rust/nix/pull/1261)) 656 657### Changed 658- Changed `fallocate` return type from `c_int` to `()` (#[1201](https://github.com/nix-rust/nix/pull/1201)) 659- Enabled `sys::ptrace::setregs` and `sys::ptrace::getregs` on x86_64-unknown-linux-musl target 660 (#[1198](https://github.com/nix-rust/nix/pull/1198)) 661- On Linux, `ptrace::write` is now an `unsafe` function. Caveat programmer. 662 (#[1245](https://github.com/nix-rust/nix/pull/1245)) 663- `execv`, `execve`, `execvp` and `execveat` in `::nix::unistd` and `reboot` in 664 `::nix::sys::reboot` now return `Result<Infallible>` instead of `Result<Void>` (#[1239](https://github.com/nix-rust/nix/pull/1239)) 665- `sys::socket::sockaddr_storage_to_addr` is no longer `unsafe`. So is 666 `offset_of!`. 667- `sys::socket::sockaddr_storage_to_addr`, `offset_of!`, and `Errno::clear` are 668 no longer `unsafe`. 669- `SockAddr::as_ffi_pair`,`sys::socket::sockaddr_storage_to_addr`, `offset_of!`, 670 and `Errno::clear` are no longer `unsafe`. 671 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 672- Several `Inotify` methods now take `self` by value instead of by reference 673 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 674- `nix::poll::ppoll`: `timeout` parameter is now optional, None is equivalent for infinite timeout. 675 676### Fixed 677 678- Fixed `getsockopt`. The old code produced UB which triggers a panic with 679 Rust 1.44.0. 680 (#[1214](https://github.com/nix-rust/nix/pull/1214)) 681 682- Fixed a bug in nix::unistd that would result in an infinite loop 683 when a group or user lookup required a buffer larger than 684 16KB. (#[1198](https://github.com/nix-rust/nix/pull/1198)) 685- Fixed unaligned casting of `cmsg_data` to `af_alg_iv` (#[1206](https://github.com/nix-rust/nix/pull/1206)) 686- Fixed `readlink`/`readlinkat` when reading symlinks longer than `PATH_MAX` (#[1231](https://github.com/nix-rust/nix/pull/1231)) 687- `PollFd`, `EpollEvent`, `IpMembershipRequest`, `Ipv6MembershipRequest`, 688 `TimeVal`, and `IoVec` are now `repr(transparent)`. This is required for 689 correctness's sake across all architectures and compilers, though now bugs 690 have been reported so far. 691 (#[1243](https://github.com/nix-rust/nix/pull/1243)) 692- Fixed unaligned pointer read in `Inotify::read_events`. 693 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 694 695### Removed 696 697- Removed `sys::socket::addr::from_libc_sockaddr` from the public API. 698 (#[1215](https://github.com/nix-rust/nix/pull/1215)) 699- Removed `sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper` 700 from the public API. These were previously hidden in the docs but still usable 701 by downstream. 702 (#[1235](https://github.com/nix-rust/nix/pull/1235)) 703 704- Nix no longer implements `NixPath` for `Option<P> where P: NixPath`. Most 705 Nix functions that accept `NixPath` arguments can't do anything useful with 706 `None`. The exceptions (`mount` and `quotactl_sync`) already take explicitly 707 optional arguments. 708 (#[1242](https://github.com/nix-rust/nix/pull/1242)) 709 710- Removed `unistd::daemon` and `unistd::pipe2` on OSX and ios 711 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 712 713- Removed `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` and 714 `sys::event::FilterFlag::NOTE_REAP` on OSX and ios. 715 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 716 717- Removed `sys::ptrace::ptrace` on Android and Linux. 718 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 719 720- Dropped support for powerpc64-unknown-linux-gnu 721 (#[1266](https://github.com/nix-rust/nix/pull/1268)) 722 723## [0.17.0] - 3 February 2020 724### Added 725- Add `CLK_TCK` to `SysconfVar` 726 (#[1177](https://github.com/nix-rust/nix/pull/1177)) 727### Removed 728- Removed deprecated Error::description from error types 729 (#[1175](https://github.com/nix-rust/nix/pull/1175)) 730 731## [0.16.1] - 23 December 2019 732### Fixed 733 734- Fixed the build for OpenBSD 735 (#[1168](https://github.com/nix-rust/nix/pull/1168)) 736 737## [0.16.0] - 1 December 2019 738### Added 739- Added `ptrace::seize()`: similar to `attach()` on Linux 740 but with better-defined semantics. 741 (#[1154](https://github.com/nix-rust/nix/pull/1154)) 742 743- Added `Signal::as_str()`: returns signal name as `&'static str` 744 (#[1138](https://github.com/nix-rust/nix/pull/1138)) 745 746- Added `posix_fallocate`. 747 ([#1105](https://github.com/nix-rust/nix/pull/1105)) 748 749- Implemented `Default` for `FdSet` 750 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 751 752- Added `NixPath::is_empty`. 753 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 754 755- Added `mkfifoat` 756 ([#1133](https://github.com/nix-rust/nix/pull/1133)) 757 758- Added `User::from_uid`, `User::from_name`, `User::from_gid` and 759 `Group::from_name`, 760 ([#1139](https://github.com/nix-rust/nix/pull/1139)) 761 762- Added `linkat` 763 ([#1101](https://github.com/nix-rust/nix/pull/1101)) 764 765- Added `sched_getaffinity`. 766 ([#1148](https://github.com/nix-rust/nix/pull/1148)) 767 768- Added optional `Signal` argument to `ptrace::{detach, syscall}` for signal 769 injection. ([#1083](https://github.com/nix-rust/nix/pull/1083)) 770 771### Changed 772- `sys::termios::BaudRate` now implements `TryFrom<speed_t>` instead of 773 `From<speed_t>`. The old `From` implementation would panic on failure. 774 ([#1159](https://github.com/nix-rust/nix/pull/1159)) 775 776- `sys::socket::ControlMessage::ScmCredentials` and 777 `sys::socket::ControlMessageOwned::ScmCredentials` now wrap `UnixCredentials` 778 rather than `libc::ucred`. 779 ([#1160](https://github.com/nix-rust/nix/pull/1160)) 780 781- `sys::socket::recvmsg` now takes a plain `Vec` instead of a `CmsgBuffer` 782 implementor. If you were already using `cmsg_space!`, then you needn't worry. 783 ([#1156](https://github.com/nix-rust/nix/pull/1156)) 784 785- `sys::socket::recvfrom` now returns 786 `Result<(usize, Option<SockAddr>)>` instead of `Result<(usize, SockAddr)>`. 787 ([#1145](https://github.com/nix-rust/nix/pull/1145)) 788 789- `Signal::from_c_int` has been replaced by `Signal::try_from` 790 ([#1113](https://github.com/nix-rust/nix/pull/1113)) 791 792- Changed `readlink` and `readlinkat` to return `OsString` 793 ([#1109](https://github.com/nix-rust/nix/pull/1109)) 794 795 ```rust 796 # use nix::fcntl::{readlink, readlinkat}; 797 // the buffer argument of `readlink` and `readlinkat` has been removed, 798 // and the return value is now an owned type (`OsString`). 799 // Existing code can be updated by removing the buffer argument 800 // and removing any clone or similar operation on the output 801 802 // old code `readlink(&path, &mut buf)` can be replaced with the following 803 let _: OsString = readlink(&path); 804 805 // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following 806 let _: OsString = readlinkat(dirfd, &path); 807 ``` 808 809- Minimum supported Rust version is now 1.36.0. 810 ([#1108](https://github.com/nix-rust/nix/pull/1108)) 811 812- `Ipv4Addr::octets`, `Ipv4Addr::to_std`, `Error::as_errno`, 813 `ForkResult::is_child`, `ForkResult::is_parent`, `Gid::as_raw`, 814 `Uid::is_root`, `Uid::as_raw`, `Pid::as_raw`, and `PollFd::revents` now take 815 `self` by value. 816 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 817 818- Type `&CString` for parameters of `exec(v|ve|vp|vpe|veat)` are changed to `&CStr`. 819 ([#1121](https://github.com/nix-rust/nix/pull/1121)) 820 821### Fixed 822- Fix length of abstract socket addresses 823 ([#1120](https://github.com/nix-rust/nix/pull/1120)) 824 825- Fix initialization of msghdr in recvmsg/sendmsg when built with musl 826 ([#1136](https://github.com/nix-rust/nix/pull/1136)) 827 828### Removed 829- Remove the deprecated `CmsgSpace`. 830 ([#1156](https://github.com/nix-rust/nix/pull/1156)) 831 832## [0.15.0] - 10 August 2019 833### Added 834- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`. 835 ([#1079](https://github.com/nix-rust/nix/pull/1079)) 836- Implemented `Clone`, `Copy`, `Debug`, `Eq`, `Hash`, and `PartialEq` for most 837 types that support them. ([#1035](https://github.com/nix-rust/nix/pull/1035)) 838- Added `copy_file_range` wrapper 839 ([#1069](https://github.com/nix-rust/nix/pull/1069)) 840- Add `mkdirat`. 841 ([#1084](https://github.com/nix-rust/nix/pull/1084)) 842- Add `posix_fadvise`. 843 ([#1089](https://github.com/nix-rust/nix/pull/1089)) 844- Added `AF_VSOCK` to `AddressFamily`. 845 ([#1091](https://github.com/nix-rust/nix/pull/1091)) 846- Add `unlinkat` 847 ([#1058](https://github.com/nix-rust/nix/pull/1058)) 848- Add `renameat`. 849 ([#1097](https://github.com/nix-rust/nix/pull/1097)) 850 851### Changed 852- Support for `ifaddrs` now present when building for Android. 853 ([#1077](https://github.com/nix-rust/nix/pull/1077)) 854- Minimum supported Rust version is now 1.31.0 855 ([#1035](https://github.com/nix-rust/nix/pull/1035)) 856 ([#1095](https://github.com/nix-rust/nix/pull/1095)) 857- Now functions `statfs()` and `fstatfs()` return result with `Statfs` wrapper 858 ([#928](https://github.com/nix-rust/nix/pull/928)) 859 860### Fixed 861- Enabled `sched_yield` for all nix hosts. 862 ([#1090](https://github.com/nix-rust/nix/pull/1090)) 863 864## [0.14.1] - 2019-06-06 865### Added 866- Macros exported by `nix` may now be imported via `use` on the Rust 2018 867 edition without importing helper macros on Linux targets. 868 ([#1066](https://github.com/nix-rust/nix/pull/1066)) 869 870 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 871 without importing the `convert_ioctl_res!` macro. 872 873 ```rust 874 use nix::ioctl_read_bad; 875 876 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 877 ``` 878 879### Changed 880- Changed some public types from reexports of libc types like `uint32_t` to the 881 native equivalents like `u32.` 882 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 883 884### Fixed 885- Fix the build on Android and Linux/mips with recent versions of libc. 886 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 887 888## [0.14.0] - 2019-05-21 889### Added 890- Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. 891 ([#1002](https://github.com/nix-rust/nix/pull/1002)) 892- Added `inotify_init1`, `inotify_add_watch` and `inotify_rm_watch` wrappers for 893 Android and Linux. ([#1016](https://github.com/nix-rust/nix/pull/1016)) 894- Add `ALG_SET_IV`, `ALG_SET_OP` and `ALG_SET_AEAD_ASSOCLEN` control messages and `AF_ALG` 895 socket types on Linux and Android ([#1031](https://github.com/nix-rust/nix/pull/1031)) 896- Add killpg 897 ([#1034](https://github.com/nix-rust/nix/pull/1034)) 898- Added ENOTSUP errno support for Linux and Android. 899 ([#969](https://github.com/nix-rust/nix/pull/969)) 900- Add several errno constants from OpenBSD 6.2 901 ([#1036](https://github.com/nix-rust/nix/pull/1036)) 902- Added `from_std` and `to_std` methods for `sys::socket::IpAddr` 903 ([#1043](https://github.com/nix-rust/nix/pull/1043)) 904- Added `nix::unistd:seteuid` and `nix::unistd::setegid` for those platforms that do 905 not support `setresuid` nor `setresgid` respectively. 906 ([#1044](https://github.com/nix-rust/nix/pull/1044)) 907- Added a `access` wrapper 908 ([#1045](https://github.com/nix-rust/nix/pull/1045)) 909- Add `forkpty` 910 ([#1042](https://github.com/nix-rust/nix/pull/1042)) 911- Add `sched_yield` 912 ([#1050](https://github.com/nix-rust/nix/pull/1050)) 913 914### Changed 915- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) 916- `recvmsg` now returns an Iterator over `ControlMessageOwned` objects rather 917 than `ControlMessage` objects. This is sadly not backwards-compatible. Fix 918 code like this: 919 ```rust 920 if let ControlMessage::ScmRights(&fds) = cmsg { 921 ``` 922 923 By replacing it with code like this: 924 ```rust 925 if let ControlMessageOwned::ScmRights(fds) = cmsg { 926 ``` 927 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 928- Replaced `CmsgSpace` with the `cmsg_space` macro. 929 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 930 931### Fixed 932- Fixed multiple bugs when using `sendmsg` and `recvmsg` with ancillary control messages 933 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 934- Macros exported by `nix` may now be imported via `use` on the Rust 2018 935 edition without importing helper macros for BSD targets. 936 ([#1041](https://github.com/nix-rust/nix/pull/1041)) 937 938 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 939 without importing the `convert_ioctl_res!` macro. 940 941 ```rust 942 use nix::ioctl_read_bad; 943 944 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 945 ``` 946 947### Removed 948- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 949 and iOS. 950 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 951- `PTRACE_GETREGS`, `PTRACE_SETREGS`, `PTRACE_GETFPREGS`, and 952 `PTRACE_SETFPREGS` have been removed from some platforms where they never 953 should've been defined in the first place. 954 ([#1055](https://github.com/nix-rust/nix/pull/1055)) 955 956## [0.13.1] - 2019-06-10 957### Changed 958- Changed some public types from reexports of libc types like `uint32_t` to the 959 native equivalents like `u32.` 960 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 961 962### Fixed 963- Fix the build on Android and Linux/mips with recent versions of libc. 964 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 965- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 966 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 967 968### Removed 969- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 970 and iOS. 971 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 972 973## [0.13.0] - 2019-01-15 974### Added 975- Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. 976 ([#990](https://github.com/nix-rust/nix/pull/990)) 977- Added support of CString type in `setsockopt`. 978 ([#972](https://github.com/nix-rust/nix/pull/972)) 979- Added option `TCP_CONGESTION` in `setsockopt`. 980 ([#972](https://github.com/nix-rust/nix/pull/972)) 981- Added `symlinkat` wrapper. 982 ([#997](https://github.com/nix-rust/nix/pull/997)) 983- Added `ptrace::{getregs, setregs}`. 984 ([#1010](https://github.com/nix-rust/nix/pull/1010)) 985- Added `nix::sys::signal::signal`. 986 ([#817](https://github.com/nix-rust/nix/pull/817)) 987- Added an `mprotect` wrapper. 988 ([#991](https://github.com/nix-rust/nix/pull/991)) 989 990### Fixed 991- `lutimes` never worked on OpenBSD as it is not implemented on OpenBSD. It has 992 been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 993- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 994 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 995 996## [0.12.1] 2019-06-08 997### Changed 998- Changed some public types from reexports of libc types like `uint32_t` to the 999 native equivalents like `u32.` 1000 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1001 1002### Fixed 1003- Fix the build on Android and Linux/mips with recent versions of libc. 1004 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1005- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 1006 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 1007 1008### Removed 1009- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 1010 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1011- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1012 and iOS. 1013 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1014 1015## [0.12.0] 2018-11-28 1016 1017### Added 1018- Added `FromStr` and `Display` impls for `nix::sys::Signal` 1019 ([#884](https://github.com/nix-rust/nix/pull/884)) 1020- Added a `sync` wrapper. 1021 ([#961](https://github.com/nix-rust/nix/pull/961)) 1022- Added a `sysinfo` wrapper. 1023 ([#922](https://github.com/nix-rust/nix/pull/922)) 1024- Support the `SO_PEERCRED` socket option and the `UnixCredentials` type on all Linux and Android targets. 1025 ([#921](https://github.com/nix-rust/nix/pull/921)) 1026- Added support for `SCM_CREDENTIALS`, allowing to send process credentials over Unix sockets. 1027 ([#923](https://github.com/nix-rust/nix/pull/923)) 1028- Added a `dir` module for reading directories (wraps `fdopendir`, `readdir`, and `rewinddir`). 1029 ([#916](https://github.com/nix-rust/nix/pull/916)) 1030- Added `kmod` module that allows loading and unloading kernel modules on Linux. 1031 ([#930](https://github.com/nix-rust/nix/pull/930)) 1032- Added `futimens` and `utimesat` wrappers ([#944](https://github.com/nix-rust/nix/pull/944)), 1033 an `lutimes` wrapper ([#967](https://github.com/nix-rust/nix/pull/967)), 1034 and a `utimes` wrapper ([#946](https://github.com/nix-rust/nix/pull/946)). 1035- Added `AF_UNSPEC` wrapper to `AddressFamily` ([#948](https://github.com/nix-rust/nix/pull/948)) 1036- Added the `mode_t` public alias within `sys::stat`. 1037 ([#954](https://github.com/nix-rust/nix/pull/954)) 1038- Added a `truncate` wrapper. 1039 ([#956](https://github.com/nix-rust/nix/pull/956)) 1040- Added a `fchownat` wrapper. 1041 ([#955](https://github.com/nix-rust/nix/pull/955)) 1042- Added support for `ptrace` on BSD operating systems ([#949](https://github.com/nix-rust/nix/pull/949)) 1043- Added `ptrace` functions for reads and writes to tracee memory and ptrace kill 1044 ([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958)) 1045- Added a `acct` wrapper module for enabling and disabling process accounting 1046 ([#952](https://github.com/nix-rust/nix/pull/952)) 1047- Added the `time_t` and `suseconds_t` public aliases within `sys::time`. 1048 ([#968](https://github.com/nix-rust/nix/pull/968)) 1049- Added `unistd::execvpe` for Haiku, Linux and OpenBSD 1050 ([#975](https://github.com/nix-rust/nix/pull/975)) 1051- Added `Error::as_errno`. 1052 ([#977](https://github.com/nix-rust/nix/pull/977)) 1053 1054### Changed 1055- Increased required Rust version to 1.24.1 1056 ([#900](https://github.com/nix-rust/nix/pull/900)) 1057 ([#966](https://github.com/nix-rust/nix/pull/966)) 1058 1059### Fixed 1060- Made `preadv` take immutable slice of IoVec. 1061 ([#914](https://github.com/nix-rust/nix/pull/914)) 1062- Fixed passing multiple file descriptors over Unix Sockets. 1063 ([#918](https://github.com/nix-rust/nix/pull/918)) 1064 1065## [0.11.1] 2019-06-06 1066### Changed 1067- Changed some public types from reexports of libc types like `uint32_t` to the 1068 native equivalents like `u32.` 1069 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1070 1071### Fixed 1072- Fix the build on Android and Linux/mips with recent versions of libc. 1073 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1074- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 1075 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 1076 1077### Removed 1078- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 1079 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1080- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1081 and iOS. 1082 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1083 1084## [0.11.0] 2018-06-01 1085 1086### Added 1087- Added `sendfile` on FreeBSD and Darwin. 1088 ([#901](https://github.com/nix-rust/nix/pull/901)) 1089- Added `pselect` 1090 ([#894](https://github.com/nix-rust/nix/pull/894)) 1091- Exposed `preadv` and `pwritev` on the BSDs. 1092 ([#883](https://github.com/nix-rust/nix/pull/883)) 1093- Added `mlockall` and `munlockall` 1094 ([#876](https://github.com/nix-rust/nix/pull/876)) 1095- Added `SO_MARK` on Linux. 1096 ([#873](https://github.com/nix-rust/nix/pull/873)) 1097- Added safe support for nearly any buffer type in the `sys::aio` module. 1098 ([#872](https://github.com/nix-rust/nix/pull/872)) 1099- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`. 1100 ([#872](https://github.com/nix-rust/nix/pull/872)) 1101- Added `unistd::getsid` 1102 ([#850](https://github.com/nix-rust/nix/pull/850)) 1103- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830)) 1104- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems. 1105 ([#853](https://github.com/nix-rust/nix/pull/853)) 1106- Added `statvfs` module to all MacOS and Linux architectures. 1107 ([#832](https://github.com/nix-rust/nix/pull/832)) 1108- Added `EVFILT_EMPTY`, `EVFILT_PROCDESC`, and `EVFILT_SENDFILE` on FreeBSD. 1109 ([#825](https://github.com/nix-rust/nix/pull/825)) 1110- Exposed `termios::cfmakesane` on FreeBSD. 1111 ([#825](https://github.com/nix-rust/nix/pull/825)) 1112- Exposed `MSG_CMSG_CLOEXEC` on *BSD. 1113 ([#825](https://github.com/nix-rust/nix/pull/825)) 1114- Added `fchmod`, `fchmodat`. 1115 ([#857](https://github.com/nix-rust/nix/pull/857)) 1116- Added `request_code_write_int!` on FreeBSD/DragonFlyBSD 1117 ([#833](https://github.com/nix-rust/nix/pull/833)) 1118 1119### Changed 1120- `Display` and `Debug` for `SysControlAddr` now includes all fields. 1121 ([#837](https://github.com/nix-rust/nix/pull/837)) 1122- `ioctl!` has been replaced with a family of `ioctl_*!` macros. 1123 ([#833](https://github.com/nix-rust/nix/pull/833)) 1124- `io!`, `ior!`, `iow!`, and `iorw!` has been renamed to `request_code_none!`, `request_code_read!`, 1125 `request_code_write!`, and `request_code_readwrite!` respectively. These have also now been exposed 1126 in the documentation. 1127 ([#833](https://github.com/nix-rust/nix/pull/833)) 1128- Enabled more `ptrace::Request` definitions for uncommon Linux platforms 1129 ([#892](https://github.com/nix-rust/nix/pull/892)) 1130- Emulation of `FD_CLOEXEC` and `O_NONBLOCK` was removed from `socket()`, `accept4()`, and 1131 `socketpair()`. 1132 ([#907](https://github.com/nix-rust/nix/pull/907)) 1133 1134### Fixed 1135- Fixed possible panics when using `SigAction::flags` on Linux 1136 ([#869](https://github.com/nix-rust/nix/pull/869)) 1137- Properly exposed 460800 and 921600 baud rates on NetBSD 1138 ([#837](https://github.com/nix-rust/nix/pull/837)) 1139- Fixed `ioctl_write_int!` on FreeBSD/DragonFlyBSD 1140 ([#833](https://github.com/nix-rust/nix/pull/833)) 1141- `ioctl_write_int!` now properly supports passing a `c_ulong` as the parameter on Linux non-musl targets 1142 ([#833](https://github.com/nix-rust/nix/pull/833)) 1143 1144### Removed 1145- Removed explicit support for the `bytes` crate from the `sys::aio` module. 1146 See `sys::aio::AioCb::from_boxed_slice` examples for alternatives. 1147 ([#872](https://github.com/nix-rust/nix/pull/872)) 1148- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead. 1149 ([#872](https://github.com/nix-rust/nix/pull/872)) 1150- Removed emulated `accept4()` from macos, ios, and netbsd targets 1151 ([#907](https://github.com/nix-rust/nix/pull/907)) 1152- Removed `IFF_NOTRAILERS` on OpenBSD, as it has been removed in OpenBSD 6.3 1153 ([#893](https://github.com/nix-rust/nix/pull/893)) 1154 1155## [0.10.0] 2018-01-26 1156 1157### Added 1158- Added specialized wrapper: `sys::ptrace::step` 1159 ([#852](https://github.com/nix-rust/nix/pull/852)) 1160- Added `AioCb::from_ptr` and `AioCb::from_mut_ptr` 1161 ([#820](https://github.com/nix-rust/nix/pull/820)) 1162- Added specialized wrappers: `sys::ptrace::{traceme, syscall, cont, attach}`. Using the matching routines 1163 with `sys::ptrace::ptrace` is now deprecated. 1164- Added `nix::poll` module for all platforms 1165 ([#672](https://github.com/nix-rust/nix/pull/672)) 1166- Added `nix::ppoll` function for FreeBSD and DragonFly 1167 ([#672](https://github.com/nix-rust/nix/pull/672)) 1168- Added protocol families in `AddressFamily` enum. 1169 ([#647](https://github.com/nix-rust/nix/pull/647)) 1170- Added the `pid()` method to `WaitStatus` for extracting the PID. 1171 ([#722](https://github.com/nix-rust/nix/pull/722)) 1172- Added `nix::unistd:fexecve`. 1173 ([#727](https://github.com/nix-rust/nix/pull/727)) 1174- Expose `uname()` on all platforms. 1175 ([#739](https://github.com/nix-rust/nix/pull/739)) 1176- Expose `signalfd` module on Android as well. 1177 ([#739](https://github.com/nix-rust/nix/pull/739)) 1178- Added `nix::sys::ptrace::detach`. 1179 ([#749](https://github.com/nix-rust/nix/pull/749)) 1180- Added timestamp socket control message variant: 1181 `nix::sys::socket::ControlMessage::ScmTimestamp` 1182 ([#663](https://github.com/nix-rust/nix/pull/663)) 1183- Added socket option variant that enables the timestamp socket 1184 control message: `nix::sys::socket::sockopt::ReceiveTimestamp` 1185 ([#663](https://github.com/nix-rust/nix/pull/663)) 1186- Added more accessor methods for `AioCb` 1187 ([#773](https://github.com/nix-rust/nix/pull/773)) 1188- Add `nix::sys::fallocate` 1189 ([#768](https:://github.com/nix-rust/nix/pull/768)) 1190- Added `nix::unistd::mkfifo`. 1191 ([#602](https://github.com/nix-rust/nix/pull/774)) 1192- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android. 1193 ([#771](https://github.com/nix-rust/nix/pull/771)) 1194- Added `nix::sys::uio::{process_vm_readv, process_vm_writev}` on Linux 1195 ([#568](https://github.com/nix-rust/nix/pull/568)) 1196- Added `nix::unistd::{getgroups, setgroups, getgrouplist, initgroups}`. ([#733](https://github.com/nix-rust/nix/pull/733)) 1197- Added `nix::sys::socket::UnixAddr::as_abstract` on Linux and Android. 1198 ([#785](https://github.com/nix-rust/nix/pull/785)) 1199- Added `nix::unistd::execveat` on Linux and Android. 1200 ([#800](https://github.com/nix-rust/nix/pull/800)) 1201- Added the `from_raw()` method to `WaitStatus` for converting raw status values 1202 to `WaitStatus` independent of syscalls. 1203 ([#741](https://github.com/nix-rust/nix/pull/741)) 1204- Added more standard trait implementations for various types. 1205 ([#814](https://github.com/nix-rust/nix/pull/814)) 1206- Added `sigprocmask` to the signal module. 1207 ([#826](https://github.com/nix-rust/nix/pull/826)) 1208- Added `nix::sys::socket::LinkAddr` on Linux and all bsdlike system. 1209 ([#813](https://github.com/nix-rust/nix/pull/813)) 1210- Add socket options for `IP_TRANSPARENT` / `BIND_ANY`. 1211 ([#835](https://github.com/nix-rust/nix/pull/835)) 1212 1213### Changed 1214- Exposed the `mqueue` module for all supported operating systems. 1215 ([#834](https://github.com/nix-rust/nix/pull/834)) 1216- Use native `pipe2` on all BSD targets. Users should notice no difference. 1217 ([#777](https://github.com/nix-rust/nix/pull/777)) 1218- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692)) 1219- Marked `sys::ptrace::ptrace` as `unsafe`. 1220- Changed function signature of `socket()` and `socketpair()`. The `protocol` argument 1221 has changed type from `c_int` to `SockProtocol`. 1222 It accepts a `None` value for default protocol that was specified with zero using `c_int`. 1223 ([#647](https://github.com/nix-rust/nix/pull/647)) 1224- Made `select` easier to use, adding the ability to automatically calculate the `nfds` parameter using the new 1225 `FdSet::highest` ([#701](https://github.com/nix-rust/nix/pull/701)) 1226- Exposed `unistd::setresuid` and `unistd::setresgid` on FreeBSD and OpenBSD 1227 ([#721](https://github.com/nix-rust/nix/pull/721)) 1228- Refactored the `statvfs` module removing extraneous API functions and the 1229 `statvfs::vfs` module. Additionally `(f)statvfs()` now return the struct 1230 directly. And the returned `Statvfs` struct now exposes its data through 1231 accessor methods. ([#729](https://github.com/nix-rust/nix/pull/729)) 1232- The `addr` argument to `madvise` and `msync` is now `*mut` to better match the 1233 libc API. ([#731](https://github.com/nix-rust/nix/pull/731)) 1234- `shm_open` and `shm_unlink` are no longer exposed on Android targets, where 1235 they are not officially supported. ([#731](https://github.com/nix-rust/nix/pull/731)) 1236- `MapFlags`, `MmapAdvise`, and `MsFlags` expose some more variants and only 1237 officially-supported variants are provided for each target. 1238 ([#731](https://github.com/nix-rust/nix/pull/731)) 1239- Marked `pty::ptsname` function as `unsafe` 1240 ([#744](https://github.com/nix-rust/nix/pull/744)) 1241- Moved constants ptrace request, event and options to enums and updated ptrace functions and argument types accordingly. 1242 ([#749](https://github.com/nix-rust/nix/pull/749)) 1243- `AioCb::Drop` will now panic if the `AioCb` is still in-progress ([#715](https://github.com/nix-rust/nix/pull/715)) 1244- Restricted `nix::sys::socket::UnixAddr::new_abstract` to Linux and Android only. 1245 ([#785](https://github.com/nix-rust/nix/pull/785)) 1246- The `ucred` struct has been removed in favor of a `UserCredentials` struct that 1247 contains only getters for its fields. 1248 ([#814](https://github.com/nix-rust/nix/pull/814)) 1249- Both `ip_mreq` and `ipv6_mreq` have been replaced with `IpMembershipRequest` and 1250 `Ipv6MembershipRequest`. 1251 ([#814](https://github.com/nix-rust/nix/pull/814)) 1252- Removed return type from `pause`. 1253 ([#829](https://github.com/nix-rust/nix/pull/829)) 1254- Changed the termios APIs to allow for using a `u32` instead of the `BaudRate` 1255 enum on BSD platforms to support arbitrary baud rates. See the module docs for 1256 `nix::sys::termios` for more details. 1257 ([#843](https://github.com/nix-rust/nix/pull/843)) 1258 1259### Fixed 1260- Fix compilation and tests for OpenBSD targets 1261 ([#688](https://github.com/nix-rust/nix/pull/688)) 1262- Fixed error handling in `AioCb::fsync`, `AioCb::read`, and `AioCb::write`. 1263 It is no longer an error to drop an `AioCb` that failed to enqueue in the OS. 1264 ([#715](https://github.com/nix-rust/nix/pull/715)) 1265- Fix potential memory corruption on non-Linux platforms when using 1266 `sendmsg`/`recvmsg`, caused by mismatched `msghdr` definition. 1267 ([#648](https://github.com/nix-rust/nix/pull/648)) 1268 1269### Removed 1270- `AioCb::from_boxed_slice` has been removed. It was never actually safe. Use 1271 `from_bytes` or `from_bytes_mut` instead. 1272 ([#820](https://github.com/nix-rust/nix/pull/820)) 1273- The syscall module has been removed. This only exposed enough functionality for 1274 `memfd_create()` and `pivot_root()`, which are still exposed as separate functions. 1275 ([#747](https://github.com/nix-rust/nix/pull/747)) 1276- The `Errno` variants are no longer reexported from the `errno` module. `Errno` itself is no longer reexported from the 1277 crate root and instead must be accessed using the `errno` module. ([#696](https://github.com/nix-rust/nix/pull/696)) 1278- Removed `MS_VERBOSE`, `MS_NOSEC`, and `MS_BORN` from `MsFlags`. These 1279 are internal kernel flags and should never have been exposed. 1280 ([#814](https://github.com/nix-rust/nix/pull/814)) 1281 1282 1283## [0.9.0] 2017-07-23 1284 1285### Added 1286- Added `sysconf`, `pathconf`, and `fpathconf` 1287 ([#630](https://github.com/nix-rust/nix/pull/630) 1288- Added `sys::signal::SigAction::{ flags, mask, handler}` 1289 ([#611](https://github.com/nix-rust/nix/pull/609) 1290- Added `nix::sys::pthread::pthread_self` 1291 ([#591](https://github.com/nix-rust/nix/pull/591) 1292- Added `AioCb::from_boxed_slice` 1293 ([#582](https://github.com/nix-rust/nix/pull/582) 1294- Added `nix::unistd::{openat, fstatat, readlink, readlinkat}` 1295 ([#551](https://github.com/nix-rust/nix/pull/551)) 1296- Added `nix::pty::{grantpt, posix_openpt, ptsname/ptsname_r, unlockpt}` 1297 ([#556](https://github.com/nix-rust/nix/pull/556) 1298- Added `nix::ptr::openpty` 1299 ([#456](https://github.com/nix-rust/nix/pull/456)) 1300- Added `nix::ptrace::{ptrace_get_data, ptrace_getsiginfo, ptrace_setsiginfo 1301 and nix::Error::UnsupportedOperation}` 1302 ([#614](https://github.com/nix-rust/nix/pull/614)) 1303- Added `cfmakeraw`, `cfsetspeed`, and `tcgetsid`. ([#527](https://github.com/nix-rust/nix/pull/527)) 1304- Added "bad none", "bad write_ptr", "bad write_int", and "bad readwrite" variants to the `ioctl!` 1305 macro. ([#670](https://github.com/nix-rust/nix/pull/670)) 1306- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD` 1307 events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall` 1308 ([#566](https://github.com/nix-rust/nix/pull/566)). 1309 1310### Changed 1311- The `ioctl!` macro and its variants now allow the generated functions to have 1312 doccomments. ([#661](https://github.com/nix-rust/nix/pull/661)) 1313- Changed `ioctl!(write ...)` into `ioctl!(write_ptr ...)` and `ioctl!(write_int ..)` variants 1314 to more clearly separate those use cases. ([#670](https://github.com/nix-rust/nix/pull/670)) 1315- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe. 1316 ([#559](https://github.com/nix-rust/nix/pull/559)) 1317- Minimum supported Rust version is now 1.13. 1318- Removed `revents` argument from `PollFd::new()` as it's an output argument and 1319 will be overwritten regardless of value. 1320 ([#542](https://github.com/nix-rust/nix/pull/542)) 1321- Changed type signature of `sys::select::FdSet::contains` to make `self` 1322 immutable ([#564](https://github.com/nix-rust/nix/pull/564)) 1323- Introduced wrapper types for `gid_t`, `pid_t`, and `uid_t` as `Gid`, `Pid`, and `Uid` 1324 respectively. Various functions have been changed to use these new types as 1325 arguments. ([#629](https://github.com/nix-rust/nix/pull/629)) 1326- Fixed compilation on all Android and iOS targets ([#527](https://github.com/nix-rust/nix/pull/527)) 1327 and promoted them to Tier 2 support. 1328- `nix::sys::statfs::{statfs,fstatfs}` uses statfs definition from `libc::statfs` instead of own linux specific type `nix::sys::Statfs`. 1329 Also file system type constants like `nix::sys::statfs::ADFS_SUPER_MAGIC` were removed in favor of the libc equivalent. 1330 ([#561](https://github.com/nix-rust/nix/pull/561)) 1331- Revised the termios API including additional tests and documentation and exposed it on iOS. ([#527](https://github.com/nix-rust/nix/pull/527)) 1332- `eventfd`, `signalfd`, and `pwritev`/`preadv` functionality is now included by default for all 1333 supported platforms. ([#681](https://github.com/nix-rust/nix/pull/561)) 1334- The `ioctl!` macro's plain variants has been replaced with "bad read" to be consistent with 1335 other variants. The generated functions also have more strict types for their arguments. The 1336 "*_buf" variants also now calculate total array size and take slice references for improved type 1337 safety. The documentation has also been dramatically improved. 1338 ([#670](https://github.com/nix-rust/nix/pull/670)) 1339 1340### Removed 1341- Removed `io::Error` from `nix::Error` and the conversion from `nix::Error` to `Errno` 1342 ([#614](https://github.com/nix-rust/nix/pull/614)) 1343- All feature flags have been removed in favor of conditional compilation on supported platforms. 1344 `execvpe` is no longer supported, but this was already broken and will be added back in the next 1345 release. ([#681](https://github.com/nix-rust/nix/pull/561)) 1346- Removed `ioc_*` functions and many helper constants and macros within the `ioctl` module. These 1347 should always have been private and only the `ioctl!` should be used in public code. 1348 ([#670](https://github.com/nix-rust/nix/pull/670)) 1349 1350### Fixed 1351- Fixed multiple issues compiling under different archetectures and OSes. 1352 Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)), 1353 `Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)), 1354 `MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553)), 1355 `NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538)), 1356 `FreeBSD/x86_64,i686` ([#536](https://github.com/nix-rust/nix/pull/536)), and 1357 `Android` ([#631](https://github.com/nix-rust/nix/pull/631)). 1358- `bind` and `errno_location` now work correctly on `Android` 1359 ([#631](https://github.com/nix-rust/nix/pull/631)) 1360- Added `nix::ptrace` on all Linux-kernel-based platforms 1361 [#624](https://github.com/nix-rust/nix/pull/624). Previously it was 1362 only available on x86, x86-64, and ARM, and also not on Android. 1363- Fixed `sys::socket::sendmsg` with zero entry `cmsgs` parameter. 1364 ([#623](https://github.com/nix-rust/nix/pull/623)) 1365- Multiple constants related to the termios API have now been properly defined for 1366 all supported platforms. ([#527](https://github.com/nix-rust/nix/pull/527)) 1367- `ioctl!` macro now supports working with non-int datatypes and properly supports all platforms. 1368 ([#670](https://github.com/nix-rust/nix/pull/670)) 1369 1370## [0.8.1] 2017-04-16 1371 1372### Fixed 1373- Fixed build on FreeBSD. (Cherry-picked 1374 [a859ee3c](https://github.com/nix-rust/nix/commit/a859ee3c9396dfdb118fcc2c8ecc697e2d303467)) 1375 1376## [0.8.0] 2017-03-02 1377 1378### Added 1379- Added `::nix::sys::termios::BaudRate` enum to provide portable baudrate 1380 values. ([#518](https://github.com/nix-rust/nix/pull/518)) 1381- Added a new `WaitStatus::PtraceEvent` to support ptrace events on Linux 1382 and Android ([#438](https://github.com/nix-rust/nix/pull/438)) 1383- Added support for POSIX AIO 1384 ([#483](https://github.com/nix-rust/nix/pull/483)) 1385 ([#506](https://github.com/nix-rust/nix/pull/506)) 1386- Added support for XNU system control sockets 1387 ([#478](https://github.com/nix-rust/nix/pull/478)) 1388- Added support for `ioctl` calls on BSD platforms 1389 ([#478](https://github.com/nix-rust/nix/pull/478)) 1390- Added struct `TimeSpec` 1391 ([#475](https://github.com/nix-rust/nix/pull/475)) 1392 ([#483](https://github.com/nix-rust/nix/pull/483)) 1393- Added complete definitions for all kqueue-related constants on all supported 1394 OSes 1395 ([#415](https://github.com/nix-rust/nix/pull/415)) 1396- Added function `epoll_create1` and bitflags `EpollCreateFlags` in 1397 `::nix::sys::epoll` in order to support `::libc::epoll_create1`. 1398 ([#410](https://github.com/nix-rust/nix/pull/410)) 1399- Added `setresuid` and `setresgid` for Linux in `::nix::unistd` 1400 ([#448](https://github.com/nix-rust/nix/pull/448)) 1401- Added `getpgid` in `::nix::unistd` 1402 ([#433](https://github.com/nix-rust/nix/pull/433)) 1403- Added `tcgetpgrp` and `tcsetpgrp` in `::nix::unistd` 1404 ([#451](https://github.com/nix-rust/nix/pull/451)) 1405- Added `CLONE_NEWCGROUP` in `::nix::sched` 1406 ([#457](https://github.com/nix-rust/nix/pull/457)) 1407- Added `getpgrp` in `::nix::unistd` 1408 ([#491](https://github.com/nix-rust/nix/pull/491)) 1409- Added `fchdir` in `::nix::unistd` 1410 ([#497](https://github.com/nix-rust/nix/pull/497)) 1411- Added `major` and `minor` in `::nix::sys::stat` for decomposing `dev_t` 1412 ([#508](https://github.com/nix-rust/nix/pull/508)) 1413- Fixed the style of many bitflags and use `libc` in more places. 1414 ([#503](https://github.com/nix-rust/nix/pull/503)) 1415- Added `ppoll` in `::nix::poll` 1416 ([#520](https://github.com/nix-rust/nix/pull/520)) 1417- Added support for getting and setting pipe size with fcntl(2) on Linux 1418 ([#540](https://github.com/nix-rust/nix/pull/540)) 1419 1420### Changed 1421- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}` 1422 switched to use `BaudRate` enum from `speed_t`. 1423 ([#518](https://github.com/nix-rust/nix/pull/518)) 1424- `epoll_ctl` now could accept None as argument `event` 1425 when op is `EpollOp::EpollCtlDel`. 1426 ([#480](https://github.com/nix-rust/nix/pull/480)) 1427- Removed the `bad` keyword from the `ioctl!` macro 1428 ([#478](https://github.com/nix-rust/nix/pull/478)) 1429- Changed `TimeVal` into an opaque Newtype 1430 ([#475](https://github.com/nix-rust/nix/pull/475)) 1431- `kill`'s signature, defined in `::nix::sys::signal`, changed, so that the 1432 signal parameter has type `T: Into<Option<Signal>>`. `None` as an argument 1433 for that parameter will result in a 0 passed to libc's `kill`, while a 1434 `Some`-argument will result in the previous behavior for the contained 1435 `Signal`. 1436 ([#445](https://github.com/nix-rust/nix/pull/445)) 1437- The minimum supported version of rustc is now 1.7.0. 1438 ([#444](https://github.com/nix-rust/nix/pull/444)) 1439- Changed `KEvent` to an opaque structure that may only be modified by its 1440 constructor and the `ev_set` method. 1441 ([#415](https://github.com/nix-rust/nix/pull/415)) 1442 ([#442](https://github.com/nix-rust/nix/pull/442)) 1443 ([#463](https://github.com/nix-rust/nix/pull/463)) 1444- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated 1445 using `pipe`, which meant that setting `O_CLOEXEC` was not atomic. 1446 ([#427](https://github.com/nix-rust/nix/pull/427)) 1447- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for 1448 it to conform with our conventions. 1449 ([#410](https://github.com/nix-rust/nix/pull/410)) 1450- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for 1451 `::libc::epoll_event`. The formerly public field `events` is now be read-only 1452 accessible with the new method `events()` of `EpollEvent`. Instances of 1453 `EpollEvent` can be constructed using the new method `new()` of EpollEvent. 1454 ([#410](https://github.com/nix-rust/nix/pull/410)) 1455- `SigFlags` in `::nix::sys::signal` has be renamed to `SigmaskHow` and its type 1456 has changed from `bitflags` to `enum` in order to conform to our conventions. 1457 ([#460](https://github.com/nix-rust/nix/pull/460)) 1458- `sethostname` now takes a `&str` instead of a `&[u8]` as this provides an API 1459 that makes more sense in normal, correct usage of the API. 1460- `gethostname` previously did not expose the actual length of the hostname 1461 written from the underlying system call at all. This has been updated to 1462 return a `&CStr` within the provided buffer that is always properly 1463 NUL-terminated (this is not guaranteed by the call with all platforms/libc 1464 implementations). 1465- Exposed all fcntl(2) operations at the module level, so they can be 1466 imported direclty instead of via `FcntlArg` enum. 1467 ([#541](https://github.com/nix-rust/nix/pull/541)) 1468 1469### Fixed 1470- Fixed multiple issues with Unix domain sockets on non-Linux OSes 1471 ([#474](https://github.com/nix-rust/nix/pull/415)) 1472- Fixed using kqueue with `EVFILT_USER` on FreeBSD 1473 ([#415](https://github.com/nix-rust/nix/pull/415)) 1474- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 1475 functions on that same OS. 1476 ([#397](https://github.com/nix-rust/nix/pull/397)) 1477- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`. 1478 ([#429](https://github.com/nix-rust/nix/pull/429)) 1479- Fixed clone passing a potentially unaligned stack. 1480 ([#490](https://github.com/nix-rust/nix/pull/490)) 1481- Fixed mkdev not creating a `dev_t` the same way as libc. 1482 ([#508](https://github.com/nix-rust/nix/pull/508)) 1483 1484## [0.7.0] 2016-09-09 1485 1486### Added 1487- Added `lseek` and `lseek64` in `::nix::unistd` 1488 ([#377](https://github.com/nix-rust/nix/pull/377)) 1489- Added `mkdir` and `getcwd` in `::nix::unistd` 1490 ([#416](https://github.com/nix-rust/nix/pull/416)) 1491- Added accessors `sigmask_mut` and `sigmask` to `UContext` in 1492 `::nix::ucontext`. 1493 ([#370](https://github.com/nix-rust/nix/pull/370)) 1494- Added `WUNTRACED` to `WaitPidFlag` in `::nix::sys::wait` for non-_linux_ 1495 targets. 1496 ([#379](https://github.com/nix-rust/nix/pull/379)) 1497- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and 1498 functions `reboot` and `set_cad_enabled`. Currently for _linux_ only. 1499 ([#386](https://github.com/nix-rust/nix/pull/386)) 1500- `FdSet` in `::nix::sys::select` now also implements `Clone`. 1501 ([#405](https://github.com/nix-rust/nix/pull/405)) 1502- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets. 1503 ([#407](https://github.com/nix-rust/nix/pull/407)) 1504- Added `CpuSet::unset` in `::nix::sched`. 1505 ([#402](https://github.com/nix-rust/nix/pull/402)) 1506- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to 1507 allow creation of objects, after removing public access to members. 1508 ([#399](https://github.com/nix-rust/nix/pull/399)) 1509- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide 1510 read access to formerly public member `revents`. 1511 ([#399](https://github.com/nix-rust/nix/pull/399)) 1512- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only. 1513 ([#422](https://github.com/nix-rust/nix/pull/422)) 1514 1515### Changed 1516- Replaced the reexported integer constants for signals by the enumeration 1517 `Signal` in `::nix::sys::signal`. 1518 ([#362](https://github.com/nix-rust/nix/pull/362)) 1519- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`. 1520 ([#383](https://github.com/nix-rust/nix/pull/383)) 1521- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in 1522 `::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now 1523 return `EINVAL`, if an invalid argument for the `field` parameter is passed. 1524 ([#402](https://github.com/nix-rust/nix/pull/402)) 1525- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`, 1526 which has the same structure as the old `MqAttr`. The field `mq_flags` of 1527 `::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`. 1528 `MqAttr` also no longer implements `Debug`. 1529 ([#392](https://github.com/nix-rust/nix/pull/392)) 1530- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue` 1531 was replaced by a parameter named `msg_prio` with type `&mut u32`, so that 1532 the message priority can be obtained by the caller. 1533 ([#392](https://github.com/nix-rust/nix/pull/392)) 1534- The type alias `MQd` in `::nix::queue` was replaced by the type alias 1535 `libc::mqd_t`, both of which are aliases for the same type. 1536 ([#392](https://github.com/nix-rust/nix/pull/392)) 1537 1538### Removed 1539- Type alias `SigNum` from `::nix::sys::signal`. 1540 ([#362](https://github.com/nix-rust/nix/pull/362)) 1541- Type alias `CpuMask` from `::nix::shed`. 1542 ([#402](https://github.com/nix-rust/nix/pull/402)) 1543- Removed public fields from `PollFd` in `::nix::poll`. (See also added method 1544 `revents()`. 1545 ([#399](https://github.com/nix-rust/nix/pull/399)) 1546 1547### Fixed 1548- Fixed the build problem for NetBSD (Note, that we currently do not support 1549 it, so it might already be broken again). 1550 ([#389](https://github.com/nix-rust/nix/pull/389)) 1551- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 1552 functions on that same OS. 1553 ([#397](https://github.com/nix-rust/nix/pull/397)) 1554 1555## [0.6.0] 2016-06-10 1556 1557### Added 1558- Added `gettid` in `::nix::unistd` for _linux_ and _android_. 1559 ([#293](https://github.com/nix-rust/nix/pull/293)) 1560- Some _mips_ support in `::nix::sched` and `::nix::sys::syscall`. 1561 ([#301](https://github.com/nix-rust/nix/pull/301)) 1562- Added `SIGNALFD_SIGINFO_SIZE` in `::nix::sys::signalfd`. 1563 ([#309](https://github.com/nix-rust/nix/pull/309)) 1564- Added new module `::nix::ucontext` with struct `UContext`. Currently for 1565 _linux_ only. 1566 ([#311](https://github.com/nix-rust/nix/pull/311)) 1567- Added `EPOLLEXCLUSIVE` to `EpollEventKind` in `::nix::sys::epoll`. 1568 ([#330](https://github.com/nix-rust/nix/pull/330)) 1569- Added `pause` to `::nix::unistd`. 1570 ([#336](https://github.com/nix-rust/nix/pull/336)) 1571- Added `sleep` to `::nix::unistd`. 1572 ([#351](https://github.com/nix-rust/nix/pull/351)) 1573- Added `S_IFDIR`, `S_IFLNK`, `S_IFMT` to `SFlag` in `::nix::sys::stat`. 1574 ([#359](https://github.com/nix-rust/nix/pull/359)) 1575- Added `clear` and `extend` functions to `SigSet`'s implementation in 1576 `::nix::sys::signal`. 1577 ([#347](https://github.com/nix-rust/nix/pull/347)) 1578- `sockaddr_storage_to_addr` in `::nix::sys::socket` now supports `sockaddr_nl` 1579 on _linux_ and _android_. 1580 ([#366](https://github.com/nix-rust/nix/pull/366)) 1581- Added support for `SO_ORIGINAL_DST` in `::nix::sys::socket` on _linux_. 1582 ([#367](https://github.com/nix-rust/nix/pull/367)) 1583- Added `SIGINFO` in `::nix::sys::signal` for the _macos_ target as well as 1584 `SIGPWR` and `SIGSTKFLT` in `::nix::sys::signal` for non-_macos_ targets. 1585 ([#361](https://github.com/nix-rust/nix/pull/361)) 1586 1587### Changed 1588- Changed the structure `IoVec` in `::nix::sys::uio`. 1589 ([#304](https://github.com/nix-rust/nix/pull/304)) 1590- Replaced `CREATE_NEW_FD` by `SIGNALFD_NEW` in `::nix::sys::signalfd`. 1591 ([#309](https://github.com/nix-rust/nix/pull/309)) 1592- Renamed `SaFlag` to `SaFlags` and `SigFlag` to `SigFlags` in 1593 `::nix::sys::signal`. 1594 ([#314](https://github.com/nix-rust/nix/pull/314)) 1595- Renamed `Fork` to `ForkResult` and changed its fields in `::nix::unistd`. 1596 ([#332](https://github.com/nix-rust/nix/pull/332)) 1597- Added the `signal` parameter to `clone`'s signature in `::nix::sched`. 1598 ([#344](https://github.com/nix-rust/nix/pull/344)) 1599- `execv`, `execve`, and `execvp` now return `Result<Void>` instead of 1600 `Result<()>` in `::nix::unistd`. 1601 ([#357](https://github.com/nix-rust/nix/pull/357)) 1602 1603### Fixed 1604- Improved the conversion from `std::net::SocketAddr` to `InetAddr` in 1605 `::nix::sys::socket::addr`. 1606 ([#335](https://github.com/nix-rust/nix/pull/335)) 1607 1608## [0.5.0] 2016-03-01 1609