| 1 |
All notable changes to this project will be documented in this file. |
| 2 |
This project adheres to [Semantic Versioning](https://semver.org/). |
| 3 |
|
| 4 |
# Change Log |
| 5 |
|
| 6 |
## [0.31.3] - 2026-05-11 |
| 7 |
|
| 8 |
### Added |
| 9 |
|
| 10 |
- Enable module `ioctl` for Cygwin |
| 11 |
([#2715](https://github.com/nix-rust/nix/pull/2715)) |
| 12 |
- Add |
| 13 |
`CLOCK_BOOTTIME/CLOCK_PROCESS_CPUTIME_ID/CLOCK_THREAD_CPUTIME_ID/CLOCK_UPTIME` |
| 14 |
to NetBSD-like platforms ([#2716](https://github.com/nix-rust/nix/pull/2716)) |
| 15 |
- unistd: add mkfifo for redox |
| 16 |
([#2749](https://github.com/nix-rust/nix/pull/2749)) |
| 17 |
- Added `kevent64` support on apple targets: `Kqueue::kevent64`, `KEvent64`, |
| 18 |
and `Kevent64Flags`. ([#2781](https://github.com/nix-rust/nix/pull/2781)) |
| 19 |
|
| 20 |
### Fixed |
| 21 |
|
| 22 |
- fix SaFlags_t definition on redox |
| 23 |
([#2751](https://github.com/nix-rust/nix/pull/2751)) |
| 24 |
- Fixed `EpollEvent::events()` to use `from_bits_retain` instead of |
| 25 |
`from_bits().unwrap()`, preventing panics when the kernel returns |
| 26 |
unknown epoll flags. ([#2783](https://github.com/nix-rust/nix/pull/2783)) |
| 27 |
- Fixed `KEvent::flags()` and `KEvent::fflags()` to use `from_bits_retain` |
| 28 |
instead of `from_bits().unwrap()`, preventing panics when the kernel |
| 29 |
returns unknown kqueue flags. |
| 30 |
([#2784](https://github.com/nix-rust/nix/pull/2784)) |
| 31 |
|
| 32 |
|
| 33 |
## [0.31.2] - 2026-02-28 |
| 34 |
|
| 35 |
### Added |
| 36 |
|
| 37 |
- Add WatchDescriptor::as_raw, to get libc id of WatchDescriptor. |
| 38 |
([#2718](https://github.com/nix-rust/nix/pull/2718)) |
| 39 |
- Added process::pthread_getthreadid_np() on FreeBSD. |
| 40 |
([#2725](https://github.com/nix-rust/nix/pull/2725)) |
| 41 |
- Added timerfd support on FreeBSD |
| 42 |
([#2728](https://github.com/nix-rust/nix/pull/2728)) |
| 43 |
|
| 44 |
### Fixed |
| 45 |
|
| 46 |
- The libc requirement is now `0.2.181`, rather than pinned to 0.2.180. |
| 47 |
([#2744](https://github.com/nix-rust/nix/pull/2744)) |
| 48 |
|
| 49 |
|
| 50 |
## [0.31.1] - 2026-01-23 |
| 51 |
|
| 52 |
### Added |
| 53 |
|
| 54 |
- termios: Add definition for IUCLC to supported platforms |
| 55 |
([#2702](https://github.com/nix-rust/nix/pull/2702)) |
| 56 |
- termios: Add definition for XCASE for supported platforms |
| 57 |
([#2703](https://github.com/nix-rust/nix/pull/2703)) |
| 58 |
|
| 59 |
|
| 60 |
## [0.31.0] - 2026-01-22 |
| 61 |
|
| 62 |
### Added |
| 63 |
|
| 64 |
- Added the UDP GSO/GRO socket options and CMsgs on Android. This includes the |
| 65 |
following types: |
| 66 |
- UdpGsoSegment |
| 67 |
- UdpGroSegment |
| 68 |
- ControlMessage::UdpGsoSegments |
| 69 |
- ControlMessageOwned::UdpGroSegments |
| 70 |
|
| 71 |
([#2666](https://github.com/nix-rust/nix/pull/2666)) |
| 72 |
- Define errno EWOULDBLOCK as an alias of EAGAIN to match the AIX libc |
| 73 |
definition. ([#2692](https://github.com/nix-rust/nix/pull/2692)) |
| 74 |
- Enable module `ifaddrs` on GNU Hurd |
| 75 |
([#2697](https://github.com/nix-rust/nix/pull/2697)) |
| 76 |
- Add termios `OutputFlags::OFILL` for Linux, Android, Aix, Cygwin, Fuchsia, |
| 77 |
Haiku, |
| 78 |
GNU/Hurd, Nto, Redox, Illumos, Solaris and Apple OSes. |
| 79 |
([#2701](https://github.com/nix-rust/nix/pull/2701)) |
| 80 |
- add sync() for cygwin ([#2708](https://github.com/nix-rust/nix/pull/2708)) |
| 81 |
|
| 82 |
### Changed |
| 83 |
|
| 84 |
- changed `EpollEvent` methods to be `const` |
| 85 |
([#2656](https://github.com/nix-rust/nix/pull/2656)) |
| 86 |
- Bumped libc to |
| 87 |
[0.2.180](https://github.com/rust-lang/libc/releases/tag/0.2.180) |
| 88 |
([#2724](https://github.com/nix-rust/nix/pull/2724)) |
| 89 |
|
| 90 |
### Fixed |
| 91 |
|
| 92 |
- Fixed `nix::sys::ptrace::syscall_info`, which was not setting the `data` |
| 93 |
argument properly, causing garbage values to be returned. |
| 94 |
([#2653](https://github.com/nix-rust/nix/pull/2653)) |
| 95 |
- Cast the 'addr' argument of 'madvise()' to '*mut u8' on AIX to match the |
| 96 |
signature in the AIX libc. |
| 97 |
([#2655](https://github.com/nix-rust/nix/pull/2655)) |
| 98 |
- Fixed the Dir module on NTO, Solaris, Hurd, and possibly other platforms. |
| 99 |
The |
| 100 |
d_name field was not copied correctly on those platforms. For some other |
| 101 |
platforms, it could be copied incorrectly for files with very long pathnames. |
| 102 |
([#2674](https://github.com/nix-rust/nix/pull/2674)) |
| 103 |
- Fix the build on Illumos ([#2694](https://github.com/nix-rust/nix/pull/2694)) |
| 104 |
|
| 105 |
### Removed |
| 106 |
|
| 107 |
- Removed `Eq` and `PartialEq` implementations from `SigHandler`, because they |
| 108 |
never worked reliably. The suggested alternative is `matches!`. For |
| 109 |
example: |
| 110 |
``` |
| 111 |
let h: SigHandler = ... |
| 112 |
if matches!(h, SigHandler::SigIgn) { |
| 113 |
... |
| 114 |
} |
| 115 |
``` ([#2642](https://github.com/nix-rust/nix/pull/2642)) |
| 116 |
- Removed `IFF_NOTRAILERS` by NetBSD, as it has been removed upstream and from |
| 117 |
libc ([#2724](https://github.com/nix-rust/nix/pull/2724)) |
| 118 |
|
| 119 |
|
| 120 |
## [0.30.1] - 2025-05-04 |
| 121 |
|
| 122 |
### Fixed |
| 123 |
|
| 124 |
- doc.rs build |
| 125 |
([#2634](https://github.com/nix-rust/nix/pull/2634)) |
| 126 |
|
| 127 |
|
| 128 |
## [0.30.0] - 2025-04-29 |
| 129 |
|
| 130 |
|
| 131 |
### Added |
| 132 |
|
| 133 |
- Add socket option `IPV6_PKTINFO` for BSDs/Linux/Android, also |
| 134 |
`IPV6_RECVPKTINFO` for DragonFlyBSD |
| 135 |
([#2113](https://github.com/nix-rust/nix/pull/2113)) |
| 136 |
- Add `fcntl`'s `F_PREALLOCATE` constant for Apple targets. |
| 137 |
([#2393](https://github.com/nix-rust/nix/pull/2393)) |
| 138 |
- Improve support for extracting the TTL / Hop Limit from incoming packets |
| 139 |
and support for DSCP (ToS / Traffic Class). |
| 140 |
([#2425](https://github.com/nix-rust/nix/pull/2425)) |
| 141 |
- Add socket option IP_TOS (nix::sys::socket::sockopt::IpTos) IPV6_TCLASS |
| 142 |
(nix::sys::socket::sockopt::Ipv6TClass) on Android/FreeBSD |
| 143 |
([#2464](https://github.com/nix-rust/nix/pull/2464)) |
| 144 |
- Add `SeekData` and `SeekHole` to `Whence` for hurd and apple targets |
| 145 |
([#2473](https://github.com/nix-rust/nix/pull/2473)) |
| 146 |
- Add `From` trait implementation between `SocketAddr` and `Sockaddr`, |
| 147 |
`Sockaddr6` ([#2474](https://github.com/nix-rust/nix/pull/2474)) |
| 148 |
- Added wrappers for `posix_spawn` API |
| 149 |
([#2475](https://github.com/nix-rust/nix/pull/2475)) |
| 150 |
- Add the support for Emscripten. |
| 151 |
([#2477](https://github.com/nix-rust/nix/pull/2477)) |
| 152 |
- Add fcntl constant `F_RDADVISE` for Apple target |
| 153 |
([#2480](https://github.com/nix-rust/nix/pull/2480)) |
| 154 |
- Add fcntl constant `F_RDAHEAD` for Apple target |
| 155 |
([#2482](https://github.com/nix-rust/nix/pull/2482)) |
| 156 |
- Add `F_LOG2PHYS` and `F_LOG2PHYS_EXT` for Apple target |
| 157 |
([#2483](https://github.com/nix-rust/nix/pull/2483)) |
| 158 |
- `MAP_SHARED_VALIDATE` was added for all linux targets. & `MAP_SYNC` was added |
| 159 |
for linux with the exclusion of mips architecures, and uclibc |
| 160 |
([#2499](https://github.com/nix-rust/nix/pull/2499)) |
| 161 |
- Add `getregs()`/`getregset()`/`setregset()` for Linux/musl/aarch64 |
| 162 |
([#2502](https://github.com/nix-rust/nix/pull/2502)) |
| 163 |
- Add FcntlArgs `F_TRANSFEREXTENTS` constant for Apple targets |
| 164 |
([#2504](https://github.com/nix-rust/nix/pull/2504)) |
| 165 |
- Add `MapFlags::MAP_STACK` in `sys::man` for netbsd |
| 166 |
([#2526](https://github.com/nix-rust/nix/pull/2526)) |
| 167 |
- Add support for `libc::LOCAL_PEERTOKEN` in `getsockopt`. |
| 168 |
([#2529](https://github.com/nix-rust/nix/pull/2529)) |
| 169 |
- Add support for `syslog`, `openlog`, `closelog` on all `unix`. |
| 170 |
([#2537](https://github.com/nix-rust/nix/pull/2537)) |
| 171 |
- Add the `TCP_FUNCTION_BLK` sockopt, on FreeBSD. |
| 172 |
([#2539](https://github.com/nix-rust/nix/pull/2539)) |
| 173 |
- Implements `Into<OwnedFd>` for `PtyMaster/Fanotify/Inotify/SignalFd/TimerFd` |
| 174 |
([#2548](https://github.com/nix-rust/nix/pull/2548)) |
| 175 |
- Add `MremapFlags::MREMAP_DONTUNMAP` to `sys::mman::mremap` for linux target. |
| 176 |
([#2555](https://github.com/nix-rust/nix/pull/2555)) |
| 177 |
- Added `sockopt_impl!` to the public API. It's now possible for users to |
| 178 |
define |
| 179 |
their own sockopts without needing to make a PR to Nix. |
| 180 |
([#2556](https://github.com/nix-rust/nix/pull/2556)) |
| 181 |
- Add the `TCP_FUNCTION_ALIAS` sockopt, on FreeBSD. |
| 182 |
([#2558](https://github.com/nix-rust/nix/pull/2558)) |
| 183 |
- Add `sys::mman::MmapAdvise` `MADV_PAGEOUT`, `MADV_COLD`, `MADV_WIPEONFORK`, |
| 184 |
`MADV_KEEPONFORK` for Linux and Android targets |
| 185 |
([#2559](https://github.com/nix-rust/nix/pull/2559)) |
| 186 |
- Add socket protocol `Sctp`, as well as `MSG_NOTIFICATION` for non-Android |
| 187 |
Linux targets. ([#2562](https://github.com/nix-rust/nix/pull/2562)) |
| 188 |
- Added `from_owned_fd` constructor to `EventFd` |
| 189 |
([#2563](https://github.com/nix-rust/nix/pull/2563)) |
| 190 |
- Add `sys::mman::MmapAdvise` `MADV_POPULATE_READ`, `MADV_POPULATE_WRITE` for |
| 191 |
Linux and Android targets |
| 192 |
([#2565](https://github.com/nix-rust/nix/pull/2565)) |
| 193 |
- Added `from_owned_fd` constructor to |
| 194 |
`PtyMaster/Fanotify/Inotify/SignalFd/TimerFd` |
| 195 |
([#2566](https://github.com/nix-rust/nix/pull/2566)) |
| 196 |
- Added `FcntlArg::F_READAHEAD` for FreeBSD target |
| 197 |
([#2569](https://github.com/nix-rust/nix/pull/2569)) |
| 198 |
- Added `sockopt::LingerSec` for Apple targets |
| 199 |
([#2572](https://github.com/nix-rust/nix/pull/2572)) |
| 200 |
- Added `sockopt::EsclBind` for solarish targets |
| 201 |
([#2573](https://github.com/nix-rust/nix/pull/2573)) |
| 202 |
- Exposed the ```std::os::fd::AsRawFd``` trait method for |
| 203 |
```nix::sys::fanotify::Fanotify``` struct |
| 204 |
([#2575](https://github.com/nix-rust/nix/pull/2575)) |
| 205 |
- Add support for syslog's `setlogmask` on all `unix`. |
| 206 |
([#2579](https://github.com/nix-rust/nix/pull/2579)) |
| 207 |
- Added Fuchsia support for `ioctl`. |
| 208 |
([#2580](https://github.com/nix-rust/nix/pull/2580)) |
| 209 |
- Add ```sys::socket::SockProtocol::EthIp```, |
| 210 |
```sys::socket::SockProtocol::EthIpv6```, |
| 211 |
```sys::socket::SockProtocol::EthLoop``` |
| 212 |
([#2581](https://github.com/nix-rust/nix/pull/2581)) |
| 213 |
- Add OpenHarmony target into CI and Update documents. |
| 214 |
([#2599](https://github.com/nix-rust/nix/pull/2599)) |
| 215 |
- Added the TcpMaxSeg `setsockopt` option for apple targets |
| 216 |
([#2603](https://github.com/nix-rust/nix/pull/2603)) |
| 217 |
- Add `FilAttach` and `FilDetach` to socket::sockopt for Illumos |
| 218 |
([#2611](https://github.com/nix-rust/nix/pull/2611)) |
| 219 |
- Add `PeerPidfd` (`SO_PEERPIDFD`) to `socket::sockopt` for Linux |
| 220 |
([#2620](https://github.com/nix-rust/nix/pull/2620)) |
| 221 |
- Added `socket::sockopt::AttachReusePortCbpf` for Linux |
| 222 |
([#2621](https://github.com/nix-rust/nix/pull/2621)) |
| 223 |
- Add `ptrace::syscall_info` for linux/glibc |
| 224 |
([#2627](https://github.com/nix-rust/nix/pull/2627)) |
| 225 |
|
| 226 |
### Changed |
| 227 |
|
| 228 |
- Module sys/signal now adopts I/O safety |
| 229 |
([#1936](https://github.com/nix-rust/nix/pull/1936)) |
| 230 |
- Change the type of the `name` argument of `memfd_create()` from `&CStr` to |
| 231 |
`<P: NixPath>(name: &P)` ([#2431](https://github.com/nix-rust/nix/pull/2431)) |
| 232 |
- Public interfaces in `fcntl.rs` and `dir.rs` now use I/O-safe types. |
| 233 |
([#2434](https://github.com/nix-rust/nix/pull/2434)) |
| 234 |
- Module `sys/stat` now adopts I/O safety. |
| 235 |
([#2439](https://github.com/nix-rust/nix/pull/2439)) |
| 236 |
- Module unistd now adopts I/O safety. |
| 237 |
([#2440](https://github.com/nix-rust/nix/pull/2440)) |
| 238 |
- Module sys/fanotify now adopts I/O safety |
| 239 |
([#2443](https://github.com/nix-rust/nix/pull/2443)) |
| 240 |
- Socket option `IpTos` has been renamed to `Ipv4Tos`, the old symbol is |
| 241 |
deprecated since 0.30.0 ([#2465](https://github.com/nix-rust/nix/pull/2465)) |
| 242 |
- Rename Flags `EventFlag` to `EvFlags`, and `MemFdCreateFlag` to `MFdFlags` |
| 243 |
([#2476](https://github.com/nix-rust/nix/pull/2476)) |
| 244 |
- Made `nix::sys::socket::UnknownCmsg` public and more readable |
| 245 |
([#2520](https://github.com/nix-rust/nix/pull/2520)) |
| 246 |
- recvmsg: take slice for cmsg_buffer instead of Vec |
| 247 |
([#2524](https://github.com/nix-rust/nix/pull/2524)) |
| 248 |
- linkat: allow distinct types for path arguments |
| 249 |
([#2582](https://github.com/nix-rust/nix/pull/2582)) |
| 250 |
|
| 251 |
### Fixed |
| 252 |
|
| 253 |
- Disable unsupported signals on sparc-linux |
| 254 |
([#2454](https://github.com/nix-rust/nix/pull/2454)) |
| 255 |
- Fix cmsg_len() return type on OpenHarmony |
| 256 |
([#2456](https://github.com/nix-rust/nix/pull/2456)) |
| 257 |
- The `ns` argument of `sys::prctl::set_timerslack()` should be of type |
| 258 |
`c_ulong` ([#2505](https://github.com/nix-rust/nix/pull/2505)) |
| 259 |
- Properly exclude NUL characters from `OSString`s returned by `getsockopt`. |
| 260 |
([#2557](https://github.com/nix-rust/nix/pull/2557)) |
| 261 |
- Fixes the build on OpenHarmony |
| 262 |
([#2587](https://github.com/nix-rust/nix/pull/2587)) |
| 263 |
|
| 264 |
### Removed |
| 265 |
|
| 266 |
- Type `SigevNotify` is no longer `PartialEq`, `Eq` and `Hash` due to the use |
| 267 |
of `BorrowedFd` ([#1936](https://github.com/nix-rust/nix/pull/1936)) |
| 268 |
- `EventFd::defuse()` is removed because it does nothing, `EventFd::arm()` is |
| 269 |
also removed for symmetry reasons. |
| 270 |
([#2452](https://github.com/nix-rust/nix/pull/2452)) |
| 271 |
- Removed the `Copy` trait from `PollFd` |
| 272 |
([#2631](https://github.com/nix-rust/nix/pull/2631)) |
| 273 |
|
| 274 |
|
| 275 |
## [0.29.0] - 2024-05-24 |
| 276 |
|
| 277 |
|
| 278 |
### Added |
| 279 |
|
| 280 |
- Add `getregset()/setregset()` for Linux/glibc/x86/x86_64/aarch64/riscv64 and |
| 281 |
`getregs()/setregs()` for Linux/glibc/aarch64/riscv64 |
| 282 |
([#2044](https://github.com/nix-rust/nix/pull/2044)) |
| 283 |
- Add socket option Ipv6Ttl for apple targets. |
| 284 |
([#2287](https://github.com/nix-rust/nix/pull/2287)) |
| 285 |
- Add socket option UtunIfname. |
| 286 |
([#2325](https://github.com/nix-rust/nix/pull/2325)) |
| 287 |
- make SigAction repr(transparent) & can be converted to the libc raw type |
| 288 |
([#2326](https://github.com/nix-rust/nix/pull/2326)) |
| 289 |
- Add `From` trait implementation for conversions between `sockaddr_in` and |
| 290 |
`SockaddrIn`, `sockaddr_in6` and `SockaddrIn6` |
| 291 |
([#2328](https://github.com/nix-rust/nix/pull/2328)) |
| 292 |
- Add socket option ReusePortLb for FreeBSD. |
| 293 |
([#2332](https://github.com/nix-rust/nix/pull/2332)) |
| 294 |
- Added support for openat2 on linux. |
| 295 |
([#2339](https://github.com/nix-rust/nix/pull/2339)) |
| 296 |
- Add if_indextoname function. |
| 297 |
([#2340](https://github.com/nix-rust/nix/pull/2340)) |
| 298 |
- Add `mount` and `unmount` API for apple targets. |
| 299 |
([#2347](https://github.com/nix-rust/nix/pull/2347)) |
| 300 |
- Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`. |
| 301 |
([#2349](https://github.com/nix-rust/nix/pull/2349)) |
| 302 |
- Added `impl AsFd for pty::PtyMaster` |
| 303 |
([#2355](https://github.com/nix-rust/nix/pull/2355)) |
| 304 |
- Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia, solarish, |
| 305 |
WASI ([#2374](https://github.com/nix-rust/nix/pull/2374)) |
| 306 |
- Add prctl function `prctl_set_vma_anon_name` for Linux/Android. |
| 307 |
([#2378](https://github.com/nix-rust/nix/pull/2378)) |
| 308 |
- Add `sync(2)` for `apple_targets/solarish/haiku/aix/hurd`, `syncfs(2)` for |
| 309 |
`hurd` and `fdatasync(2)` for `aix/hurd` |
| 310 |
([#2379](https://github.com/nix-rust/nix/pull/2379)) |
| 311 |
- Add fdatasync support for Apple targets. |
| 312 |
([#2380](https://github.com/nix-rust/nix/pull/2380)) |
| 313 |
- Add `fcntl::OFlag::O_PATH` for FreeBSD and Fuchsia |
| 314 |
([#2382](https://github.com/nix-rust/nix/pull/2382)) |
| 315 |
- Added `PathconfVar::MIN_HOLE_SIZE` for apple_targets. |
| 316 |
([#2388](https://github.com/nix-rust/nix/pull/2388)) |
| 317 |
- Add `open` flag `O_SEARCH` to apple_targets |
| 318 |
([#2391](https://github.com/nix-rust/nix/pull/2391)) |
| 319 |
- `O_DSYNC` may now be used with `aio_fsync` and `fcntl` on FreeBSD. |
| 320 |
([#2404](https://github.com/nix-rust/nix/pull/2404)) |
| 321 |
- Added `Flock::relock` for upgrading and downgrading locks. |
| 322 |
([#2407](https://github.com/nix-rust/nix/pull/2407)) |
| 323 |
|
| 324 |
### Changed |
| 325 |
|
| 326 |
- Change the `ForkptyResult` type to the following repr so that the |
| 327 |
uninitialized |
| 328 |
`master` field won't be accessed in the child process: |
| 329 |
|
| 330 |
```rs |
| 331 |
pub enum ForkptyResult { |
| 332 |
Parent { |
| 333 |
child: Pid, |
| 334 |
master: OwnedFd, |
| 335 |
}, |
| 336 |
Child, |
| 337 |
} |
| 338 |
``` ([#2315](https://github.com/nix-rust/nix/pull/2315)) |
| 339 |
- Updated `cfg_aliases` dependency from version 0.1 to 0.2 |
| 340 |
([#2322](https://github.com/nix-rust/nix/pull/2322)) |
| 341 |
- Change the signature of `ptrace::write` and `ptrace::write_user` to make them |
| 342 |
safe ([#2324](https://github.com/nix-rust/nix/pull/2324)) |
| 343 |
- Allow use of `SignalFd` through shared reference |
| 344 |
|
| 345 |
Like with many other file descriptors, concurrent use of signalfds is safe. |
| 346 |
Changing the signal mask of and reading signals from a signalfd can now be |
| 347 |
done |
| 348 |
with the `SignalFd` API even if other references to it exist. |
| 349 |
([#2367](https://github.com/nix-rust/nix/pull/2367)) |
| 350 |
- Changed tee, splice and vmsplice RawFd arguments to AsFd. |
| 351 |
([#2387](https://github.com/nix-rust/nix/pull/2387)) |
| 352 |
- Added I/O safety to the sys/aio module. Most functions that previously |
| 353 |
accepted a `AsRawFd` argument now accept an `AsFd` instead. |
| 354 |
([#2401](https://github.com/nix-rust/nix/pull/2401)) |
| 355 |
- `RecvMsg::cmsgs()` now returns a `Result`, and checks that cmsgs were not |
| 356 |
truncated. ([#2413](https://github.com/nix-rust/nix/pull/2413)) |
| 357 |
|
| 358 |
### Fixed |
| 359 |
|
| 360 |
- No longer panics when the `fanotify` queue overflows. |
| 361 |
([#2399](https://github.com/nix-rust/nix/pull/2399)) |
| 362 |
- Fixed ControlMessageOwned::UdpGroSegments wrapped type from u16 to i32 to |
| 363 |
reflect the used kernel's one. |
| 364 |
([#2406](https://github.com/nix-rust/nix/pull/2406)) |
| 365 |
|
| 366 |
|
| 367 |
## [0.28.0] - 2024-02-24 |
| 368 |
|
| 369 |
|
| 370 |
### Added |
| 371 |
|
| 372 |
- Added `mkdtemp` wrapper ([#1297](https://github.com/nix-rust/nix/pull/1297)) |
| 373 |
- Add associated constants `UTIME_OMIT` `UTIME_NOW` for `TimeSpec` |
| 374 |
([#1879](https://github.com/nix-rust/nix/pull/1879)) |
| 375 |
- Added `EventFd` type. ([#1945](https://github.com/nix-rust/nix/pull/1945)) |
| 376 |
- - Added `impl From<Signal> for SigSet`. |
| 377 |
- Added `impl std::ops::BitOr for SigSet`. |
| 378 |
- Added `impl std::ops::BitOr for Signal`. |
| 379 |
- Added `impl std::ops::BitOr<Signal> for SigSet` |
| 380 |
|
| 381 |
([#1959](https://github.com/nix-rust/nix/pull/1959)) |
| 382 |
- Added `TlsGetRecordType` control message type and corresponding enum for |
| 383 |
linux ([#2065](https://github.com/nix-rust/nix/pull/2065)) |
| 384 |
- Added `Ipv6HopLimit` to `::nix::sys::socket::ControlMessage` for Linux, |
| 385 |
MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku. |
| 386 |
([#2074](https://github.com/nix-rust/nix/pull/2074)) |
| 387 |
- Added `Icmp` and `IcmpV6` to `SockProtocol` |
| 388 |
([#2103](https://github.com/nix-rust/nix/pull/2103)) |
| 389 |
- Added rfork support for FreeBSD in `unistd` |
| 390 |
([#2121](https://github.com/nix-rust/nix/pull/2121)) |
| 391 |
- Added `MapFlags::map_hugetlb_with_size_log2` method for Linux targets |
| 392 |
([#2125](https://github.com/nix-rust/nix/pull/2125)) |
| 393 |
- Added `mmap_anonymous` function |
| 394 |
([#2127](https://github.com/nix-rust/nix/pull/2127)) |
| 395 |
- Added `mips32r6` and `mips64r6` support for signal, ioctl and ptrace |
| 396 |
([#2138](https://github.com/nix-rust/nix/pull/2138)) |
| 397 |
- Added `F_GETPATH` FcntlFlags entry on Apple/NetBSD/DragonflyBSD for |
| 398 |
`::nix::fcntl`. ([#2142](https://github.com/nix-rust/nix/pull/2142)) |
| 399 |
- Added `F_KINFO` FcntlFlags entry on FreeBSD for `::nix::fcntl`. |
| 400 |
([#2152](https://github.com/nix-rust/nix/pull/2152)) |
| 401 |
- Added `F_GETPATH_NOFIRMLINK` and `F_BARRIERFSYNC` FcntlFlags entry |
| 402 |
on Apple for `::nix::fcntl`. |
| 403 |
([#2155](https://github.com/nix-rust/nix/pull/2155)) |
| 404 |
- Added newtype `Flock` to automatically unlock a held flock upon drop. |
| 405 |
Added `Flockable` trait to represent valid types for `Flock`. |
| 406 |
([#2170](https://github.com/nix-rust/nix/pull/2170)) |
| 407 |
- Added `SetSockOpt` impls to enable Linux Kernel TLS on a TCP socket and to |
| 408 |
import TLS parameters. ([#2175](https://github.com/nix-rust/nix/pull/2175)) |
| 409 |
- - Added the `::nix::sys::socket::SocketTimestamp` enum for configuring the |
| 410 |
`TsClock` (a.k.a `SO_TS_CLOCK`) sockopt |
| 411 |
- Added FreeBSD's `ScmRealtime` and `ScmMonotonic` as new options in |
| 412 |
`::nix::sys::socket::ControlMessageOwned` |
| 413 |
|
| 414 |
([#2187](https://github.com/nix-rust/nix/pull/2187)) |
| 415 |
- Added new fanotify API: wrappers for `fanotify_init` and `fanotify_mark` |
| 416 |
([#2194](https://github.com/nix-rust/nix/pull/2194)) |
| 417 |
- Added `SpecialCharacterindices` support for haiku. |
| 418 |
([#2195](https://github.com/nix-rust/nix/pull/2195)) |
| 419 |
- Added `sys::sendfile` support for solaris/illumos. |
| 420 |
([#2198](https://github.com/nix-rust/nix/pull/2198)) |
| 421 |
- impl Display for InterfaceFlags |
| 422 |
([#2206](https://github.com/nix-rust/nix/pull/2206)) |
| 423 |
- Added `sendfilev` in sys::sendfile for solarish |
| 424 |
([#2207](https://github.com/nix-rust/nix/pull/2207)) |
| 425 |
- Added `fctrl::SealFlag::F_SEAL_FUTURE_WRITE` |
| 426 |
([#2213](https://github.com/nix-rust/nix/pull/2213)) |
| 427 |
- Added `Ipv6MulticastHops` as socket option to set and read. |
| 428 |
([#2234](https://github.com/nix-rust/nix/pull/2234)) |
| 429 |
- Enable `ControlMessageOwned::Ipv4RecvIf` and |
| 430 |
`ControlMessageOwned::Ipv4RecvDstAddr` for DragonFlyBSD |
| 431 |
([#2240](https://github.com/nix-rust/nix/pull/2240)) |
| 432 |
- `ClockId::set_time()` and `time::clock_settime()` are now enabled on macOS |
| 433 |
([#2241](https://github.com/nix-rust/nix/pull/2241)) |
| 434 |
- Added `IpBindAddressNoPort` sockopt to support `IP_BIND_ADDRESS_NO_PORT` |
| 435 |
available on linux. ([#2244](https://github.com/nix-rust/nix/pull/2244)) |
| 436 |
- Enable `MapFlags::map_hugetlb_with_size_log2` method for Android/Fuchsia |
| 437 |
([#2245](https://github.com/nix-rust/nix/pull/2245)) |
| 438 |
- Added `TcpFastOpenConnect` sockopt to support `TCP_FASTOPEN_CONNECT` |
| 439 |
available on linux. ([#2247](https://github.com/nix-rust/nix/pull/2247)) |
| 440 |
- Add `reboot(2)` for OpenBSD/NetBSD |
| 441 |
([#2251](https://github.com/nix-rust/nix/pull/2251)) |
| 442 |
- Added new `MemFdCreateFlag` constants to `sys::memfd` on Linux and Android |
| 443 |
related to hugetlbfs support. |
| 444 |
([#2252](https://github.com/nix-rust/nix/pull/2252)) |
| 445 |
- Expose the inner fd of `Kqueue` through: |
| 446 |
|
| 447 |
* impl AsFd for Kqueue |
| 448 |
* impl From\<Kqueue\> for OwnedFd |
| 449 |
|
| 450 |
([#2258](https://github.com/nix-rust/nix/pull/2258)) |
| 451 |
- Added `sys::eventfd` support on FreeBSD |
| 452 |
([#2259](https://github.com/nix-rust/nix/pull/2259)) |
| 453 |
- Added `MmapFlags::MAP_FIXED` constant in `sys::mman` for netbsd and openbsd |
| 454 |
([#2260](https://github.com/nix-rust/nix/pull/2260)) |
| 455 |
- Added the `SO_LISTENQLIMIT` sockopt. |
| 456 |
([#2263](https://github.com/nix-rust/nix/pull/2263)) |
| 457 |
- Enable the `AT_EMPTY_PATH` flag for the `fchownat()` function |
| 458 |
([#2267](https://github.com/nix-rust/nix/pull/2267)) |
| 459 |
- Add `AtFlags::AT_EMPTY_PATH` for FreeBSD and Hurd |
| 460 |
([#2270](https://github.com/nix-rust/nix/pull/2270)) |
| 461 |
- Enable `OFlag::O_DIRECTORY for Solarish |
| 462 |
([#2275](https://github.com/nix-rust/nix/pull/2275)) |
| 463 |
- Added the `Backlog` wrapper type for the `listen` call. |
| 464 |
([#2276](https://github.com/nix-rust/nix/pull/2276)) |
| 465 |
- Add `clock_nanosleep()` ([#2277](https://github.com/nix-rust/nix/pull/2277)) |
| 466 |
- Enabled `O_DIRECT` in `fcntl::OFlags` for solarish |
| 467 |
([#2278](https://github.com/nix-rust/nix/pull/2278)) |
| 468 |
- Added a new API sigsuspend. |
| 469 |
([#2279](https://github.com/nix-rust/nix/pull/2279)) |
| 470 |
- - Added `errno::Errno::set` function |
| 471 |
- Added `errno::Errno::set_raw` function |
| 472 |
- Added `errno::Errno::last_raw` function |
| 473 |
- Added `errno::Errno::from_raw` function |
| 474 |
|
| 475 |
([#2283](https://github.com/nix-rust/nix/pull/2283)) |
| 476 |
- Enable the `AT_EMPTY_PATH` flag for the `linkat()` function |
| 477 |
([#2284](https://github.com/nix-rust/nix/pull/2284)) |
| 478 |
- Enable unistd::{sync, syncfs} for Android |
| 479 |
([#2296](https://github.com/nix-rust/nix/pull/2296)) |
| 480 |
|
| 481 |
### Changed |
| 482 |
|
| 483 |
- `poll` now takes `PollTimeout` replacing `libc::c_int`. |
| 484 |
([#1876](https://github.com/nix-rust/nix/pull/1876)) |
| 485 |
- Deprecated `sys::eventfd::eventfd`. |
| 486 |
([#1945](https://github.com/nix-rust/nix/pull/1945)) |
| 487 |
- `mmap`, `mmap_anonymous`, `munmap`, `mremap`, `madvise`, `msync`, `mprotect`, |
| 488 |
`munlock` and `mlock` updated to use `NonNull`. |
| 489 |
([#2000](https://github.com/nix-rust/nix/pull/2000)) |
| 490 |
- `mmap` function now accepts `F` instead of `Option<F>` |
| 491 |
([#2127](https://github.com/nix-rust/nix/pull/2127)) |
| 492 |
- `PollFd::new` now takes a `BorrowedFd` argument, with relaxed lifetime |
| 493 |
requirements relative to the previous version. |
| 494 |
([#2134](https://github.com/nix-rust/nix/pull/2134)) |
| 495 |
- `FdSet::{insert, remove, contains}` now take `BorrowedFd` arguments, and have |
| 496 |
relaxed lifetime requirements relative to 0.27.1. |
| 497 |
([#2136](https://github.com/nix-rust/nix/pull/2136)) |
| 498 |
- The following APIs now take an implementation of `AsFd` rather than a |
| 499 |
`RawFd`: |
| 500 |
|
| 501 |
- `unistd::tcgetpgrp` |
| 502 |
- `unistd::tcsetpgrp` |
| 503 |
- `unistd::fpathconf` |
| 504 |
- `unistd::ttyname` |
| 505 |
- `unistd::getpeereid` ([#2137](https://github.com/nix-rust/nix/pull/2137)) |
| 506 |
- Changed `openat()` and `Dir::openat()`, now take optional `dirfd`s |
| 507 |
([#2139](https://github.com/nix-rust/nix/pull/2139)) |
| 508 |
- The MSRV is now 1.69 ([#2144](https://github.com/nix-rust/nix/pull/2144)) |
| 509 |
- Changed function `SockaddrIn::ip()` to return `net::Ipv4Addr` and refactored |
| 510 |
`SocketAddrV6::ip()` to be `const` |
| 511 |
([#2151](https://github.com/nix-rust/nix/pull/2151)) |
| 512 |
- The following APIs now take optional `dirfd`s: |
| 513 |
|
| 514 |
- `readlinkat()` |
| 515 |
- `fstatat()` |
| 516 |
- `mknodat()` |
| 517 |
- `mkdirat()` |
| 518 |
- `execveat()` |
| 519 |
|
| 520 |
([#2157](https://github.com/nix-rust/nix/pull/2157)) |
| 521 |
- `Epoll::wait` now takes `EpollTimeout` replacing `isize`. |
| 522 |
([#2202](https://github.com/nix-rust/nix/pull/2202)) |
| 523 |
- - Deprecated `errno::errno()` function (use `Errno::last_raw()`) |
| 524 |
- Deprecated `errno::from_i32()` function (use `Errno::from_raw()`) |
| 525 |
- Deprecated `errno::Errno::from_i32()` function (use `Errno::from_raw()`) |
| 526 |
|
| 527 |
([#2283](https://github.com/nix-rust/nix/pull/2283)) |
| 528 |
|
| 529 |
### Fixed |
| 530 |
|
| 531 |
- Fix `SigSet` incorrect implementation of `Eq`, `PartialEq` and `Hash` |
| 532 |
([#1946](https://github.com/nix-rust/nix/pull/1946)) |
| 533 |
- Fixed `::sys::socket::sockopt::IpMulticastTtl` by fixing the value of optlen |
| 534 |
passed to `libc::setsockopt` and added tests. |
| 535 |
([#2072](https://github.com/nix-rust/nix/pull/2072)) |
| 536 |
- Fixed the function signature of `recvmmsg`, potentially causing UB |
| 537 |
([#2119](https://github.com/nix-rust/nix/pull/2119)) |
| 538 |
- Fix `SignalFd::set_mask`. In 0.27.0 it would actually close the file |
| 539 |
descriptor. ([#2141](https://github.com/nix-rust/nix/pull/2141)) |
| 540 |
- Fixed UnixAddr::new for haiku, it did not record the `sun_len` value as |
| 541 |
needed. |
| 542 |
Fixed `sys::socket::addr::from_raw_parts` and |
| 543 |
`sys::socket::Sockaddrlike::len` build for solaris. |
| 544 |
([#2242](https://github.com/nix-rust/nix/pull/2242)) |
| 545 |
- Fixed solaris build globally. |
| 546 |
([#2248](https://github.com/nix-rust/nix/pull/2248)) |
| 547 |
- Changed the `dup3` wrapper to perform a real call to `dup3` instead of |
| 548 |
emulating it via `dup2` and `fcntl` to get rid of race condition |
| 549 |
([#2268](https://github.com/nix-rust/nix/pull/2268)) |
| 550 |
- Fixed `::unistd::Group::members` using read_unaligned to avoid crash on |
| 551 |
misaligned pointers ([#2311](https://github.com/nix-rust/nix/pull/2311)) |
| 552 |
|
| 553 |
### Removed |
| 554 |
|
| 555 |
- The `FchownatFlags` type has been deprecated, please use `AtFlags` instead. |
| 556 |
([#2267](https://github.com/nix-rust/nix/pull/2267)) |
| 557 |
- Removed the `dup3` wrapper on macOS, which was emulated via `dup2` and |
| 558 |
`fcntl` and could cause a race condition. The `dup3` system call is not |
| 559 |
supported on macOS. ([#2268](https://github.com/nix-rust/nix/pull/2268)) |
| 560 |
- The `LinkatFlags` type has been deprecated, please use `AtFlags` instead. |
| 561 |
([#2284](https://github.com/nix-rust/nix/pull/2284)) |
| 562 |
|
| 563 |
|
| 564 |
## [0.27.1] - 2023-08-28 |
| 565 |
|
| 566 |
### Fixed |
| 567 |
|
| 568 |
- Fixed generating the documentation on docs.rs. |
| 569 |
([#2111](https://github.com/nix-rust/nix/pull/2111)) |
| 570 |
|
| 571 |
## [0.27.0] - 2023-08-28 |
| 572 |
### Added |
| 573 |
- Added `AT_EACCESS` to `AtFlags` on all platforms but android |
| 574 |
([#1995](https://github.com/nix-rust/nix/pull/1995)) |
| 575 |
- Add `PF_ROUTE` to `SockType` on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos. |
| 576 |
([#1867](https://github.com/nix-rust/nix/pull/1867)) |
| 577 |
- Added `nix::ucontext` module on `aarch64-unknown-linux-gnu`. |
| 578 |
(#[1662](https://github.com/nix-rust/nix/pull/1662)) |
| 579 |
- Added `CanRaw` to `SockProtocol` and `CanBcm` as a separate `SocProtocol` constant. |
| 580 |
([#1912](https://github.com/nix-rust/nix/pull/1912)) |
| 581 |
- Added `Generic` and `NFLOG` to `SockProtocol`. |
| 582 |
([#2092](https://github.com/nix-rust/nix/pull/2092)) |
| 583 |
- Added `mq_timedreceive` to `::nix::mqueue`. |
| 584 |
([#1966])(https://github.com/nix-rust/nix/pull/1966) |
| 585 |
- Added `LocalPeerPid` to `nix::sys::socket::sockopt` for macOS. ([#1967](https://github.com/nix-rust/nix/pull/1967)) |
| 586 |
- Added `TFD_TIMER_CANCEL_ON_SET` to `::nix::sys::time::TimerSetTimeFlags` on Linux and Android. |
| 587 |
([#2040](https://github.com/nix-rust/nix/pull/2040)) |
| 588 |
- Added `SOF_TIMESTAMPING_OPT_ID` and `SOF_TIMESTAMPING_OPT_TSONLY` to `nix::sys::socket::TimestampingFlag`. |
| 589 |
([#2048](https://github.com/nix-rust/nix/pull/2048)) |
| 590 |
- Enabled socket timestamping options on Android. ([#2077](https://github.com/nix-rust/nix/pull/2077)) |
| 591 |
- Added vsock support for macOS ([#2056](https://github.com/nix-rust/nix/pull/2056)) |
| 592 |
- Added `SO_SETFIB` and `SO_USER_COOKIE` to `nix::sys::socket::sockopt` for FreeBSD. |
| 593 |
([#2085](https://github.com/nix-rust/nix/pull/2085)) |
| 594 |
- Added `SO_RTABLE` for OpenBSD and `SO_ACCEPTFILTER` for FreeBSD/NetBSD to `nix::sys::socket::sockopt`. |
| 595 |
([#2085](https://github.com/nix-rust/nix/pull/2085)) |
| 596 |
- Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD, |
| 597 |
FreeBSD, OpenBSD, and Solaris. |
| 598 |
([#2014](https://github.com/nix-rust/nix/pull/2014)) |
| 599 |
- Added `SO_TS_CLOCK` for FreeBSD to `nix::sys::socket::sockopt`. |
| 600 |
([#2093](https://github.com/nix-rust/nix/pull/2093)) |
| 601 |
- Added support for prctl in Linux. |
| 602 |
(#[1550](https://github.com/nix-rust/nix/pull/1550)) |
| 603 |
- `nix::socket` and `nix::select` are now available on Redox. |
| 604 |
([#2012](https://github.com/nix-rust/nix/pull/2012)) |
| 605 |
- Implemented AsFd, AsRawFd, FromRawFd, and IntoRawFd for `mqueue::MqdT`. |
| 606 |
([#2097](https://github.com/nix-rust/nix/pull/2097)) |
| 607 |
- Add the ability to set `kevent_flags` on `SigEvent`. |
| 608 |
([#1731](https://github.com/nix-rust/nix/pull/1731)) |
| 609 |
|
| 610 |
### Changed |
| 611 |
|
| 612 |
- All Cargo features have been removed from the default set. Users will need to |
| 613 |
specify which features they depend on in their Cargo.toml. |
| 614 |
([#2091](https://github.com/nix-rust/nix/pull/2091)) |
| 615 |
- Implemented I/O safety for many, but not all, of Nix's APIs. Many public |
| 616 |
functions argument and return types have changed: |
| 617 |
| Original Type | New Type | |
| 618 |
| ------------- | --------------------- | |
| 619 |
| AsRawFd | AsFd | |
| 620 |
| RawFd | BorrowedFd or OwnedFd | |
| 621 |
|
| 622 |
(#[1906](https://github.com/nix-rust/nix/pull/1906)) |
| 623 |
- Use I/O safety with `copy_file_range`, and expose it on FreeBSD. |
| 624 |
(#[1906](https://github.com/nix-rust/nix/pull/1906)) |
| 625 |
- The MSRV is now 1.65 |
| 626 |
([#1862](https://github.com/nix-rust/nix/pull/1862)) |
| 627 |
([#2104](https://github.com/nix-rust/nix/pull/2104)) |
| 628 |
- The epoll interface now uses a type. |
| 629 |
([#1882](https://github.com/nix-rust/nix/pull/1882)) |
| 630 |
- With I/O-safe type applied in `pty::OpenptyResult` and `pty::ForkptyResult`, |
| 631 |
users no longer need to manually close the file descriptors in these types. |
| 632 |
([#1921](https://github.com/nix-rust/nix/pull/1921)) |
| 633 |
- Refactored `name` parameter of `mq_open` and `mq_unlink` to be generic over |
| 634 |
`NixPath`. |
| 635 |
([#2102](https://github.com/nix-rust/nix/pull/2102)). |
| 636 |
- Made `clone` unsafe, like `fork`. |
| 637 |
([#1993](https://github.com/nix-rust/nix/pull/1993)) |
| 638 |
|
| 639 |
### Removed |
| 640 |
|
| 641 |
- `sys::event::{kevent, kevent_ts}` are deprecated in favor of |
| 642 |
`sys::kevent::Kqueue::kevent`, and `sys::event::kqueue` is deprecated in |
| 643 |
favor of `sys::kevent::Kqueue::new`. |
| 644 |
([#1943](https://github.com/nix-rust/nix/pull/1943)) |
| 645 |
- Removed deprecated IoVec API. |
| 646 |
([#1855](https://github.com/nix-rust/nix/pull/1855)) |
| 647 |
- Removed deprecated net APIs. |
| 648 |
([#1861](https://github.com/nix-rust/nix/pull/1861)) |
| 649 |
- `nix::sys::signalfd::signalfd` is deprecated. Use |
| 650 |
`nix::sys::signalfd::SignalFd` instead. |
| 651 |
([#1938](https://github.com/nix-rust/nix/pull/1938)) |
| 652 |
- Removed `SigEvent` support on Fuchsia, where it was unsound. |
| 653 |
([#2079](https://github.com/nix-rust/nix/pull/2079)) |
| 654 |
- Removed `flock` from `::nix::fcntl` on Solaris. |
| 655 |
([#2082](https://github.com/nix-rust/nix/pull/2082)) |
| 656 |
|
| 657 |
## [0.26.3] - 2023-08-27 |
| 658 |
|
| 659 |
### Fixed |
| 660 |
- Fix: send `ETH_P_ALL` in htons format |
| 661 |
([#1925](https://github.com/nix-rust/nix/pull/1925)) |
| 662 |
- Fix: `recvmsg` now sets the length of the received `sockaddr_un` field |
| 663 |
correctly on Linux platforms. ([#2041](https://github.com/nix-rust/nix/pull/2041)) |
| 664 |
- Fix potentially invalid conversions in |
| 665 |
`SockaddrIn::from<std::net::SocketAddrV4>`, |
| 666 |
`SockaddrIn6::from<std::net::SockaddrV6>`, `IpMembershipRequest::new`, and |
| 667 |
`Ipv6MembershipRequest::new` with future Rust versions. |
| 668 |
([#2061](https://github.com/nix-rust/nix/pull/2061)) |
| 669 |
- Fixed an incorrect lifetime returned from `recvmsg`. |
| 670 |
([#2095](https://github.com/nix-rust/nix/pull/2095)) |
| 671 |
|
| 672 |
## [0.26.2] - 2023-01-18 |
| 673 |
|
| 674 |
### Fixed |
| 675 |
|
| 676 |
- Fix `SockaddrIn6` bug that was swapping `flowinfo` and `scope_id` byte |
| 677 |
ordering. |
| 678 |
([#1964](https://github.com/nix-rust/nix/pull/1964)) |
| 679 |
|
| 680 |
## [0.26.1] - 2022-11-29 |
| 681 |
### Fixed |
| 682 |
- Fix UB with `sys::socket::sockopt::SockType` using `SOCK_PACKET`. |
| 683 |
([#1821](https://github.com/nix-rust/nix/pull/1821)) |
| 684 |
|
| 685 |
## [0.26.0] - 2022-11-29 |
| 686 |
### Added |
| 687 |
|
| 688 |
- Added `SockaddrStorage::{as_unix_addr, as_unix_addr_mut}` |
| 689 |
([#1871](https://github.com/nix-rust/nix/pull/1871)) |
| 690 |
- Added `MntFlags` and `unmount` on all of the BSDs. |
| 691 |
- Added `any()` and `all()` to `poll::PollFd`. |
| 692 |
([#1877](https://github.com/nix-rust/nix/pull/1877)) |
| 693 |
- Add `MntFlags` and `unmount` on all of the BSDs. |
| 694 |
([#1849](https://github.com/nix-rust/nix/pull/1849)) |
| 695 |
- Added a `Statfs::flags` method. |
| 696 |
([#1849](https://github.com/nix-rust/nix/pull/1849)) |
| 697 |
- Added `NSFS_MAGIC` FsType on Linux and Android. |
| 698 |
([#1829](https://github.com/nix-rust/nix/pull/1829)) |
| 699 |
- Added `sched_getcpu` on platforms that support it. |
| 700 |
([#1825](https://github.com/nix-rust/nix/pull/1825)) |
| 701 |
- Added `sched_getaffinity` and `sched_setaffinity` on FreeBSD. |
| 702 |
([#1804](https://github.com/nix-rust/nix/pull/1804)) |
| 703 |
- Added `line_discipline` field to `Termios` on Linux, Android and Haiku |
| 704 |
([#1805](https://github.com/nix-rust/nix/pull/1805)) |
| 705 |
- Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13) |
| 706 |
([#1808](https://github.com/nix-rust/nix/pull/1808)) |
| 707 |
- Added `domainname` field of `UtsName` on Android and Linux |
| 708 |
([#1817](https://github.com/nix-rust/nix/pull/1817)) |
| 709 |
- Re-export `RLIM_INFINITY` from `libc` |
| 710 |
([#1831](https://github.com/nix-rust/nix/pull/1831)) |
| 711 |
- Added `syncfs(2)` on Linux |
| 712 |
([#1833](https://github.com/nix-rust/nix/pull/1833)) |
| 713 |
- Added `faccessat(2)` on illumos |
| 714 |
([#1841](https://github.com/nix-rust/nix/pull/1841)) |
| 715 |
- Added `eaccess()` on FreeBSD, DragonFly and Linux (glibc and musl). |
| 716 |
([#1842](https://github.com/nix-rust/nix/pull/1842)) |
| 717 |
- Added `IP_TOS` `SO_PRIORITY` and `IPV6_TCLASS` sockopts for Linux |
| 718 |
([#1853](https://github.com/nix-rust/nix/pull/1853)) |
| 719 |
- Added `new_unnamed` and `is_unnamed` for `UnixAddr` on Linux and Android. |
| 720 |
([#1857](https://github.com/nix-rust/nix/pull/1857)) |
| 721 |
- Added `SockProtocol::Raw` for raw sockets |
| 722 |
([#1848](https://github.com/nix-rust/nix/pull/1848)) |
| 723 |
- added `IP_MTU` (`IpMtu`) `IPPROTO_IP` sockopt on Linux and Android. |
| 724 |
([#1865](https://github.com/nix-rust/nix/pull/1865)) |
| 725 |
|
| 726 |
### Changed |
| 727 |
|
| 728 |
- The MSRV is now 1.56.1 |
| 729 |
([#1792](https://github.com/nix-rust/nix/pull/1792)) |
| 730 |
- The `addr` argument of `sys::mman::mmap` is now of type `Option<NonZeroUsize>`. |
| 731 |
([#1870](https://github.com/nix-rust/nix/pull/1870)) |
| 732 |
- The `length` argument of `sys::mman::mmap` is now of type `NonZeroUsize`. |
| 733 |
([#1873](https://github.com/nix-rust/nix/pull/1873)) |
| 734 |
|
| 735 |
### Fixed |
| 736 |
|
| 737 |
- Fixed using `SockaddrStorage` to store a Unix-domain socket address on Linux. |
| 738 |
([#1871](https://github.com/nix-rust/nix/pull/1871)) |
| 739 |
- Fix microsecond calculation for `TimeSpec`. |
| 740 |
([#1801](https://github.com/nix-rust/nix/pull/1801)) |
| 741 |
- Fix `User::from_name` and `Group::from_name` panicking |
| 742 |
when given a name containing a nul. |
| 743 |
([#1815](https://github.com/nix-rust/nix/pull/1815)) |
| 744 |
- Fix `User::from_uid` and `User::from_name` crash on Android platform. |
| 745 |
([#1824](https://github.com/nix-rust/nix/pull/1824)) |
| 746 |
- Workaround XNU bug causing netmasks returned by `getifaddrs` to misbehave. |
| 747 |
([#1788](https://github.com/nix-rust/nix/pull/1788)) |
| 748 |
|
| 749 |
### Removed |
| 750 |
|
| 751 |
- Removed deprecated error constants and conversions. |
| 752 |
([#1860](https://github.com/nix-rust/nix/pull/1860)) |
| 753 |
|
| 754 |
## [0.25.0] - 2022-08-13 |
| 755 |
### Added |
| 756 |
|
| 757 |
- Added `faccessat` |
| 758 |
([#1780](https://github.com/nix-rust/nix/pull/1780)) |
| 759 |
- Added `memfd` on Android. |
| 760 |
(#[1773](https://github.com/nix-rust/nix/pull/1773)) |
| 761 |
- Added `ETH_P_ALL` to `SockProtocol` enum |
| 762 |
(#[1768](https://github.com/nix-rust/nix/pull/1768)) |
| 763 |
- Added four non-standard Linux `SysconfVar` variants |
| 764 |
(#[1761](https://github.com/nix-rust/nix/pull/1761)) |
| 765 |
- Added const constructors for `TimeSpec` and `TimeVal` |
| 766 |
(#[1760](https://github.com/nix-rust/nix/pull/1760)) |
| 767 |
- Added `chflags`. |
| 768 |
(#[1758](https://github.com/nix-rust/nix/pull/1758)) |
| 769 |
- Added `aio_writev` and `aio_readv`. |
| 770 |
(#[1713](https://github.com/nix-rust/nix/pull/1713)) |
| 771 |
- impl `From<uid_t>` for `Uid` and `From<gid_t>` for `Gid` |
| 772 |
(#[1727](https://github.com/nix-rust/nix/pull/1727)) |
| 773 |
- impl `From<SockaddrIn>` for `std::net::SocketAddrV4` and |
| 774 |
impl `From<SockaddrIn6>` for `std::net::SocketAddrV6`. |
| 775 |
(#[1711](https://github.com/nix-rust/nix/pull/1711)) |
| 776 |
- Added support for the `x86_64-unknown-haiku` target. |
| 777 |
(#[1703](https://github.com/nix-rust/nix/pull/1703)) |
| 778 |
- Added `ptrace::read_user` and `ptrace::write_user` for Linux. |
| 779 |
(#[1697](https://github.com/nix-rust/nix/pull/1697)) |
| 780 |
- Added `getrusage` and helper types `UsageWho` and `Usage` |
| 781 |
(#[1747](https://github.com/nix-rust/nix/pull/1747)) |
| 782 |
- Added the `DontRoute` SockOpt |
| 783 |
(#[1752](https://github.com/nix-rust/nix/pull/1752)) |
| 784 |
- Added `signal::SigSet::from_sigset_t_unchecked()`. |
| 785 |
(#[1741](https://github.com/nix-rust/nix/pull/1741)) |
| 786 |
- Added the `Ipv4OrigDstAddr` sockopt and control message. |
| 787 |
(#[1772](https://github.com/nix-rust/nix/pull/1772)) |
| 788 |
- Added the `Ipv6OrigDstAddr` sockopt and control message. |
| 789 |
(#[1772](https://github.com/nix-rust/nix/pull/1772)) |
| 790 |
- Added the `Ipv4SendSrcAddr` control message. |
| 791 |
(#[1776](https://github.com/nix-rust/nix/pull/1776)) |
| 792 |
|
| 793 |
### Changed |
| 794 |
|
| 795 |
- Reimplemented sendmmsg/recvmmsg to avoid allocations and with better API |
| 796 |
(#[1744](https://github.com/nix-rust/nix/pull/1744)) |
| 797 |
|
| 798 |
- Rewrote the aio module. The new module: |
| 799 |
* Does more type checking at compile time rather than runtime. |
| 800 |
* Gives the caller control over whether and when to `Box` an aio operation. |
| 801 |
* Changes the type of the `priority` arguments to `i32`. |
| 802 |
* Changes the return type of `aio_return` to `usize`. |
| 803 |
(#[1713](https://github.com/nix-rust/nix/pull/1713)) |
| 804 |
- `nix::poll::ppoll`: `sigmask` parameter is now optional. |
| 805 |
(#[1739](https://github.com/nix-rust/nix/pull/1739)) |
| 806 |
- Changed `gethostname` to return an owned `OsString`. |
| 807 |
(#[1745](https://github.com/nix-rust/nix/pull/1745)) |
| 808 |
- `signal:SigSet` is now marked as `repr(transparent)`. |
| 809 |
(#[1741](https://github.com/nix-rust/nix/pull/1741)) |
| 810 |
|
| 811 |
### Removed |
| 812 |
|
| 813 |
- Removed support for resubmitting partially complete `lio_listio` operations. |
| 814 |
It was too complicated, and didn't fit Nix's theme of zero-cost abstractions. |
| 815 |
Instead, it can be reimplemented downstream. |
| 816 |
(#[1713](https://github.com/nix-rust/nix/pull/1713)) |
| 817 |
|
| 818 |
## [0.24.2] - 2022-07-17 |
| 819 |
### Fixed |
| 820 |
|
| 821 |
- Fixed buffer overflow in `nix::sys::socket::recvfrom`. |
| 822 |
(#[1763](https://github.com/nix-rust/nix/pull/1763)) |
| 823 |
- Enabled `SockaddrStorage::{as_link_addr, as_link_addr_mut}` for Linux-like |
| 824 |
operating systems. |
| 825 |
(#[1729](https://github.com/nix-rust/nix/pull/1729)) |
| 826 |
- Fixed `SockaddrLike::from_raw` implementations for `VsockAddr` and |
| 827 |
`SysControlAddr`. |
| 828 |
(#[1736](https://github.com/nix-rust/nix/pull/1736)) |
| 829 |
|
| 830 |
## [0.24.1] - 2022-04-22 |
| 831 |
### Fixed |
| 832 |
|
| 833 |
- Fixed `UnixAddr::size` on Linux-based OSes. |
| 834 |
(#[1702](https://github.com/nix-rust/nix/pull/1702)) |
| 835 |
|
| 836 |
## [0.24.0] - 2022-04-21 |
| 837 |
### Added |
| 838 |
|
| 839 |
- Added fine-grained features flags. Most Nix functionality can now be |
| 840 |
conditionally enabled. By default, all features are enabled. |
| 841 |
(#[1611](https://github.com/nix-rust/nix/pull/1611)) |
| 842 |
- Added statfs FS type magic constants for `target_os = "android"` |
| 843 |
and synced constants with libc v0.2.121. |
| 844 |
(#[1690](https://github.com/nix-rust/nix/pull/1690)) |
| 845 |
- Added `fexecve` on DragonFly. |
| 846 |
(#[1577](https://github.com/nix-rust/nix/pull/1577)) |
| 847 |
- `sys::uio::IoVec` is now `Send` and `Sync` |
| 848 |
(#[1582](https://github.com/nix-rust/nix/pull/1582)) |
| 849 |
- Added `EPOLLEXCLUSIVE` on Android. |
| 850 |
(#[1567](https://github.com/nix-rust/nix/pull/1567)) |
| 851 |
- Added `fdatasync` for FreeBSD, Fuchsia, NetBSD, and OpenBSD. |
| 852 |
(#[1581](https://github.com/nix-rust/nix/pull/1581)) |
| 853 |
- Added `sched_setaffinity` and `sched_getaffinity` on DragonFly. |
| 854 |
(#[1537](https://github.com/nix-rust/nix/pull/1537)) |
| 855 |
- Added `posix_fallocate` on DragonFly. |
| 856 |
(#[1621](https://github.com/nix-rust/nix/pull/1621)) |
| 857 |
- Added `SO_TIMESTAMPING` support |
| 858 |
(#[1547](https://github.com/nix-rust/nix/pull/1547)) |
| 859 |
- Added getter methods to `MqAttr` struct |
| 860 |
(#[1619](https://github.com/nix-rust/nix/pull/1619)) |
| 861 |
- Added the `TxTime` sockopt and control message. |
| 862 |
(#[1564](https://github.com/nix-rust/nix/pull/1564)) |
| 863 |
- Added POSIX per-process timer support |
| 864 |
(#[1622](https://github.com/nix-rust/nix/pull/1622)) |
| 865 |
- Added `sendfile` on DragonFly. |
| 866 |
(#[1615](https://github.com/nix-rust/nix/pull/1615)) |
| 867 |
- Added `UMOUNT_NOFOLLOW`, `FUSE_SUPER_MAGIC` on Linux. |
| 868 |
(#[1634](https://github.com/nix-rust/nix/pull/1634)) |
| 869 |
- Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD. |
| 870 |
(#[1628](https://github.com/nix-rust/nix/pull/1628)) |
| 871 |
- Added `MAP_FIXED_NOREPLACE` on Linux. |
| 872 |
(#[1636](https://github.com/nix-rust/nix/pull/1636)) |
| 873 |
- Added `fspacectl` on FreeBSD |
| 874 |
(#[1640](https://github.com/nix-rust/nix/pull/1640)) |
| 875 |
- Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. |
| 876 |
(#[1654](https://github.com/nix-rust/nix/pull/1654)) |
| 877 |
- Added `AsRawFd` implementation on `OwningIter`. |
| 878 |
(#[1563](https://github.com/nix-rust/nix/pull/1563)) |
| 879 |
- Added `process_vm_readv` and `process_vm_writev` on Android. |
| 880 |
(#[1557](https://github.com/nix-rust/nix/pull/1557)) |
| 881 |
- Added `nix::ucontext` module on s390x. |
| 882 |
(#[1662](https://github.com/nix-rust/nix/pull/1662)) |
| 883 |
- Implemented `Extend`, `FromIterator`, and `IntoIterator` for `SigSet` and |
| 884 |
added `SigSet::iter` and `SigSetIter`. |
| 885 |
(#[1553](https://github.com/nix-rust/nix/pull/1553)) |
| 886 |
- Added `ENOTRECOVERABLE` and `EOWNERDEAD` error codes on DragonFly. |
| 887 |
(#[1665](https://github.com/nix-rust/nix/pull/1665)) |
| 888 |
- Implemented `Read` and `Write` for `&PtyMaster` |
| 889 |
(#[1664](https://github.com/nix-rust/nix/pull/1664)) |
| 890 |
- Added `MSG_NOSIGNAL` for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. |
| 891 |
(#[1670](https://github.com/nix-rust/nix/pull/1670)) |
| 892 |
- Added `waitid`. |
| 893 |
(#[1584](https://github.com/nix-rust/nix/pull/1584)) |
| 894 |
- Added `Ipv6DontFrag` for android, iOS, linux and macOS. |
| 895 |
- Added `IpDontFrag` for iOS, macOS. |
| 896 |
(#[1692](https://github.com/nix-rust/nix/pull/1692)) |
| 897 |
|
| 898 |
### Changed |
| 899 |
|
| 900 |
- `mqueue` functions now operate on a distinct type, `nix::mqueue::MqdT`. |
| 901 |
Accessors take this type by reference, not by value. |
| 902 |
(#[1639](https://github.com/nix-rust/nix/pull/1639)) |
| 903 |
- Removed `SigSet::extend` in favor of `<SigSet as Extend<Signal>>::extend`. |
| 904 |
Because of this change, you now need `use std::iter::Extend` to call `extend` |
| 905 |
on a `SigSet`. |
| 906 |
(#[1553](https://github.com/nix-rust/nix/pull/1553)) |
| 907 |
- Removed the the `PATH_MAX` restriction from APIs accepting paths. Paths |
| 908 |
will now be allocated on the heap if they are too long. In addition, large |
| 909 |
instruction count improvements (~30x) were made to path handling. |
| 910 |
(#[1656](https://github.com/nix-rust/nix/pull/1656)) |
| 911 |
- Changed `getrlimit` and `setrlimit` to use `rlim_t` directly |
| 912 |
instead of `Option<rlim_t>`. |
| 913 |
(#[1668](https://github.com/nix-rust/nix/pull/1668)) |
| 914 |
- Deprecated `InetAddr` and `SockAddr` in favor of `SockaddrIn`, `SockaddrIn6`, |
| 915 |
and `SockaddrStorage`. |
| 916 |
(#[1684](https://github.com/nix-rust/nix/pull/1684)) |
| 917 |
- Deprecated `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` in favor of their equivalents |
| 918 |
from the standard library. |
| 919 |
(#[1685](https://github.com/nix-rust/nix/pull/1685)) |
| 920 |
- `uname` now returns a `Result<UtsName>` instead of just a `UtsName` and |
| 921 |
ignoring failures from libc. And getters on the `UtsName` struct now return |
| 922 |
an `&OsStr` instead of `&str`. |
| 923 |
(#[1672](https://github.com/nix-rust/nix/pull/1672)) |
| 924 |
- Replaced `IoVec` with `IoSlice` and `IoSliceMut`, and replaced `IoVec::from_slice` with |
| 925 |
`IoSlice::new`. (#[1643](https://github.com/nix-rust/nix/pull/1643)) |
| 926 |
|
| 927 |
### Fixed |
| 928 |
|
| 929 |
- `InetAddr::from_std` now sets the `sin_len`/`sin6_len` fields on the BSDs. |
| 930 |
(#[1642](https://github.com/nix-rust/nix/pull/1642)) |
| 931 |
- Fixed a panic in `LinkAddr::addr`. That function now returns an `Option`. |
| 932 |
(#[1675](https://github.com/nix-rust/nix/pull/1675)) |
| 933 |
(#[1677](https://github.com/nix-rust/nix/pull/1677)) |
| 934 |
|
| 935 |
### Removed |
| 936 |
|
| 937 |
- Removed public access to the inner fields of `NetlinkAddr`, `AlgAddr`, |
| 938 |
`SysControlAddr`, `LinkAddr`, and `VsockAddr`. |
| 939 |
(#[1614](https://github.com/nix-rust/nix/pull/1614)) |
| 940 |
- Removed `EventFlag::EV_SYSFLAG`. |
| 941 |
(#[1635](https://github.com/nix-rust/nix/pull/1635)) |
| 942 |
|
| 943 |
## [0.23.1] - 2021-12-16 |
| 944 |
|
| 945 |
### Changed |
| 946 |
|
| 947 |
- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts |
| 948 |
#1492. From now on, the MSRV is not guaranteed to work with all versions of |
| 949 |
all dependencies, just with some version of all dependencies. |
| 950 |
(#[1607](https://github.com/nix-rust/nix/pull/1607)) |
| 951 |
|
| 952 |
### Fixed |
| 953 |
|
| 954 |
- Fixed soundness issues in `FdSet::insert`, `FdSet::remove`, and |
| 955 |
`FdSet::contains` involving file descriptors outside of the range |
| 956 |
`0..FD_SETSIZE`. |
| 957 |
(#[1575](https://github.com/nix-rust/nix/pull/1575)) |
| 958 |
|
| 959 |
## [0.23.0] - 2021-09-28 |
| 960 |
### Added |
| 961 |
|
| 962 |
- Added the `LocalPeerCred` sockopt. |
| 963 |
(#[1482](https://github.com/nix-rust/nix/pull/1482)) |
| 964 |
- Added `TimeSpec::from_duration` and `TimeSpec::from_timespec` |
| 965 |
(#[1465](https://github.com/nix-rust/nix/pull/1465)) |
| 966 |
- Added `IPV6_V6ONLY` sockopt. |
| 967 |
(#[1470](https://github.com/nix-rust/nix/pull/1470)) |
| 968 |
- Added `impl From<User> for libc::passwd` trait implementation to convert a `User` |
| 969 |
into a `libc::passwd`. Consumes the `User` struct to give ownership over |
| 970 |
the member pointers. |
| 971 |
(#[1471](https://github.com/nix-rust/nix/pull/1471)) |
| 972 |
- Added `pthread_kill`. |
| 973 |
(#[1472](https://github.com/nix-rust/nix/pull/1472)) |
| 974 |
- Added `mknodat`. |
| 975 |
(#[1473](https://github.com/nix-rust/nix/pull/1473)) |
| 976 |
- Added `setrlimit` and `getrlimit`. |
| 977 |
(#[1302](https://github.com/nix-rust/nix/pull/1302)) |
| 978 |
- Added `ptrace::interrupt` method for platforms that support `PTRACE_INTERRUPT` |
| 979 |
(#[1422](https://github.com/nix-rust/nix/pull/1422)) |
| 980 |
- Added `IP6T_SO_ORIGINAL_DST` sockopt. |
| 981 |
(#[1490](https://github.com/nix-rust/nix/pull/1490)) |
| 982 |
- Added the `PTRACE_EVENT_STOP` variant to the `sys::ptrace::Event` enum |
| 983 |
(#[1335](https://github.com/nix-rust/nix/pull/1335)) |
| 984 |
- Exposed `SockAddr::from_raw_sockaddr` |
| 985 |
(#[1447](https://github.com/nix-rust/nix/pull/1447)) |
| 986 |
- Added `TcpRepair` |
| 987 |
(#[1503](https://github.com/nix-rust/nix/pull/1503)) |
| 988 |
- Enabled `pwritev` and `preadv` for more operating systems. |
| 989 |
(#[1511](https://github.com/nix-rust/nix/pull/1511)) |
| 990 |
- Added support for `TCP_MAXSEG` TCP Maximum Segment Size socket options |
| 991 |
(#[1292](https://github.com/nix-rust/nix/pull/1292)) |
| 992 |
- Added `Ipv4RecvErr` and `Ipv6RecvErr` sockopts and associated control messages. |
| 993 |
(#[1514](https://github.com/nix-rust/nix/pull/1514)) |
| 994 |
- Added `AsRawFd` implementation on `PollFd`. |
| 995 |
(#[1516](https://github.com/nix-rust/nix/pull/1516)) |
| 996 |
- Added `Ipv4Ttl` and `Ipv6Ttl` sockopts. |
| 997 |
(#[1515](https://github.com/nix-rust/nix/pull/1515)) |
| 998 |
- Added `MAP_EXCL`, `MAP_ALIGNED_SUPER`, and `MAP_CONCEAL` mmap flags, and |
| 999 |
exposed `MAP_ANONYMOUS` for all operating systems. |
| 1000 |
(#[1522](https://github.com/nix-rust/nix/pull/1522)) |
| 1001 |
(#[1525](https://github.com/nix-rust/nix/pull/1525)) |
| 1002 |
(#[1531](https://github.com/nix-rust/nix/pull/1531)) |
| 1003 |
(#[1534](https://github.com/nix-rust/nix/pull/1534)) |
| 1004 |
- Added read/write accessors for 'events' on `PollFd`. |
| 1005 |
(#[1517](https://github.com/nix-rust/nix/pull/1517)) |
| 1006 |
|
| 1007 |
### Changed |
| 1008 |
|
| 1009 |
- `FdSet::{contains, highest, fds}` no longer require a mutable reference. |
| 1010 |
(#[1464](https://github.com/nix-rust/nix/pull/1464)) |
| 1011 |
- `User::gecos` and corresponding `libc::passwd::pw_gecos` are supported on |
| 1012 |
64-bit Android, change conditional compilation to include the field in |
| 1013 |
64-bit Android builds |
| 1014 |
(#[1471](https://github.com/nix-rust/nix/pull/1471)) |
| 1015 |
- `eventfd`s are supported on Android, change conditional compilation to |
| 1016 |
include `sys::eventfd::eventfd` and `sys::eventfd::EfdFlags`for Android |
| 1017 |
builds. |
| 1018 |
(#[1481](https://github.com/nix-rust/nix/pull/1481)) |
| 1019 |
- Most enums that come from C, for example `Errno`, are now marked as |
| 1020 |
`#[non_exhaustive]`. |
| 1021 |
(#[1474](https://github.com/nix-rust/nix/pull/1474)) |
| 1022 |
- Many more functions, mostly contructors, are now `const`. |
| 1023 |
(#[1476](https://github.com/nix-rust/nix/pull/1476)) |
| 1024 |
(#[1492](https://github.com/nix-rust/nix/pull/1492)) |
| 1025 |
- `sys::event::KEvent::filter` now returns a `Result` instead of being |
| 1026 |
infalliable. The only cases where it will now return an error are cases |
| 1027 |
where it previously would've had undefined behavior. |
| 1028 |
(#[1484](https://github.com/nix-rust/nix/pull/1484)) |
| 1029 |
- Minimum supported Rust version is now 1.46.0. |
| 1030 |
([#1492](https://github.com/nix-rust/nix/pull/1492)) |
| 1031 |
- Rework `UnixAddr` to encapsulate internals better in order to fix soundness |
| 1032 |
issues. No longer allows creating a `UnixAddr` from a raw `sockaddr_un`. |
| 1033 |
([#1496](https://github.com/nix-rust/nix/pull/1496)) |
| 1034 |
- Raised bitflags to 1.3.0 and the MSRV to 1.46.0. |
| 1035 |
([#1492](https://github.com/nix-rust/nix/pull/1492)) |
| 1036 |
|
| 1037 |
### Fixed |
| 1038 |
|
| 1039 |
- `posix_fadvise` now returns errors in the conventional way, rather than as a |
| 1040 |
non-zero value in `Ok()`. |
| 1041 |
(#[1538](https://github.com/nix-rust/nix/pull/1538)) |
| 1042 |
- Added more errno definitions for better backwards compatibility with |
| 1043 |
Nix 0.21.0. |
| 1044 |
(#[1467](https://github.com/nix-rust/nix/pull/1467)) |
| 1045 |
- Fixed potential undefined behavior in `Signal::try_from` on some platforms. |
| 1046 |
(#[1484](https://github.com/nix-rust/nix/pull/1484)) |
| 1047 |
- Fixed buffer overflow in `unistd::getgrouplist`. |
| 1048 |
(#[1545](https://github.com/nix-rust/nix/pull/1545)) |
| 1049 |
|
| 1050 |
|
| 1051 |
### Removed |
| 1052 |
|
| 1053 |
- Removed a couple of termios constants on redox that were never actually |
| 1054 |
supported. |
| 1055 |
(#[1483](https://github.com/nix-rust/nix/pull/1483)) |
| 1056 |
- Removed `nix::sys::signal::NSIG`. It was of dubious utility, and not correct |
| 1057 |
for all platforms. |
| 1058 |
(#[1484](https://github.com/nix-rust/nix/pull/1484)) |
| 1059 |
- Removed support for 32-bit Apple targets, since they've been dropped by both |
| 1060 |
Rustc and Xcode. |
| 1061 |
(#[1492](https://github.com/nix-rust/nix/pull/1492)) |
| 1062 |
- Deprecated `SockAddr/InetAddr::to_str` in favor of `ToString::to_string` |
| 1063 |
(#[1495](https://github.com/nix-rust/nix/pull/1495)) |
| 1064 |
- Removed `SigevNotify` on OpenBSD and Redox. |
| 1065 |
(#[1511](https://github.com/nix-rust/nix/pull/1511)) |
| 1066 |
|
| 1067 |
## [0.22.3] - 22 January 2022 |
| 1068 |
### Changed |
| 1069 |
- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts |
| 1070 |
#1492. From now on, the MSRV is not guaranteed to work with all versions of |
| 1071 |
all dependencies, just with some version of all dependencies. |
| 1072 |
(#[1607](https://github.com/nix-rust/nix/pull/1607)) |
| 1073 |
|
| 1074 |
## [0.22.2] - 28 September 2021 |
| 1075 |
### Fixed |
| 1076 |
- Fixed buffer overflow in `unistd::getgrouplist`. |
| 1077 |
(#[1545](https://github.com/nix-rust/nix/pull/1545)) |
| 1078 |
- Added more errno definitions for better backwards compatibility with |
| 1079 |
Nix 0.21.0. |
| 1080 |
(#[1467](https://github.com/nix-rust/nix/pull/1467)) |
| 1081 |
|
| 1082 |
## [0.22.1] - 13 August 2021 |
| 1083 |
### Fixed |
| 1084 |
- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. |
| 1085 |
|
| 1086 |
### Removed |
| 1087 |
- Removed a couple of termios constants on redox that were never actually |
| 1088 |
supported. |
| 1089 |
(#[1483](https://github.com/nix-rust/nix/pull/1483)) |
| 1090 |
|
| 1091 |
## [0.22.0] - 9 July 2021 |
| 1092 |
### Added |
| 1093 |
- Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445)) |
| 1094 |
- Added `nmount` for FreeBSD. |
| 1095 |
(#[1453](https://github.com/nix-rust/nix/pull/1453)) |
| 1096 |
- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android. |
| 1097 |
(#[1456](https://github.com/nix-rust/nix/pull/1456)) |
| 1098 |
- Added `TcpUserTimeout` socket option (sockopt) on Linux and Fuchsia. |
| 1099 |
(#[1457](https://github.com/nix-rust/nix/pull/1457)) |
| 1100 |
- Added `renameat2` for Linux |
| 1101 |
(#[1458](https://github.com/nix-rust/nix/pull/1458)) |
| 1102 |
- Added `RxqOvfl` support on Linux, Fuchsia and Android. |
| 1103 |
(#[1455](https://github.com/nix-rust/nix/pull/1455)) |
| 1104 |
|
| 1105 |
### Changed |
| 1106 |
- `ptsname_r` now returns a lossily-converted string in the event of bad UTF, |
| 1107 |
just like `ptsname`. |
| 1108 |
([#1446](https://github.com/nix-rust/nix/pull/1446)) |
| 1109 |
- Nix's error type is now a simple wrapper around the platform's Errno. This |
| 1110 |
means it is now `Into<std::io::Error>`. It's also `Clone`, `Copy`, `Eq`, and |
| 1111 |
has a small fixed size. It also requires less typing. For example, the old |
| 1112 |
enum variant `nix::Error::Sys(nix::errno::Errno::EINVAL)` is now simply |
| 1113 |
`nix::Error::EINVAL`. |
| 1114 |
([#1446](https://github.com/nix-rust/nix/pull/1446)) |
| 1115 |
|
| 1116 |
## [0.21.2] - 29 September 2021 |
| 1117 |
### Fixed |
| 1118 |
- Fixed buffer overflow in `unistd::getgrouplist`. |
| 1119 |
(#[1545](https://github.com/nix-rust/nix/pull/1545)) |
| 1120 |
|
| 1121 |
## [0.21.1] - 13 August 2021 |
| 1122 |
### Fixed |
| 1123 |
- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. |
| 1124 |
|
| 1125 |
### Removed |
| 1126 |
- Removed a couple of termios constants on redox that were never actually |
| 1127 |
supported. |
| 1128 |
(#[1483](https://github.com/nix-rust/nix/pull/1483)) |
| 1129 |
|
| 1130 |
## [0.21.0] - 31 May 2021 |
| 1131 |
### Added |
| 1132 |
- Added `getresuid` and `getresgid` |
| 1133 |
(#[1430](https://github.com/nix-rust/nix/pull/1430)) |
| 1134 |
- Added TIMESTAMPNS support for linux |
| 1135 |
(#[1402](https://github.com/nix-rust/nix/pull/1402)) |
| 1136 |
- Added `sendfile64` (#[1439](https://github.com/nix-rust/nix/pull/1439)) |
| 1137 |
- Added `MS_LAZYTIME` to `MsFlags` |
| 1138 |
(#[1437](https://github.com/nix-rust/nix/pull/1437)) |
| 1139 |
|
| 1140 |
### Changed |
| 1141 |
- Made `forkpty` unsafe, like `fork` |
| 1142 |
(#[1390](https://github.com/nix-rust/nix/pull/1390)) |
| 1143 |
- Made `Uid`, `Gid` and `Pid` methods `from_raw` and `as_raw` a `const fn` |
| 1144 |
(#[1429](https://github.com/nix-rust/nix/pull/1429)) |
| 1145 |
- Made `Uid::is_root` a `const fn` |
| 1146 |
(#[1429](https://github.com/nix-rust/nix/pull/1429)) |
| 1147 |
- `AioCb` is now always pinned. Once a `libc::aiocb` gets sent to the kernel, |
| 1148 |
its address in memory must not change. Nix now enforces that by using |
| 1149 |
`std::pin`. Most users won't need to change anything, except when using |
| 1150 |
`aio_suspend`. See that method's documentation for the new usage. |
| 1151 |
(#[1440](https://github.com/nix-rust/nix/pull/1440)) |
| 1152 |
- `LioCb` is now constructed using a distinct `LioCbBuilder` struct. This |
| 1153 |
avoids a soundness issue with the old `LioCb`. Usage is similar but |
| 1154 |
construction now uses the builder pattern. See the documentation for |
| 1155 |
details. |
| 1156 |
(#[1440](https://github.com/nix-rust/nix/pull/1440)) |
| 1157 |
- Minimum supported Rust version is now 1.41.0. |
| 1158 |
([#1440](https://github.com/nix-rust/nix/pull/1440)) |
| 1159 |
- Errno aliases are now associated consts on `Errno`, instead of consts in the |
| 1160 |
`errno` module. |
| 1161 |
(#[1452](https://github.com/nix-rust/nix/pull/1452)) |
| 1162 |
|
| 1163 |
### Fixed |
| 1164 |
- Allow `sockaddr_ll` size, as reported by the Linux kernel, to be smaller then it's definition |
| 1165 |
(#[1395](https://github.com/nix-rust/nix/pull/1395)) |
| 1166 |
- Fix spurious errors using `sendmmsg` with multiple cmsgs |
| 1167 |
(#[1414](https://github.com/nix-rust/nix/pull/1414)) |
| 1168 |
- Added `Errno::EOPNOTSUPP` to FreeBSD, where it was missing. |
| 1169 |
(#[1452](https://github.com/nix-rust/nix/pull/1452)) |
| 1170 |
|
| 1171 |
### Removed |
| 1172 |
|
| 1173 |
- Removed `sys::socket::accept4` from Android arm because libc removed it in |
| 1174 |
version 0.2.87. |
| 1175 |
([#1399](https://github.com/nix-rust/nix/pull/1399)) |
| 1176 |
- `AioCb::from_boxed_slice` and `AioCb::from_boxed_mut_slice` have been |
| 1177 |
removed. They were useful with earlier versions of Rust, but should no |
| 1178 |
longer be needed now that async/await are available. `AioCb`s now work |
| 1179 |
exclusively with borrowed buffers, not owned ones. |
| 1180 |
(#[1440](https://github.com/nix-rust/nix/pull/1440)) |
| 1181 |
- Removed some Errno values from platforms where they aren't actually defined. |
| 1182 |
(#[1452](https://github.com/nix-rust/nix/pull/1452)) |
| 1183 |
|
| 1184 |
## [0.20.2] - 28 September 2021 |
| 1185 |
### Fixed |
| 1186 |
- Fixed buffer overflow in `unistd::getgrouplist`. |
| 1187 |
(#[1545](https://github.com/nix-rust/nix/pull/1545)) |
| 1188 |
|
| 1189 |
## [0.20.1] - 13 August 2021 |
| 1190 |
### Fixed |
| 1191 |
- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. |
| 1192 |
|
| 1193 |
### Removed |
| 1194 |
- Removed a couple of termios constants on redox that were never actually |
| 1195 |
supported. |
| 1196 |
(#[1483](https://github.com/nix-rust/nix/pull/1483)) |
| 1197 |
|
| 1198 |
## [0.20.0] - 20 February 2021 |
| 1199 |
### Added |
| 1200 |
|
| 1201 |
- Added a `passwd` field to `Group` (#[1338](https://github.com/nix-rust/nix/pull/1338)) |
| 1202 |
- Added `mremap` (#[1306](https://github.com/nix-rust/nix/pull/1306)) |
| 1203 |
- Added `personality` (#[1331](https://github.com/nix-rust/nix/pull/1331)) |
| 1204 |
- Added limited Fuchsia support (#[1285](https://github.com/nix-rust/nix/pull/1285)) |
| 1205 |
- Added `getpeereid` (#[1342](https://github.com/nix-rust/nix/pull/1342)) |
| 1206 |
- Implemented `IntoIterator` for `Dir` |
| 1207 |
(#[1333](https://github.com/nix-rust/nix/pull/1333)). |
| 1208 |
|
| 1209 |
### Changed |
| 1210 |
|
| 1211 |
- Minimum supported Rust version is now 1.40.0. |
| 1212 |
([#1356](https://github.com/nix-rust/nix/pull/1356)) |
| 1213 |
- i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated |
| 1214 |
by Xcode. |
| 1215 |
(#[1350](https://github.com/nix-rust/nix/pull/1350)) |
| 1216 |
- Fixed calling `recvfrom` on an `AddrFamily::Packet` socket |
| 1217 |
(#[1344](https://github.com/nix-rust/nix/pull/1344)) |
| 1218 |
|
| 1219 |
### Fixed |
| 1220 |
- `TimerFd` now closes the underlying fd on drop. |
| 1221 |
([#1381](https://github.com/nix-rust/nix/pull/1381)) |
| 1222 |
- Define `*_MAGIC` filesystem constants on Linux s390x |
| 1223 |
(#[1372](https://github.com/nix-rust/nix/pull/1372)) |
| 1224 |
- mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 |
| 1225 |
(#[1366](https://github.com/nix-rust/nix/pull/1366)) |
| 1226 |
|
| 1227 |
### Removed |
| 1228 |
|
| 1229 |
- `Dir`, `SignalFd`, and `PtyMaster` are no longer `Clone`. |
| 1230 |
(#[1382](https://github.com/nix-rust/nix/pull/1382)) |
| 1231 |
- Removed `SockLevel`, which hasn't been used for a few years |
| 1232 |
(#[1362](https://github.com/nix-rust/nix/pull/1362)) |
| 1233 |
- Removed both `Copy` and `Clone` from `TimerFd`. |
| 1234 |
([#1381](https://github.com/nix-rust/nix/pull/1381)) |
| 1235 |
|
| 1236 |
## [0.19.1] - 28 November 2020 |
| 1237 |
### Fixed |
| 1238 |
- Fixed bugs in `recvmmsg`. |
| 1239 |
(#[1341](https://github.com/nix-rust/nix/pull/1341)) |
| 1240 |
|
| 1241 |
## [0.19.0] - 6 October 2020 |
| 1242 |
### Added |
| 1243 |
- Added Netlink protocol families to the `SockProtocol` enum |
| 1244 |
(#[1289](https://github.com/nix-rust/nix/pull/1289)) |
| 1245 |
- Added `clock_gettime`, `clock_settime`, `clock_getres`, |
| 1246 |
`clock_getcpuclockid` functions and `ClockId` struct. |
| 1247 |
(#[1281](https://github.com/nix-rust/nix/pull/1281)) |
| 1248 |
- Added wrapper functions for `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP`. |
| 1249 |
(#[1300](https://github.com/nix-rust/nix/pull/1300)) |
| 1250 |
- Add support for Vsock on Android rather than just Linux. |
| 1251 |
(#[1301](https://github.com/nix-rust/nix/pull/1301)) |
| 1252 |
- Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options. |
| 1253 |
(#[1283](https://github.com/nix-rust/nix/pull/1283)) |
| 1254 |
### Changed |
| 1255 |
- Expose `SeekData` and `SeekHole` on all Linux targets |
| 1256 |
(#[1284](https://github.com/nix-rust/nix/pull/1284)) |
| 1257 |
- Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s). |
| 1258 |
(#[1278](https://github.com/nix-rust/nix/pull/1278)) |
| 1259 |
- Made `unistd::fork` an unsafe funtion, bringing it in line with [libstd's decision](https://github.com/rust-lang/rust/pull/58059). |
| 1260 |
(#[1293](https://github.com/nix-rust/nix/pull/1293)) |
| 1261 |
|
| 1262 |
## [0.18.0] - 26 July 2020 |
| 1263 |
### Added |
| 1264 |
- Added `fchown(2)` wrapper. |
| 1265 |
(#[1257](https://github.com/nix-rust/nix/pull/1257)) |
| 1266 |
- Added support on linux systems for `MAP_HUGE_`_`SIZE`_ family of flags. |
| 1267 |
(#[1211](https://github.com/nix-rust/nix/pull/1211)) |
| 1268 |
- Added support for `F_OFD_*` `fcntl` commands on Linux and Android. |
| 1269 |
(#[1195](https://github.com/nix-rust/nix/pull/1195)) |
| 1270 |
- Added `env::clearenv()`: calls `libc::clearenv` on platforms |
| 1271 |
where it's available, and clears the environment of all variables |
| 1272 |
via `std::env::vars` and `std::env::remove_var` on others. |
| 1273 |
(#[1185](https://github.com/nix-rust/nix/pull/1185)) |
| 1274 |
- `FsType` inner value made public. |
| 1275 |
(#[1187](https://github.com/nix-rust/nix/pull/1187)) |
| 1276 |
- Added `unistd::setfsuid` and `unistd::setfsgid` to set the user or group |
| 1277 |
identity for filesystem checks per-thread. |
| 1278 |
(#[1163](https://github.com/nix-rust/nix/pull/1163)) |
| 1279 |
- Derived `Ord`, `PartialOrd` for `unistd::Pid` (#[1189](https://github.com/nix-rust/nix/pull/1189)) |
| 1280 |
- Added `select::FdSet::fds` method to iterate over file descriptors in a set. |
| 1281 |
([#1207](https://github.com/nix-rust/nix/pull/1207)) |
| 1282 |
- Added support for UDP generic segmentation offload (GSO) and generic |
| 1283 |
receive offload (GRO) ([#1209](https://github.com/nix-rust/nix/pull/1209)) |
| 1284 |
- Added support for `sendmmsg` and `recvmmsg` calls |
| 1285 |
(#[1208](https://github.com/nix-rust/nix/pull/1208)) |
| 1286 |
- Added support for `SCM_CREDS` messages (`UnixCredentials`) on FreeBSD/DragonFly |
| 1287 |
(#[1216](https://github.com/nix-rust/nix/pull/1216)) |
| 1288 |
- Added `BindToDevice` socket option (sockopt) on Linux |
| 1289 |
(#[1233](https://github.com/nix-rust/nix/pull/1233)) |
| 1290 |
- Added `EventFilter` bitflags for `EV_DISPATCH` and `EV_RECEIPT` on OpenBSD. |
| 1291 |
(#[1252](https://github.com/nix-rust/nix/pull/1252)) |
| 1292 |
- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage`. |
| 1293 |
(#[1222](https://github.com/nix-rust/nix/pull/1222)) |
| 1294 |
- `CpuSet` and `UnixCredentials` now implement `Default`. |
| 1295 |
(#[1244](https://github.com/nix-rust/nix/pull/1244)) |
| 1296 |
- Added `unistd::ttyname` |
| 1297 |
(#[1259](https://github.com/nix-rust/nix/pull/1259)) |
| 1298 |
- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage` for iOS and Android. |
| 1299 |
(#[1265](https://github.com/nix-rust/nix/pull/1265)) |
| 1300 |
- Added support for `TimerFd`. |
| 1301 |
(#[1261](https://github.com/nix-rust/nix/pull/1261)) |
| 1302 |
|
| 1303 |
### Changed |
| 1304 |
- Changed `fallocate` return type from `c_int` to `()` (#[1201](https://github.com/nix-rust/nix/pull/1201)) |
| 1305 |
- Enabled `sys::ptrace::setregs` and `sys::ptrace::getregs` on x86_64-unknown-linux-musl target |
| 1306 |
(#[1198](https://github.com/nix-rust/nix/pull/1198)) |
| 1307 |
- On Linux, `ptrace::write` is now an `unsafe` function. Caveat programmer. |
| 1308 |
(#[1245](https://github.com/nix-rust/nix/pull/1245)) |
| 1309 |
- `execv`, `execve`, `execvp` and `execveat` in `::nix::unistd` and `reboot` in |
| 1310 |
`::nix::sys::reboot` now return `Result<Infallible>` instead of `Result<Void>` (#[1239](https://github.com/nix-rust/nix/pull/1239)) |
| 1311 |
- `sys::socket::sockaddr_storage_to_addr` is no longer `unsafe`. So is |
| 1312 |
`offset_of!`. |
| 1313 |
- `sys::socket::sockaddr_storage_to_addr`, `offset_of!`, and `Errno::clear` are |
| 1314 |
no longer `unsafe`. |
| 1315 |
- `SockAddr::as_ffi_pair`,`sys::socket::sockaddr_storage_to_addr`, `offset_of!`, |
| 1316 |
and `Errno::clear` are no longer `unsafe`. |
| 1317 |
(#[1244](https://github.com/nix-rust/nix/pull/1244)) |
| 1318 |
- Several `Inotify` methods now take `self` by value instead of by reference |
| 1319 |
(#[1244](https://github.com/nix-rust/nix/pull/1244)) |
| 1320 |
- `nix::poll::ppoll`: `timeout` parameter is now optional, None is equivalent for infinite timeout. |
| 1321 |
|
| 1322 |
### Fixed |
| 1323 |
|
| 1324 |
- Fixed `getsockopt`. The old code produced UB which triggers a panic with |
| 1325 |
Rust 1.44.0. |
| 1326 |
(#[1214](https://github.com/nix-rust/nix/pull/1214)) |
| 1327 |
|
| 1328 |
- Fixed a bug in nix::unistd that would result in an infinite loop |
| 1329 |
when a group or user lookup required a buffer larger than |
| 1330 |
16KB. (#[1198](https://github.com/nix-rust/nix/pull/1198)) |
| 1331 |
- Fixed unaligned casting of `cmsg_data` to `af_alg_iv` (#[1206](https://github.com/nix-rust/nix/pull/1206)) |
| 1332 |
- Fixed `readlink`/`readlinkat` when reading symlinks longer than `PATH_MAX` (#[1231](https://github.com/nix-rust/nix/pull/1231)) |
| 1333 |
- `PollFd`, `EpollEvent`, `IpMembershipRequest`, `Ipv6MembershipRequest`, |
| 1334 |
`TimeVal`, and `IoVec` are now `repr(transparent)`. This is required for |
| 1335 |
correctness's sake across all architectures and compilers, though now bugs |
| 1336 |
have been reported so far. |
| 1337 |
(#[1243](https://github.com/nix-rust/nix/pull/1243)) |
| 1338 |
- Fixed unaligned pointer read in `Inotify::read_events`. |
| 1339 |
(#[1244](https://github.com/nix-rust/nix/pull/1244)) |
| 1340 |
|
| 1341 |
### Removed |
| 1342 |
|
| 1343 |
- Removed `sys::socket::addr::from_libc_sockaddr` from the public API. |
| 1344 |
(#[1215](https://github.com/nix-rust/nix/pull/1215)) |
| 1345 |
- Removed `sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper` |
| 1346 |
from the public API. These were previously hidden in the docs but still usable |
| 1347 |
by downstream. |
| 1348 |
(#[1235](https://github.com/nix-rust/nix/pull/1235)) |
| 1349 |
|
| 1350 |
- Nix no longer implements `NixPath` for `Option<P> where P: NixPath`. Most |
| 1351 |
Nix functions that accept `NixPath` arguments can't do anything useful with |
| 1352 |
`None`. The exceptions (`mount` and `quotactl_sync`) already take explicitly |
| 1353 |
optional arguments. |
| 1354 |
(#[1242](https://github.com/nix-rust/nix/pull/1242)) |
| 1355 |
|
| 1356 |
- Removed `unistd::daemon` and `unistd::pipe2` on OSX and ios |
| 1357 |
(#[1255](https://github.com/nix-rust/nix/pull/1255)) |
| 1358 |
|
| 1359 |
- Removed `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` and |
| 1360 |
`sys::event::FilterFlag::NOTE_REAP` on OSX and ios. |
| 1361 |
(#[1255](https://github.com/nix-rust/nix/pull/1255)) |
| 1362 |
|
| 1363 |
- Removed `sys::ptrace::ptrace` on Android and Linux. |
| 1364 |
(#[1255](https://github.com/nix-rust/nix/pull/1255)) |
| 1365 |
|
| 1366 |
- Dropped support for powerpc64-unknown-linux-gnu |
| 1367 |
(#[1266](https://github.com/nix-rust/nix/pull/1268)) |
| 1368 |
|
| 1369 |
## [0.17.0] - 3 February 2020 |
| 1370 |
### Added |
| 1371 |
- Add `CLK_TCK` to `SysconfVar` |
| 1372 |
(#[1177](https://github.com/nix-rust/nix/pull/1177)) |
| 1373 |
### Removed |
| 1374 |
- Removed deprecated Error::description from error types |
| 1375 |
(#[1175](https://github.com/nix-rust/nix/pull/1175)) |
| 1376 |
|
| 1377 |
## [0.16.1] - 23 December 2019 |
| 1378 |
### Fixed |
| 1379 |
|
| 1380 |
- Fixed the build for OpenBSD |
| 1381 |
(#[1168](https://github.com/nix-rust/nix/pull/1168)) |
| 1382 |
|
| 1383 |
## [0.16.0] - 1 December 2019 |
| 1384 |
### Added |
| 1385 |
- Added `ptrace::seize()`: similar to `attach()` on Linux |
| 1386 |
but with better-defined semantics. |
| 1387 |
(#[1154](https://github.com/nix-rust/nix/pull/1154)) |
| 1388 |
|
| 1389 |
- Added `Signal::as_str()`: returns signal name as `&'static str` |
| 1390 |
(#[1138](https://github.com/nix-rust/nix/pull/1138)) |
| 1391 |
|
| 1392 |
- Added `posix_fallocate`. |
| 1393 |
([#1105](https://github.com/nix-rust/nix/pull/1105)) |
| 1394 |
|
| 1395 |
- Implemented `Default` for `FdSet` |
| 1396 |
([#1107](https://github.com/nix-rust/nix/pull/1107)) |
| 1397 |
|
| 1398 |
- Added `NixPath::is_empty`. |
| 1399 |
([#1107](https://github.com/nix-rust/nix/pull/1107)) |
| 1400 |
|
| 1401 |
- Added `mkfifoat` |
| 1402 |
([#1133](https://github.com/nix-rust/nix/pull/1133)) |
| 1403 |
|
| 1404 |
- Added `User::from_uid`, `User::from_name`, `User::from_gid` and |
| 1405 |
`Group::from_name`, |
| 1406 |
([#1139](https://github.com/nix-rust/nix/pull/1139)) |
| 1407 |
|
| 1408 |
- Added `linkat` |
| 1409 |
([#1101](https://github.com/nix-rust/nix/pull/1101)) |
| 1410 |
|
| 1411 |
- Added `sched_getaffinity`. |
| 1412 |
([#1148](https://github.com/nix-rust/nix/pull/1148)) |
| 1413 |
|
| 1414 |
- Added optional `Signal` argument to `ptrace::{detach, syscall}` for signal |
| 1415 |
injection. ([#1083](https://github.com/nix-rust/nix/pull/1083)) |
| 1416 |
|
| 1417 |
### Changed |
| 1418 |
- `sys::termios::BaudRate` now implements `TryFrom<speed_t>` instead of |
| 1419 |
`From<speed_t>`. The old `From` implementation would panic on failure. |
| 1420 |
([#1159](https://github.com/nix-rust/nix/pull/1159)) |
| 1421 |
|
| 1422 |
- `sys::socket::ControlMessage::ScmCredentials` and |
| 1423 |
`sys::socket::ControlMessageOwned::ScmCredentials` now wrap `UnixCredentials` |
| 1424 |
rather than `libc::ucred`. |
| 1425 |
([#1160](https://github.com/nix-rust/nix/pull/1160)) |
| 1426 |
|
| 1427 |
- `sys::socket::recvmsg` now takes a plain `Vec` instead of a `CmsgBuffer` |
| 1428 |
implementor. If you were already using `cmsg_space!`, then you needn't worry. |
| 1429 |
([#1156](https://github.com/nix-rust/nix/pull/1156)) |
| 1430 |
|
| 1431 |
- `sys::socket::recvfrom` now returns |
| 1432 |
`Result<(usize, Option<SockAddr>)>` instead of `Result<(usize, SockAddr)>`. |
| 1433 |
([#1145](https://github.com/nix-rust/nix/pull/1145)) |
| 1434 |
|
| 1435 |
- `Signal::from_c_int` has been replaced by `Signal::try_from` |
| 1436 |
([#1113](https://github.com/nix-rust/nix/pull/1113)) |
| 1437 |
|
| 1438 |
- Changed `readlink` and `readlinkat` to return `OsString` |
| 1439 |
([#1109](https://github.com/nix-rust/nix/pull/1109)) |
| 1440 |
|
| 1441 |
```rust |
| 1442 |
# use nix::fcntl::{readlink, readlinkat}; |
| 1443 |
// the buffer argument of `readlink` and `readlinkat` has been removed, |
| 1444 |
// and the return value is now an owned type (`OsString`). |
| 1445 |
// Existing code can be updated by removing the buffer argument |
| 1446 |
// and removing any clone or similar operation on the output |
| 1447 |
|
| 1448 |
// old code `readlink(&path, &mut buf)` can be replaced with the following |
| 1449 |
let _: OsString = readlink(&path); |
| 1450 |
|
| 1451 |
// old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following |
| 1452 |
let _: OsString = readlinkat(dirfd, &path); |
| 1453 |
``` |
| 1454 |
|
| 1455 |
- Minimum supported Rust version is now 1.36.0. |
| 1456 |
([#1108](https://github.com/nix-rust/nix/pull/1108)) |
| 1457 |
|
| 1458 |
- `Ipv4Addr::octets`, `Ipv4Addr::to_std`, `Error::as_errno`, |
| 1459 |
`ForkResult::is_child`, `ForkResult::is_parent`, `Gid::as_raw`, |
| 1460 |
`Uid::is_root`, `Uid::as_raw`, `Pid::as_raw`, and `PollFd::revents` now take |
| 1461 |
`self` by value. |
| 1462 |
([#1107](https://github.com/nix-rust/nix/pull/1107)) |
| 1463 |
|
| 1464 |
- Type `&CString` for parameters of `exec(v|ve|vp|vpe|veat)` are changed to `&CStr`. |
| 1465 |
([#1121](https://github.com/nix-rust/nix/pull/1121)) |
| 1466 |
|
| 1467 |
### Fixed |
| 1468 |
- Fix length of abstract socket addresses |
| 1469 |
([#1120](https://github.com/nix-rust/nix/pull/1120)) |
| 1470 |
|
| 1471 |
- Fix initialization of msghdr in recvmsg/sendmsg when built with musl |
| 1472 |
([#1136](https://github.com/nix-rust/nix/pull/1136)) |
| 1473 |
|
| 1474 |
### Removed |
| 1475 |
- Remove the deprecated `CmsgSpace`. |
| 1476 |
([#1156](https://github.com/nix-rust/nix/pull/1156)) |
| 1477 |
|
| 1478 |
## [0.15.0] - 10 August 2019 |
| 1479 |
### Added |
| 1480 |
- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`. |
| 1481 |
([#1079](https://github.com/nix-rust/nix/pull/1079)) |
| 1482 |
- Implemented `Clone`, `Copy`, `Debug`, `Eq`, `Hash`, and `PartialEq` for most |
| 1483 |
types that support them. ([#1035](https://github.com/nix-rust/nix/pull/1035)) |
| 1484 |
- Added `copy_file_range` wrapper |
| 1485 |
([#1069](https://github.com/nix-rust/nix/pull/1069)) |
| 1486 |
- Add `mkdirat`. |
| 1487 |
([#1084](https://github.com/nix-rust/nix/pull/1084)) |
| 1488 |
- Add `posix_fadvise`. |
| 1489 |
([#1089](https://github.com/nix-rust/nix/pull/1089)) |
| 1490 |
- Added `AF_VSOCK` to `AddressFamily`. |
| 1491 |
([#1091](https://github.com/nix-rust/nix/pull/1091)) |
| 1492 |
- Add `unlinkat` |
| 1493 |
([#1058](https://github.com/nix-rust/nix/pull/1058)) |
| 1494 |
- Add `renameat`. |
| 1495 |
([#1097](https://github.com/nix-rust/nix/pull/1097)) |
| 1496 |
|
| 1497 |
### Changed |
| 1498 |
- Support for `ifaddrs` now present when building for Android. |
| 1499 |
([#1077](https://github.com/nix-rust/nix/pull/1077)) |
| 1500 |
- Minimum supported Rust version is now 1.31.0 |
| 1501 |
([#1035](https://github.com/nix-rust/nix/pull/1035)) |
| 1502 |
([#1095](https://github.com/nix-rust/nix/pull/1095)) |
| 1503 |
- Now functions `statfs()` and `fstatfs()` return result with `Statfs` wrapper |
| 1504 |
([#928](https://github.com/nix-rust/nix/pull/928)) |
| 1505 |
|
| 1506 |
### Fixed |
| 1507 |
- Enabled `sched_yield` for all nix hosts. |
| 1508 |
([#1090](https://github.com/nix-rust/nix/pull/1090)) |
| 1509 |
|
| 1510 |
## [0.14.1] - 2019-06-06 |
| 1511 |
### Added |
| 1512 |
- Macros exported by `nix` may now be imported via `use` on the Rust 2018 |
| 1513 |
edition without importing helper macros on Linux targets. |
| 1514 |
([#1066](https://github.com/nix-rust/nix/pull/1066)) |
| 1515 |
|
| 1516 |
For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported |
| 1517 |
without importing the `convert_ioctl_res!` macro. |
| 1518 |
|
| 1519 |
```rust |
| 1520 |
use nix::ioctl_read_bad; |
| 1521 |
|
| 1522 |
ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); |
| 1523 |
``` |
| 1524 |
|
| 1525 |
### Changed |
| 1526 |
- Changed some public types from reexports of libc types like `uint32_t` to the |
| 1527 |
native equivalents like `u32.` |
| 1528 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1529 |
|
| 1530 |
### Fixed |
| 1531 |
- Fix the build on Android and Linux/mips with recent versions of libc. |
| 1532 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1533 |
|
| 1534 |
## [0.14.0] - 2019-05-21 |
| 1535 |
### Added |
| 1536 |
- Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. |
| 1537 |
([#1002](https://github.com/nix-rust/nix/pull/1002)) |
| 1538 |
- Added `inotify_init1`, `inotify_add_watch` and `inotify_rm_watch` wrappers for |
| 1539 |
Android and Linux. ([#1016](https://github.com/nix-rust/nix/pull/1016)) |
| 1540 |
- Add `ALG_SET_IV`, `ALG_SET_OP` and `ALG_SET_AEAD_ASSOCLEN` control messages and `AF_ALG` |
| 1541 |
socket types on Linux and Android ([#1031](https://github.com/nix-rust/nix/pull/1031)) |
| 1542 |
- Add killpg |
| 1543 |
([#1034](https://github.com/nix-rust/nix/pull/1034)) |
| 1544 |
- Added ENOTSUP errno support for Linux and Android. |
| 1545 |
([#969](https://github.com/nix-rust/nix/pull/969)) |
| 1546 |
- Add several errno constants from OpenBSD 6.2 |
| 1547 |
([#1036](https://github.com/nix-rust/nix/pull/1036)) |
| 1548 |
- Added `from_std` and `to_std` methods for `sys::socket::IpAddr` |
| 1549 |
([#1043](https://github.com/nix-rust/nix/pull/1043)) |
| 1550 |
- Added `nix::unistd:seteuid` and `nix::unistd::setegid` for those platforms that do |
| 1551 |
not support `setresuid` nor `setresgid` respectively. |
| 1552 |
([#1044](https://github.com/nix-rust/nix/pull/1044)) |
| 1553 |
- Added a `access` wrapper |
| 1554 |
([#1045](https://github.com/nix-rust/nix/pull/1045)) |
| 1555 |
- Add `forkpty` |
| 1556 |
([#1042](https://github.com/nix-rust/nix/pull/1042)) |
| 1557 |
- Add `sched_yield` |
| 1558 |
([#1050](https://github.com/nix-rust/nix/pull/1050)) |
| 1559 |
|
| 1560 |
### Changed |
| 1561 |
- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) |
| 1562 |
- `recvmsg` now returns an Iterator over `ControlMessageOwned` objects rather |
| 1563 |
than `ControlMessage` objects. This is sadly not backwards-compatible. Fix |
| 1564 |
code like this: |
| 1565 |
```rust |
| 1566 |
if let ControlMessage::ScmRights(&fds) = cmsg { |
| 1567 |
``` |
| 1568 |
|
| 1569 |
By replacing it with code like this: |
| 1570 |
```rust |
| 1571 |
if let ControlMessageOwned::ScmRights(fds) = cmsg { |
| 1572 |
``` |
| 1573 |
([#1020](https://github.com/nix-rust/nix/pull/1020)) |
| 1574 |
- Replaced `CmsgSpace` with the `cmsg_space` macro. |
| 1575 |
([#1020](https://github.com/nix-rust/nix/pull/1020)) |
| 1576 |
|
| 1577 |
### Fixed |
| 1578 |
- Fixed multiple bugs when using `sendmsg` and `recvmsg` with ancillary control messages |
| 1579 |
([#1020](https://github.com/nix-rust/nix/pull/1020)) |
| 1580 |
- Macros exported by `nix` may now be imported via `use` on the Rust 2018 |
| 1581 |
edition without importing helper macros for BSD targets. |
| 1582 |
([#1041](https://github.com/nix-rust/nix/pull/1041)) |
| 1583 |
|
| 1584 |
For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported |
| 1585 |
without importing the `convert_ioctl_res!` macro. |
| 1586 |
|
| 1587 |
```rust |
| 1588 |
use nix::ioctl_read_bad; |
| 1589 |
|
| 1590 |
ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); |
| 1591 |
``` |
| 1592 |
|
| 1593 |
### Removed |
| 1594 |
- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX |
| 1595 |
and iOS. |
| 1596 |
([#1033](https://github.com/nix-rust/nix/pull/1033)) |
| 1597 |
- `PTRACE_GETREGS`, `PTRACE_SETREGS`, `PTRACE_GETFPREGS`, and |
| 1598 |
`PTRACE_SETFPREGS` have been removed from some platforms where they never |
| 1599 |
should've been defined in the first place. |
| 1600 |
([#1055](https://github.com/nix-rust/nix/pull/1055)) |
| 1601 |
|
| 1602 |
## [0.13.1] - 2019-06-10 |
| 1603 |
### Changed |
| 1604 |
- Changed some public types from reexports of libc types like `uint32_t` to the |
| 1605 |
native equivalents like `u32.` |
| 1606 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1607 |
|
| 1608 |
### Fixed |
| 1609 |
- Fix the build on Android and Linux/mips with recent versions of libc. |
| 1610 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1611 |
- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc |
| 1612 |
([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) |
| 1613 |
|
| 1614 |
### Removed |
| 1615 |
- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX |
| 1616 |
and iOS. |
| 1617 |
([#1033](https://github.com/nix-rust/nix/pull/1033)) |
| 1618 |
|
| 1619 |
## [0.13.0] - 2019-01-15 |
| 1620 |
### Added |
| 1621 |
- Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. |
| 1622 |
([#990](https://github.com/nix-rust/nix/pull/990)) |
| 1623 |
- Added support of CString type in `setsockopt`. |
| 1624 |
([#972](https://github.com/nix-rust/nix/pull/972)) |
| 1625 |
- Added option `TCP_CONGESTION` in `setsockopt`. |
| 1626 |
([#972](https://github.com/nix-rust/nix/pull/972)) |
| 1627 |
- Added `symlinkat` wrapper. |
| 1628 |
([#997](https://github.com/nix-rust/nix/pull/997)) |
| 1629 |
- Added `ptrace::{getregs, setregs}`. |
| 1630 |
([#1010](https://github.com/nix-rust/nix/pull/1010)) |
| 1631 |
- Added `nix::sys::signal::signal`. |
| 1632 |
([#817](https://github.com/nix-rust/nix/pull/817)) |
| 1633 |
- Added an `mprotect` wrapper. |
| 1634 |
([#991](https://github.com/nix-rust/nix/pull/991)) |
| 1635 |
|
| 1636 |
### Fixed |
| 1637 |
- `lutimes` never worked on OpenBSD as it is not implemented on OpenBSD. It has |
| 1638 |
been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) |
| 1639 |
- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on |
| 1640 |
either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) |
| 1641 |
|
| 1642 |
## [0.12.1] 2019-06-08 |
| 1643 |
### Changed |
| 1644 |
- Changed some public types from reexports of libc types like `uint32_t` to the |
| 1645 |
native equivalents like `u32.` |
| 1646 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1647 |
|
| 1648 |
### Fixed |
| 1649 |
- Fix the build on Android and Linux/mips with recent versions of libc. |
| 1650 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1651 |
- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc |
| 1652 |
([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) |
| 1653 |
|
| 1654 |
### Removed |
| 1655 |
- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on |
| 1656 |
either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) |
| 1657 |
- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX |
| 1658 |
and iOS. |
| 1659 |
([#1033](https://github.com/nix-rust/nix/pull/1033)) |
| 1660 |
|
| 1661 |
## [0.12.0] 2018-11-28 |
| 1662 |
|
| 1663 |
### Added |
| 1664 |
- Added `FromStr` and `Display` impls for `nix::sys::Signal` |
| 1665 |
([#884](https://github.com/nix-rust/nix/pull/884)) |
| 1666 |
- Added a `sync` wrapper. |
| 1667 |
([#961](https://github.com/nix-rust/nix/pull/961)) |
| 1668 |
- Added a `sysinfo` wrapper. |
| 1669 |
([#922](https://github.com/nix-rust/nix/pull/922)) |
| 1670 |
- Support the `SO_PEERCRED` socket option and the `UnixCredentials` type on all Linux and Android targets. |
| 1671 |
([#921](https://github.com/nix-rust/nix/pull/921)) |
| 1672 |
- Added support for `SCM_CREDENTIALS`, allowing to send process credentials over Unix sockets. |
| 1673 |
([#923](https://github.com/nix-rust/nix/pull/923)) |
| 1674 |
- Added a `dir` module for reading directories (wraps `fdopendir`, `readdir`, and `rewinddir`). |
| 1675 |
([#916](https://github.com/nix-rust/nix/pull/916)) |
| 1676 |
- Added `kmod` module that allows loading and unloading kernel modules on Linux. |
| 1677 |
([#930](https://github.com/nix-rust/nix/pull/930)) |
| 1678 |
- Added `futimens` and `utimesat` wrappers ([#944](https://github.com/nix-rust/nix/pull/944)), |
| 1679 |
an `lutimes` wrapper ([#967](https://github.com/nix-rust/nix/pull/967)), |
| 1680 |
and a `utimes` wrapper ([#946](https://github.com/nix-rust/nix/pull/946)). |
| 1681 |
- Added `AF_UNSPEC` wrapper to `AddressFamily` ([#948](https://github.com/nix-rust/nix/pull/948)) |
| 1682 |
- Added the `mode_t` public alias within `sys::stat`. |
| 1683 |
([#954](https://github.com/nix-rust/nix/pull/954)) |
| 1684 |
- Added a `truncate` wrapper. |
| 1685 |
([#956](https://github.com/nix-rust/nix/pull/956)) |
| 1686 |
- Added a `fchownat` wrapper. |
| 1687 |
([#955](https://github.com/nix-rust/nix/pull/955)) |
| 1688 |
- Added support for `ptrace` on BSD operating systems ([#949](https://github.com/nix-rust/nix/pull/949)) |
| 1689 |
- Added `ptrace` functions for reads and writes to tracee memory and ptrace kill |
| 1690 |
([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958)) |
| 1691 |
- Added a `acct` wrapper module for enabling and disabling process accounting |
| 1692 |
([#952](https://github.com/nix-rust/nix/pull/952)) |
| 1693 |
- Added the `time_t` and `suseconds_t` public aliases within `sys::time`. |
| 1694 |
([#968](https://github.com/nix-rust/nix/pull/968)) |
| 1695 |
- Added `unistd::execvpe` for Haiku, Linux and OpenBSD |
| 1696 |
([#975](https://github.com/nix-rust/nix/pull/975)) |
| 1697 |
- Added `Error::as_errno`. |
| 1698 |
([#977](https://github.com/nix-rust/nix/pull/977)) |
| 1699 |
|
| 1700 |
### Changed |
| 1701 |
- Increased required Rust version to 1.24.1 |
| 1702 |
([#900](https://github.com/nix-rust/nix/pull/900)) |
| 1703 |
([#966](https://github.com/nix-rust/nix/pull/966)) |
| 1704 |
|
| 1705 |
### Fixed |
| 1706 |
- Made `preadv` take immutable slice of IoVec. |
| 1707 |
([#914](https://github.com/nix-rust/nix/pull/914)) |
| 1708 |
- Fixed passing multiple file descriptors over Unix Sockets. |
| 1709 |
([#918](https://github.com/nix-rust/nix/pull/918)) |
| 1710 |
|
| 1711 |
## [0.11.1] 2019-06-06 |
| 1712 |
### Changed |
| 1713 |
- Changed some public types from reexports of libc types like `uint32_t` to the |
| 1714 |
native equivalents like `u32.` |
| 1715 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1716 |
|
| 1717 |
### Fixed |
| 1718 |
- Fix the build on Android and Linux/mips with recent versions of libc. |
| 1719 |
([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) |
| 1720 |
- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc |
| 1721 |
([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) |
| 1722 |
|
| 1723 |
### Removed |
| 1724 |
- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on |
| 1725 |
either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) |
| 1726 |
- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX |
| 1727 |
and iOS. |
| 1728 |
([#1033](https://github.com/nix-rust/nix/pull/1033)) |
| 1729 |
|
| 1730 |
## [0.11.0] 2018-06-01 |
| 1731 |
|
| 1732 |
### Added |
| 1733 |
- Added `sendfile` on FreeBSD and Darwin. |
| 1734 |
([#901](https://github.com/nix-rust/nix/pull/901)) |
| 1735 |
- Added `pselect` |
| 1736 |
([#894](https://github.com/nix-rust/nix/pull/894)) |
| 1737 |
- Exposed `preadv` and `pwritev` on the BSDs. |
| 1738 |
([#883](https://github.com/nix-rust/nix/pull/883)) |
| 1739 |
- Added `mlockall` and `munlockall` |
| 1740 |
([#876](https://github.com/nix-rust/nix/pull/876)) |
| 1741 |
- Added `SO_MARK` on Linux. |
| 1742 |
([#873](https://github.com/nix-rust/nix/pull/873)) |
| 1743 |
- Added safe support for nearly any buffer type in the `sys::aio` module. |
| 1744 |
([#872](https://github.com/nix-rust/nix/pull/872)) |
| 1745 |
- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`. |
| 1746 |
([#872](https://github.com/nix-rust/nix/pull/872)) |
| 1747 |
- Added `unistd::getsid` |
| 1748 |
([#850](https://github.com/nix-rust/nix/pull/850)) |
| 1749 |
- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830)) |
| 1750 |
- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems. |
| 1751 |
([#853](https://github.com/nix-rust/nix/pull/853)) |
| 1752 |
- Added `statvfs` module to all MacOS and Linux architectures. |
| 1753 |
([#832](https://github.com/nix-rust/nix/pull/832)) |
| 1754 |
- Added `EVFILT_EMPTY`, `EVFILT_PROCDESC`, and `EVFILT_SENDFILE` on FreeBSD. |
| 1755 |
([#825](https://github.com/nix-rust/nix/pull/825)) |
| 1756 |
- Exposed `termios::cfmakesane` on FreeBSD. |
| 1757 |
([#825](https://github.com/nix-rust/nix/pull/825)) |
| 1758 |
- Exposed `MSG_CMSG_CLOEXEC` on *BSD. |
| 1759 |
([#825](https://github.com/nix-rust/nix/pull/825)) |
| 1760 |
- Added `fchmod`, `fchmodat`. |
| 1761 |
([#857](https://github.com/nix-rust/nix/pull/857)) |
| 1762 |
- Added `request_code_write_int!` on FreeBSD/DragonFlyBSD |
| 1763 |
([#833](https://github.com/nix-rust/nix/pull/833)) |
| 1764 |
|
| 1765 |
### Changed |
| 1766 |
- `Display` and `Debug` for `SysControlAddr` now includes all fields. |
| 1767 |
([#837](https://github.com/nix-rust/nix/pull/837)) |
| 1768 |
- `ioctl!` has been replaced with a family of `ioctl_*!` macros. |
| 1769 |
([#833](https://github.com/nix-rust/nix/pull/833)) |
| 1770 |
- `io!`, `ior!`, `iow!`, and `iorw!` has been renamed to `request_code_none!`, `request_code_read!`, |
| 1771 |
`request_code_write!`, and `request_code_readwrite!` respectively. These have also now been exposed |
| 1772 |
in the documentation. |
| 1773 |
([#833](https://github.com/nix-rust/nix/pull/833)) |
| 1774 |
- Enabled more `ptrace::Request` definitions for uncommon Linux platforms |
| 1775 |
([#892](https://github.com/nix-rust/nix/pull/892)) |
| 1776 |
- Emulation of `FD_CLOEXEC` and `O_NONBLOCK` was removed from `socket()`, `accept4()`, and |
| 1777 |
`socketpair()`. |
| 1778 |
([#907](https://github.com/nix-rust/nix/pull/907)) |
| 1779 |
|
| 1780 |
### Fixed |
| 1781 |
- Fixed possible panics when using `SigAction::flags` on Linux |
| 1782 |
([#869](https://github.com/nix-rust/nix/pull/869)) |
| 1783 |
- Properly exposed 460800 and 921600 baud rates on NetBSD |
| 1784 |
([#837](https://github.com/nix-rust/nix/pull/837)) |
| 1785 |
- Fixed `ioctl_write_int!` on FreeBSD/DragonFlyBSD |
| 1786 |
([#833](https://github.com/nix-rust/nix/pull/833)) |
| 1787 |
- `ioctl_write_int!` now properly supports passing a `c_ulong` as the parameter on Linux non-musl targets |
| 1788 |
([#833](https://github.com/nix-rust/nix/pull/833)) |
| 1789 |
|
| 1790 |
### Removed |
| 1791 |
- Removed explicit support for the `bytes` crate from the `sys::aio` module. |
| 1792 |
See `sys::aio::AioCb::from_boxed_slice` examples for alternatives. |
| 1793 |
([#872](https://github.com/nix-rust/nix/pull/872)) |
| 1794 |
- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead. |
| 1795 |
([#872](https://github.com/nix-rust/nix/pull/872)) |
| 1796 |
- Removed emulated `accept4()` from macos, ios, and netbsd targets |
| 1797 |
([#907](https://github.com/nix-rust/nix/pull/907)) |
| 1798 |
- Removed `IFF_NOTRAILERS` on OpenBSD, as it has been removed in OpenBSD 6.3 |
| 1799 |
([#893](https://github.com/nix-rust/nix/pull/893)) |
| 1800 |
|
| 1801 |
## [0.10.0] 2018-01-26 |
| 1802 |
|
| 1803 |
### Added |
| 1804 |
- Added specialized wrapper: `sys::ptrace::step` |
| 1805 |
([#852](https://github.com/nix-rust/nix/pull/852)) |
| 1806 |
- Added `AioCb::from_ptr` and `AioCb::from_mut_ptr` |
| 1807 |
([#820](https://github.com/nix-rust/nix/pull/820)) |
| 1808 |
- Added specialized wrappers: `sys::ptrace::{traceme, syscall, cont, attach}`. Using the matching routines |
| 1809 |
with `sys::ptrace::ptrace` is now deprecated. |
| 1810 |
- Added `nix::poll` module for all platforms |
| 1811 |
([#672](https://github.com/nix-rust/nix/pull/672)) |
| 1812 |
- Added `nix::ppoll` function for FreeBSD and DragonFly |
| 1813 |
([#672](https://github.com/nix-rust/nix/pull/672)) |
| 1814 |
- Added protocol families in `AddressFamily` enum. |
| 1815 |
([#647](https://github.com/nix-rust/nix/pull/647)) |
| 1816 |
- Added the `pid()` method to `WaitStatus` for extracting the PID. |
| 1817 |
([#722](https://github.com/nix-rust/nix/pull/722)) |
| 1818 |
- Added `nix::unistd:fexecve`. |
| 1819 |
([#727](https://github.com/nix-rust/nix/pull/727)) |
| 1820 |
- Expose `uname()` on all platforms. |
| 1821 |
([#739](https://github.com/nix-rust/nix/pull/739)) |
| 1822 |
- Expose `signalfd` module on Android as well. |
| 1823 |
([#739](https://github.com/nix-rust/nix/pull/739)) |
| 1824 |
- Added `nix::sys::ptrace::detach`. |
| 1825 |
([#749](https://github.com/nix-rust/nix/pull/749)) |
| 1826 |
- Added timestamp socket control message variant: |
| 1827 |
`nix::sys::socket::ControlMessage::ScmTimestamp` |
| 1828 |
([#663](https://github.com/nix-rust/nix/pull/663)) |
| 1829 |
- Added socket option variant that enables the timestamp socket |
| 1830 |
control message: `nix::sys::socket::sockopt::ReceiveTimestamp` |
| 1831 |
([#663](https://github.com/nix-rust/nix/pull/663)) |
| 1832 |
- Added more accessor methods for `AioCb` |
| 1833 |
([#773](https://github.com/nix-rust/nix/pull/773)) |
| 1834 |
- Add `nix::sys::fallocate` |
| 1835 |
([#768](https:://github.com/nix-rust/nix/pull/768)) |
| 1836 |
- Added `nix::unistd::mkfifo`. |
| 1837 |
([#602](https://github.com/nix-rust/nix/pull/774)) |
| 1838 |
- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android. |
| 1839 |
([#771](https://github.com/nix-rust/nix/pull/771)) |
| 1840 |
- Added `nix::sys::uio::{process_vm_readv, process_vm_writev}` on Linux |
| 1841 |
([#568](https://github.com/nix-rust/nix/pull/568)) |
| 1842 |
- Added `nix::unistd::{getgroups, setgroups, getgrouplist, initgroups}`. ([#733](https://github.com/nix-rust/nix/pull/733)) |
| 1843 |
- Added `nix::sys::socket::UnixAddr::as_abstract` on Linux and Android. |
| 1844 |
([#785](https://github.com/nix-rust/nix/pull/785)) |
| 1845 |
- Added `nix::unistd::execveat` on Linux and Android. |
| 1846 |
([#800](https://github.com/nix-rust/nix/pull/800)) |
| 1847 |
- Added the `from_raw()` method to `WaitStatus` for converting raw status values |
| 1848 |
to `WaitStatus` independent of syscalls. |
| 1849 |
([#741](https://github.com/nix-rust/nix/pull/741)) |
| 1850 |
- Added more standard trait implementations for various types. |
| 1851 |
([#814](https://github.com/nix-rust/nix/pull/814)) |
| 1852 |
- Added `sigprocmask` to the signal module. |
| 1853 |
([#826](https://github.com/nix-rust/nix/pull/826)) |
| 1854 |
- Added `nix::sys::socket::LinkAddr` on Linux and all bsdlike system. |
| 1855 |
([#813](https://github.com/nix-rust/nix/pull/813)) |
| 1856 |
- Add socket options for `IP_TRANSPARENT` / `BIND_ANY`. |
| 1857 |
([#835](https://github.com/nix-rust/nix/pull/835)) |
| 1858 |
|
| 1859 |
### Changed |
| 1860 |
- Exposed the `mqueue` module for all supported operating systems. |
| 1861 |
([#834](https://github.com/nix-rust/nix/pull/834)) |
| 1862 |
- Use native `pipe2` on all BSD targets. Users should notice no difference. |
| 1863 |
([#777](https://github.com/nix-rust/nix/pull/777)) |
| 1864 |
- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692)) |
| 1865 |
- Marked `sys::ptrace::ptrace` as `unsafe`. |
| 1866 |
- Changed function signature of `socket()` and `socketpair()`. The `protocol` argument |
| 1867 |
has changed type from `c_int` to `SockProtocol`. |
| 1868 |
It accepts a `None` value for default protocol that was specified with zero using `c_int`. |
| 1869 |
([#647](https://github.com/nix-rust/nix/pull/647)) |
| 1870 |
- Made `select` easier to use, adding the ability to automatically calculate the `nfds` parameter using the new |
| 1871 |
`FdSet::highest` ([#701](https://github.com/nix-rust/nix/pull/701)) |
| 1872 |
- Exposed `unistd::setresuid` and `unistd::setresgid` on FreeBSD and OpenBSD |
| 1873 |
([#721](https://github.com/nix-rust/nix/pull/721)) |
| 1874 |
- Refactored the `statvfs` module removing extraneous API functions and the |
| 1875 |
`statvfs::vfs` module. Additionally `(f)statvfs()` now return the struct |
| 1876 |
directly. And the returned `Statvfs` struct now exposes its data through |
| 1877 |
accessor methods. ([#729](https://github.com/nix-rust/nix/pull/729)) |
| 1878 |
- The `addr` argument to `madvise` and `msync` is now `*mut` to better match the |
| 1879 |
libc API. ([#731](https://github.com/nix-rust/nix/pull/731)) |
| 1880 |
- `shm_open` and `shm_unlink` are no longer exposed on Android targets, where |
| 1881 |
they are not officially supported. ([#731](https://github.com/nix-rust/nix/pull/731)) |
| 1882 |
- `MapFlags`, `MmapAdvise`, and `MsFlags` expose some more variants and only |
| 1883 |
officially-supported variants are provided for each target. |
| 1884 |
([#731](https://github.com/nix-rust/nix/pull/731)) |
| 1885 |
- Marked `pty::ptsname` function as `unsafe` |
| 1886 |
([#744](https://github.com/nix-rust/nix/pull/744)) |
| 1887 |
- Moved constants ptrace request, event and options to enums and updated ptrace functions and argument types accordingly. |
| 1888 |
([#749](https://github.com/nix-rust/nix/pull/749)) |
| 1889 |
- `AioCb::Drop` will now panic if the `AioCb` is still in-progress ([#715](https://github.com/nix-rust/nix/pull/715)) |
| 1890 |
- Restricted `nix::sys::socket::UnixAddr::new_abstract` to Linux and Android only. |
| 1891 |
([#785](https://github.com/nix-rust/nix/pull/785)) |
| 1892 |
- The `ucred` struct has been removed in favor of a `UserCredentials` struct that |
| 1893 |
contains only getters for its fields. |
| 1894 |
([#814](https://github.com/nix-rust/nix/pull/814)) |
| 1895 |
- Both `ip_mreq` and `ipv6_mreq` have been replaced with `IpMembershipRequest` and |
| 1896 |
`Ipv6MembershipRequest`. |
| 1897 |
([#814](https://github.com/nix-rust/nix/pull/814)) |
| 1898 |
- Removed return type from `pause`. |
| 1899 |
([#829](https://github.com/nix-rust/nix/pull/829)) |
| 1900 |
- Changed the termios APIs to allow for using a `u32` instead of the `BaudRate` |
| 1901 |
enum on BSD platforms to support arbitrary baud rates. See the module docs for |
| 1902 |
`nix::sys::termios` for more details. |
| 1903 |
([#843](https://github.com/nix-rust/nix/pull/843)) |
| 1904 |
|
| 1905 |
### Fixed |
| 1906 |
- Fix compilation and tests for OpenBSD targets |
| 1907 |
([#688](https://github.com/nix-rust/nix/pull/688)) |
| 1908 |
- Fixed error handling in `AioCb::fsync`, `AioCb::read`, and `AioCb::write`. |
| 1909 |
It is no longer an error to drop an `AioCb` that failed to enqueue in the OS. |
| 1910 |
([#715](https://github.com/nix-rust/nix/pull/715)) |
| 1911 |
- Fix potential memory corruption on non-Linux platforms when using |
| 1912 |
`sendmsg`/`recvmsg`, caused by mismatched `msghdr` definition. |
| 1913 |
([#648](https://github.com/nix-rust/nix/pull/648)) |
| 1914 |
|
| 1915 |
### Removed |
| 1916 |
- `AioCb::from_boxed_slice` has been removed. It was never actually safe. Use |
| 1917 |
`from_bytes` or `from_bytes_mut` instead. |
| 1918 |
([#820](https://github.com/nix-rust/nix/pull/820)) |
| 1919 |
- The syscall module has been removed. This only exposed enough functionality for |
| 1920 |
`memfd_create()` and `pivot_root()`, which are still exposed as separate functions. |
| 1921 |
([#747](https://github.com/nix-rust/nix/pull/747)) |
| 1922 |
- The `Errno` variants are no longer reexported from the `errno` module. `Errno` itself is no longer reexported from the |
| 1923 |
crate root and instead must be accessed using the `errno` module. ([#696](https://github.com/nix-rust/nix/pull/696)) |
| 1924 |
- Removed `MS_VERBOSE`, `MS_NOSEC`, and `MS_BORN` from `MsFlags`. These |
| 1925 |
are internal kernel flags and should never have been exposed. |
| 1926 |
([#814](https://github.com/nix-rust/nix/pull/814)) |
| 1927 |
|
| 1928 |
|
| 1929 |
## [0.9.0] 2017-07-23 |
| 1930 |
|
| 1931 |
### Added |
| 1932 |
- Added `sysconf`, `pathconf`, and `fpathconf` |
| 1933 |
([#630](https://github.com/nix-rust/nix/pull/630) |
| 1934 |
- Added `sys::signal::SigAction::{ flags, mask, handler}` |
| 1935 |
([#611](https://github.com/nix-rust/nix/pull/609) |
| 1936 |
- Added `nix::sys::pthread::pthread_self` |
| 1937 |
([#591](https://github.com/nix-rust/nix/pull/591) |
| 1938 |
- Added `AioCb::from_boxed_slice` |
| 1939 |
([#582](https://github.com/nix-rust/nix/pull/582) |
| 1940 |
- Added `nix::unistd::{openat, fstatat, readlink, readlinkat}` |
| 1941 |
([#551](https://github.com/nix-rust/nix/pull/551)) |
| 1942 |
- Added `nix::pty::{grantpt, posix_openpt, ptsname/ptsname_r, unlockpt}` |
| 1943 |
([#556](https://github.com/nix-rust/nix/pull/556) |
| 1944 |
- Added `nix::ptr::openpty` |
| 1945 |
([#456](https://github.com/nix-rust/nix/pull/456)) |
| 1946 |
- Added `nix::ptrace::{ptrace_get_data, ptrace_getsiginfo, ptrace_setsiginfo |
| 1947 |
and nix::Error::UnsupportedOperation}` |
| 1948 |
([#614](https://github.com/nix-rust/nix/pull/614)) |
| 1949 |
- Added `cfmakeraw`, `cfsetspeed`, and `tcgetsid`. ([#527](https://github.com/nix-rust/nix/pull/527)) |
| 1950 |
- Added "bad none", "bad write_ptr", "bad write_int", and "bad readwrite" variants to the `ioctl!` |
| 1951 |
macro. ([#670](https://github.com/nix-rust/nix/pull/670)) |
| 1952 |
- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD` |
| 1953 |
events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall` |
| 1954 |
([#566](https://github.com/nix-rust/nix/pull/566)). |
| 1955 |
|
| 1956 |
### Changed |
| 1957 |
- The `ioctl!` macro and its variants now allow the generated functions to have |
| 1958 |
doccomments. ([#661](https://github.com/nix-rust/nix/pull/661)) |
| 1959 |
- Changed `ioctl!(write ...)` into `ioctl!(write_ptr ...)` and `ioctl!(write_int ..)` variants |
| 1960 |
to more clearly separate those use cases. ([#670](https://github.com/nix-rust/nix/pull/670)) |
| 1961 |
- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe. |
| 1962 |
([#559](https://github.com/nix-rust/nix/pull/559)) |
| 1963 |
- Minimum supported Rust version is now 1.13. |
| 1964 |
- Removed `revents` argument from `PollFd::new()` as it's an output argument and |
| 1965 |
will be overwritten regardless of value. |
| 1966 |
([#542](https://github.com/nix-rust/nix/pull/542)) |
| 1967 |
- Changed type signature of `sys::select::FdSet::contains` to make `self` |
| 1968 |
immutable ([#564](https://github.com/nix-rust/nix/pull/564)) |
| 1969 |
- Introduced wrapper types for `gid_t`, `pid_t`, and `uid_t` as `Gid`, `Pid`, and `Uid` |
| 1970 |
respectively. Various functions have been changed to use these new types as |
| 1971 |
arguments. ([#629](https://github.com/nix-rust/nix/pull/629)) |
| 1972 |
- Fixed compilation on all Android and iOS targets ([#527](https://github.com/nix-rust/nix/pull/527)) |
| 1973 |
and promoted them to Tier 2 support. |
| 1974 |
- `nix::sys::statfs::{statfs,fstatfs}` uses statfs definition from `libc::statfs` instead of own linux specific type `nix::sys::Statfs`. |
| 1975 |
Also file system type constants like `nix::sys::statfs::ADFS_SUPER_MAGIC` were removed in favor of the libc equivalent. |
| 1976 |
([#561](https://github.com/nix-rust/nix/pull/561)) |
| 1977 |
- Revised the termios API including additional tests and documentation and exposed it on iOS. ([#527](https://github.com/nix-rust/nix/pull/527)) |
| 1978 |
- `eventfd`, `signalfd`, and `pwritev`/`preadv` functionality is now included by default for all |
| 1979 |
supported platforms. ([#681](https://github.com/nix-rust/nix/pull/561)) |
| 1980 |
- The `ioctl!` macro's plain variants has been replaced with "bad read" to be consistent with |
| 1981 |
other variants. The generated functions also have more strict types for their arguments. The |
| 1982 |
"*_buf" variants also now calculate total array size and take slice references for improved type |
| 1983 |
safety. The documentation has also been dramatically improved. |
| 1984 |
([#670](https://github.com/nix-rust/nix/pull/670)) |
| 1985 |
|
| 1986 |
### Removed |
| 1987 |
- Removed `io::Error` from `nix::Error` and the conversion from `nix::Error` to `Errno` |
| 1988 |
([#614](https://github.com/nix-rust/nix/pull/614)) |
| 1989 |
- All feature flags have been removed in favor of conditional compilation on supported platforms. |
| 1990 |
`execvpe` is no longer supported, but this was already broken and will be added back in the next |
| 1991 |
release. ([#681](https://github.com/nix-rust/nix/pull/561)) |
| 1992 |
- Removed `ioc_*` functions and many helper constants and macros within the `ioctl` module. These |
| 1993 |
should always have been private and only the `ioctl!` should be used in public code. |
| 1994 |
([#670](https://github.com/nix-rust/nix/pull/670)) |
| 1995 |
|
| 1996 |
### Fixed |
| 1997 |
- Fixed multiple issues compiling under different archetectures and OSes. |
| 1998 |
Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)), |
| 1999 |
`Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)), |
| 2000 |
`MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553)), |
| 2001 |
`NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538)), |
| 2002 |
`FreeBSD/x86_64,i686` ([#536](https://github.com/nix-rust/nix/pull/536)), and |
| 2003 |
`Android` ([#631](https://github.com/nix-rust/nix/pull/631)). |
| 2004 |
- `bind` and `errno_location` now work correctly on `Android` |
| 2005 |
([#631](https://github.com/nix-rust/nix/pull/631)) |
| 2006 |
- Added `nix::ptrace` on all Linux-kernel-based platforms |
| 2007 |
[#624](https://github.com/nix-rust/nix/pull/624). Previously it was |
| 2008 |
only available on x86, x86-64, and ARM, and also not on Android. |
| 2009 |
- Fixed `sys::socket::sendmsg` with zero entry `cmsgs` parameter. |
| 2010 |
([#623](https://github.com/nix-rust/nix/pull/623)) |
| 2011 |
- Multiple constants related to the termios API have now been properly defined for |
| 2012 |
all supported platforms. ([#527](https://github.com/nix-rust/nix/pull/527)) |
| 2013 |
- `ioctl!` macro now supports working with non-int datatypes and properly supports all platforms. |
| 2014 |
([#670](https://github.com/nix-rust/nix/pull/670)) |
| 2015 |
|
| 2016 |
## [0.8.1] 2017-04-16 |
| 2017 |
|
| 2018 |
### Fixed |
| 2019 |
- Fixed build on FreeBSD. (Cherry-picked |
| 2020 |
[a859ee3c](https://github.com/nix-rust/nix/commit/a859ee3c9396dfdb118fcc2c8ecc697e2d303467)) |
| 2021 |
|
| 2022 |
## [0.8.0] 2017-03-02 |
| 2023 |
|
| 2024 |
### Added |
| 2025 |
- Added `::nix::sys::termios::BaudRate` enum to provide portable baudrate |
| 2026 |
values. ([#518](https://github.com/nix-rust/nix/pull/518)) |
| 2027 |
- Added a new `WaitStatus::PtraceEvent` to support ptrace events on Linux |
| 2028 |
and Android ([#438](https://github.com/nix-rust/nix/pull/438)) |
| 2029 |
- Added support for POSIX AIO |
| 2030 |
([#483](https://github.com/nix-rust/nix/pull/483)) |
| 2031 |
([#506](https://github.com/nix-rust/nix/pull/506)) |
| 2032 |
- Added support for XNU system control sockets |
| 2033 |
([#478](https://github.com/nix-rust/nix/pull/478)) |
| 2034 |
- Added support for `ioctl` calls on BSD platforms |
| 2035 |
([#478](https://github.com/nix-rust/nix/pull/478)) |
| 2036 |
- Added struct `TimeSpec` |
| 2037 |
([#475](https://github.com/nix-rust/nix/pull/475)) |
| 2038 |
([#483](https://github.com/nix-rust/nix/pull/483)) |
| 2039 |
- Added complete definitions for all kqueue-related constants on all supported |
| 2040 |
OSes |
| 2041 |
([#415](https://github.com/nix-rust/nix/pull/415)) |
| 2042 |
- Added function `epoll_create1` and bitflags `EpollCreateFlags` in |
| 2043 |
`::nix::sys::epoll` in order to support `::libc::epoll_create1`. |
| 2044 |
([#410](https://github.com/nix-rust/nix/pull/410)) |
| 2045 |
- Added `setresuid` and `setresgid` for Linux in `::nix::unistd` |
| 2046 |
([#448](https://github.com/nix-rust/nix/pull/448)) |
| 2047 |
- Added `getpgid` in `::nix::unistd` |
| 2048 |
([#433](https://github.com/nix-rust/nix/pull/433)) |
| 2049 |
- Added `tcgetpgrp` and `tcsetpgrp` in `::nix::unistd` |
| 2050 |
([#451](https://github.com/nix-rust/nix/pull/451)) |
| 2051 |
- Added `CLONE_NEWCGROUP` in `::nix::sched` |
| 2052 |
([#457](https://github.com/nix-rust/nix/pull/457)) |
| 2053 |
- Added `getpgrp` in `::nix::unistd` |
| 2054 |
([#491](https://github.com/nix-rust/nix/pull/491)) |
| 2055 |
- Added `fchdir` in `::nix::unistd` |
| 2056 |
([#497](https://github.com/nix-rust/nix/pull/497)) |
| 2057 |
- Added `major` and `minor` in `::nix::sys::stat` for decomposing `dev_t` |
| 2058 |
([#508](https://github.com/nix-rust/nix/pull/508)) |
| 2059 |
- Fixed the style of many bitflags and use `libc` in more places. |
| 2060 |
([#503](https://github.com/nix-rust/nix/pull/503)) |
| 2061 |
- Added `ppoll` in `::nix::poll` |
| 2062 |
([#520](https://github.com/nix-rust/nix/pull/520)) |
| 2063 |
- Added support for getting and setting pipe size with fcntl(2) on Linux |
| 2064 |
([#540](https://github.com/nix-rust/nix/pull/540)) |
| 2065 |
|
| 2066 |
### Changed |
| 2067 |
- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}` |
| 2068 |
switched to use `BaudRate` enum from `speed_t`. |
| 2069 |
([#518](https://github.com/nix-rust/nix/pull/518)) |
| 2070 |
- `epoll_ctl` now could accept None as argument `event` |
| 2071 |
when op is `EpollOp::EpollCtlDel`. |
| 2072 |
([#480](https://github.com/nix-rust/nix/pull/480)) |
| 2073 |
- Removed the `bad` keyword from the `ioctl!` macro |
| 2074 |
([#478](https://github.com/nix-rust/nix/pull/478)) |
| 2075 |
- Changed `TimeVal` into an opaque Newtype |
| 2076 |
([#475](https://github.com/nix-rust/nix/pull/475)) |
| 2077 |
- `kill`'s signature, defined in `::nix::sys::signal`, changed, so that the |
| 2078 |
signal parameter has type `T: Into<Option<Signal>>`. `None` as an argument |
| 2079 |
for that parameter will result in a 0 passed to libc's `kill`, while a |
| 2080 |
`Some`-argument will result in the previous behavior for the contained |
| 2081 |
`Signal`. |
| 2082 |
([#445](https://github.com/nix-rust/nix/pull/445)) |
| 2083 |
- The minimum supported version of rustc is now 1.7.0. |
| 2084 |
([#444](https://github.com/nix-rust/nix/pull/444)) |
| 2085 |
- Changed `KEvent` to an opaque structure that may only be modified by its |
| 2086 |
constructor and the `ev_set` method. |
| 2087 |
([#415](https://github.com/nix-rust/nix/pull/415)) |
| 2088 |
([#442](https://github.com/nix-rust/nix/pull/442)) |
| 2089 |
([#463](https://github.com/nix-rust/nix/pull/463)) |
| 2090 |
- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated |
| 2091 |
using `pipe`, which meant that setting `O_CLOEXEC` was not atomic. |
| 2092 |
([#427](https://github.com/nix-rust/nix/pull/427)) |
| 2093 |
- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for |
| 2094 |
it to conform with our conventions. |
| 2095 |
([#410](https://github.com/nix-rust/nix/pull/410)) |
| 2096 |
- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for |
| 2097 |
`::libc::epoll_event`. The formerly public field `events` is now be read-only |
| 2098 |
accessible with the new method `events()` of `EpollEvent`. Instances of |
| 2099 |
`EpollEvent` can be constructed using the new method `new()` of EpollEvent. |
| 2100 |
([#410](https://github.com/nix-rust/nix/pull/410)) |
| 2101 |
- `SigFlags` in `::nix::sys::signal` has be renamed to `SigmaskHow` and its type |
| 2102 |
has changed from `bitflags` to `enum` in order to conform to our conventions. |
| 2103 |
([#460](https://github.com/nix-rust/nix/pull/460)) |
| 2104 |
- `sethostname` now takes a `&str` instead of a `&[u8]` as this provides an API |
| 2105 |
that makes more sense in normal, correct usage of the API. |
| 2106 |
- `gethostname` previously did not expose the actual length of the hostname |
| 2107 |
written from the underlying system call at all. This has been updated to |
| 2108 |
return a `&CStr` within the provided buffer that is always properly |
| 2109 |
NUL-terminated (this is not guaranteed by the call with all platforms/libc |
| 2110 |
implementations). |
| 2111 |
- Exposed all fcntl(2) operations at the module level, so they can be |
| 2112 |
imported direclty instead of via `FcntlArg` enum. |
| 2113 |
([#541](https://github.com/nix-rust/nix/pull/541)) |
| 2114 |
|
| 2115 |
### Fixed |
| 2116 |
- Fixed multiple issues with Unix domain sockets on non-Linux OSes |
| 2117 |
([#474](https://github.com/nix-rust/nix/pull/415)) |
| 2118 |
- Fixed using kqueue with `EVFILT_USER` on FreeBSD |
| 2119 |
([#415](https://github.com/nix-rust/nix/pull/415)) |
| 2120 |
- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg |
| 2121 |
functions on that same OS. |
| 2122 |
([#397](https://github.com/nix-rust/nix/pull/397)) |
| 2123 |
- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`. |
| 2124 |
([#429](https://github.com/nix-rust/nix/pull/429)) |
| 2125 |
- Fixed clone passing a potentially unaligned stack. |
| 2126 |
([#490](https://github.com/nix-rust/nix/pull/490)) |
| 2127 |
- Fixed mkdev not creating a `dev_t` the same way as libc. |
| 2128 |
([#508](https://github.com/nix-rust/nix/pull/508)) |
| 2129 |
|
| 2130 |
## [0.7.0] 2016-09-09 |
| 2131 |
|
| 2132 |
### Added |
| 2133 |
- Added `lseek` and `lseek64` in `::nix::unistd` |
| 2134 |
([#377](https://github.com/nix-rust/nix/pull/377)) |
| 2135 |
- Added `mkdir` and `getcwd` in `::nix::unistd` |
| 2136 |
([#416](https://github.com/nix-rust/nix/pull/416)) |
| 2137 |
- Added accessors `sigmask_mut` and `sigmask` to `UContext` in |
| 2138 |
`::nix::ucontext`. |
| 2139 |
([#370](https://github.com/nix-rust/nix/pull/370)) |
| 2140 |
- Added `WUNTRACED` to `WaitPidFlag` in `::nix::sys::wait` for non-_linux_ |
| 2141 |
targets. |
| 2142 |
([#379](https://github.com/nix-rust/nix/pull/379)) |
| 2143 |
- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and |
| 2144 |
functions `reboot` and `set_cad_enabled`. Currently for _linux_ only. |
| 2145 |
([#386](https://github.com/nix-rust/nix/pull/386)) |
| 2146 |
- `FdSet` in `::nix::sys::select` now also implements `Clone`. |
| 2147 |
([#405](https://github.com/nix-rust/nix/pull/405)) |
| 2148 |
- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets. |
| 2149 |
([#407](https://github.com/nix-rust/nix/pull/407)) |
| 2150 |
- Added `CpuSet::unset` in `::nix::sched`. |
| 2151 |
([#402](https://github.com/nix-rust/nix/pull/402)) |
| 2152 |
- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to |
| 2153 |
allow creation of objects, after removing public access to members. |
| 2154 |
([#399](https://github.com/nix-rust/nix/pull/399)) |
| 2155 |
- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide |
| 2156 |
read access to formerly public member `revents`. |
| 2157 |
([#399](https://github.com/nix-rust/nix/pull/399)) |
| 2158 |
- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only. |
| 2159 |
([#422](https://github.com/nix-rust/nix/pull/422)) |
| 2160 |
|
| 2161 |
### Changed |
| 2162 |
- Replaced the reexported integer constants for signals by the enumeration |
| 2163 |
`Signal` in `::nix::sys::signal`. |
| 2164 |
([#362](https://github.com/nix-rust/nix/pull/362)) |
| 2165 |
- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`. |
| 2166 |
([#383](https://github.com/nix-rust/nix/pull/383)) |
| 2167 |
- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in |
| 2168 |
`::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now |
| 2169 |
return `EINVAL`, if an invalid argument for the `field` parameter is passed. |
| 2170 |
([#402](https://github.com/nix-rust/nix/pull/402)) |
| 2171 |
- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`, |
| 2172 |
which has the same structure as the old `MqAttr`. The field `mq_flags` of |
| 2173 |
`::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`. |
| 2174 |
`MqAttr` also no longer implements `Debug`. |
| 2175 |
([#392](https://github.com/nix-rust/nix/pull/392)) |
| 2176 |
- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue` |
| 2177 |
was replaced by a parameter named `msg_prio` with type `&mut u32`, so that |
| 2178 |
the message priority can be obtained by the caller. |
| 2179 |
([#392](https://github.com/nix-rust/nix/pull/392)) |
| 2180 |
- The type alias `MQd` in `::nix::queue` was replaced by the type alias |
| 2181 |
`libc::mqd_t`, both of which are aliases for the same type. |
| 2182 |
([#392](https://github.com/nix-rust/nix/pull/392)) |
| 2183 |
|
| 2184 |
### Removed |
| 2185 |
- Type alias `SigNum` from `::nix::sys::signal`. |
| 2186 |
([#362](https://github.com/nix-rust/nix/pull/362)) |
| 2187 |
- Type alias `CpuMask` from `::nix::shed`. |
| 2188 |
([#402](https://github.com/nix-rust/nix/pull/402)) |
| 2189 |
- Removed public fields from `PollFd` in `::nix::poll`. (See also added method |
| 2190 |
`revents()`. |
| 2191 |
([#399](https://github.com/nix-rust/nix/pull/399)) |
| 2192 |
|
| 2193 |
### Fixed |
| 2194 |
- Fixed the build problem for NetBSD (Note, that we currently do not support |
| 2195 |
it, so it might already be broken again). |
| 2196 |
([#389](https://github.com/nix-rust/nix/pull/389)) |
| 2197 |
- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg |
| 2198 |
functions on that same OS. |
| 2199 |
([#397](https://github.com/nix-rust/nix/pull/397)) |
| 2200 |
|
| 2201 |
## [0.6.0] 2016-06-10 |
| 2202 |
|
| 2203 |
### Added |
| 2204 |
- Added `gettid` in `::nix::unistd` for _linux_ and _android_. |
| 2205 |
([#293](https://github.com/nix-rust/nix/pull/293)) |
| 2206 |
- Some _mips_ support in `::nix::sched` and `::nix::sys::syscall`. |
| 2207 |
([#301](https://github.com/nix-rust/nix/pull/301)) |
| 2208 |
- Added `SIGNALFD_SIGINFO_SIZE` in `::nix::sys::signalfd`. |
| 2209 |
([#309](https://github.com/nix-rust/nix/pull/309)) |
| 2210 |
- Added new module `::nix::ucontext` with struct `UContext`. Currently for |
| 2211 |
_linux_ only. |
| 2212 |
([#311](https://github.com/nix-rust/nix/pull/311)) |
| 2213 |
- Added `EPOLLEXCLUSIVE` to `EpollEventKind` in `::nix::sys::epoll`. |
| 2214 |
([#330](https://github.com/nix-rust/nix/pull/330)) |
| 2215 |
- Added `pause` to `::nix::unistd`. |
| 2216 |
([#336](https://github.com/nix-rust/nix/pull/336)) |
| 2217 |
- Added `sleep` to `::nix::unistd`. |
| 2218 |
([#351](https://github.com/nix-rust/nix/pull/351)) |
| 2219 |
- Added `S_IFDIR`, `S_IFLNK`, `S_IFMT` to `SFlag` in `::nix::sys::stat`. |
| 2220 |
([#359](https://github.com/nix-rust/nix/pull/359)) |
| 2221 |
- Added `clear` and `extend` functions to `SigSet`'s implementation in |
| 2222 |
`::nix::sys::signal`. |
| 2223 |
([#347](https://github.com/nix-rust/nix/pull/347)) |
| 2224 |
- `sockaddr_storage_to_addr` in `::nix::sys::socket` now supports `sockaddr_nl` |
| 2225 |
on _linux_ and _android_. |
| 2226 |
([#366](https://github.com/nix-rust/nix/pull/366)) |
| 2227 |
- Added support for `SO_ORIGINAL_DST` in `::nix::sys::socket` on _linux_. |
| 2228 |
([#367](https://github.com/nix-rust/nix/pull/367)) |
| 2229 |
- Added `SIGINFO` in `::nix::sys::signal` for the _macos_ target as well as |
| 2230 |
`SIGPWR` and `SIGSTKFLT` in `::nix::sys::signal` for non-_macos_ targets. |
| 2231 |
([#361](https://github.com/nix-rust/nix/pull/361)) |
| 2232 |
|
| 2233 |
### Changed |
| 2234 |
- Changed the structure `IoVec` in `::nix::sys::uio`. |
| 2235 |
([#304](https://github.com/nix-rust/nix/pull/304)) |
| 2236 |
- Replaced `CREATE_NEW_FD` by `SIGNALFD_NEW` in `::nix::sys::signalfd`. |
| 2237 |
([#309](https://github.com/nix-rust/nix/pull/309)) |
| 2238 |
- Renamed `SaFlag` to `SaFlags` and `SigFlag` to `SigFlags` in |
| 2239 |
`::nix::sys::signal`. |
| 2240 |
([#314](https://github.com/nix-rust/nix/pull/314)) |
| 2241 |
- Renamed `Fork` to `ForkResult` and changed its fields in `::nix::unistd`. |
| 2242 |
([#332](https://github.com/nix-rust/nix/pull/332)) |
| 2243 |
- Added the `signal` parameter to `clone`'s signature in `::nix::sched`. |
| 2244 |
([#344](https://github.com/nix-rust/nix/pull/344)) |
| 2245 |
- `execv`, `execve`, and `execvp` now return `Result<Void>` instead of |
| 2246 |
`Result<()>` in `::nix::unistd`. |
| 2247 |
([#357](https://github.com/nix-rust/nix/pull/357)) |
| 2248 |
|
| 2249 |
### Fixed |
| 2250 |
- Improved the conversion from `std::net::SocketAddr` to `InetAddr` in |
| 2251 |
`::nix::sys::socket::addr`. |
| 2252 |
([#335](https://github.com/nix-rust/nix/pull/335)) |
| 2253 |
|
| 2254 |
## [0.5.0] 2016-03-01 |