nix v0.18.0 Release Notes
Release Date: 2020-07-26 // over 3 years ago-
➕ Added
- ➕ Added
fchown(2)
wrapper. (#1257) - Added support on linux systems for
MAP_HUGE_
SIZE
family of flags. (#1211) - Added support for
F_OFD_*
fcntl
commands on Linux and Android. (#1195) - ➕ Added
env::clearenv()
: callslibc::clearenv
on platforms where it's available, and clears the environment of all variables viastd::env::vars
andstd::env::remove_var
on others. (#1185) FsType
inner value made public. (#1187)- ➕ Added
unistd::setfsuid
andunistd::setfsgid
to set the user or group identity for filesystem checks per-thread. (#1163) - Derived
Ord
,PartialOrd
forunistd::Pid
(#1189) - ➕ Added
select::FdSet::fds
method to iterate over file descriptors in a set. (#1207) - ➕ Added support for UDP generic segmentation offload (GSO) and generic receive offload (GRO) (#1209)
- ➕ Added support for
sendmmsg
andrecvmmsg
calls (#1208) - ➕ Added support for
SCM_CREDS
messages (UnixCredentials
) on FreeBSD/DragonFly (#1216) - ➕ Added
BindToDevice
socket option (sockopt) on Linux (#1233) - Added
EventFilter
bitflags forEV_DISPATCH
andEV_RECEIPT
on OpenBSD. (#1252) - ➕ Added support for
Ipv4PacketInfo
andIpv6PacketInfo
toControlMessage
. (#1222) - 0️⃣
CpuSet
andUnixCredentials
now implementDefault
. (#1244) - ➕ Added
unistd::ttyname
(#1259) - ➕ Added support for
Ipv4PacketInfo
andIpv6PacketInfo
toControlMessage
for iOS and Android. (#1265) - ➕ Added support for
TimerFd
. (#1261)
🔄 Changed
- 🔄 Changed
fallocate
return type fromc_int
to()
(#1201) - 🐧 Enabled
sys::ptrace::setregs
andsys::ptrace::getregs
on x86_64-unknown-linux-musl target (#1198) - 🐧 On Linux,
ptrace::write
is now anunsafe
function. Caveat programmer. (#1245) execv
,execve
,execvp
andexecveat
in::nix::unistd
andreboot
in::nix::sys::reboot
now returnResult<Infallible>
instead ofResult<Void>
(#1239)sys::socket::sockaddr_storage_to_addr
is no longerunsafe
. So isoffset_of!
.sys::socket::sockaddr_storage_to_addr
,offset_of!
, andErrno::clear
are no longerunsafe
.SockAddr::as_ffi_pair
,sys::socket::sockaddr_storage_to_addr
,offset_of!
, andErrno::clear
are no longerunsafe
. (#1244)- Several
Inotify
methods now takeself
by value instead of by reference (#1244) - 📊
nix::poll::ppoll
:timeout
parameter is now optional, None is equivalent for infinite timeout.
🛠 Fixed
🛠 Fixed
getsockopt
. The old code produced UB which triggers a panic with Rust 1.44.0. (#1214)🛠 Fixed a bug in nix::unistd that would result in an infinite loop when a group or user lookup required a buffer larger than 16KB. (#1198)
Fixed unaligned casting of
cmsg_data
toaf_alg_iv
(#1206)🛠 Fixed
readlink
/readlinkat
when reading symlinks longer thanPATH_MAX
(#1231)PollFd
,EpollEvent
,IpMembershipRequest
,Ipv6MembershipRequest
,TimeVal
, andIoVec
are nowrepr(transparent)
. This is required for correctness's sake across all architectures and compilers, though now bugs have been reported so far. (#1243)🛠 Fixed unaligned pointer read in
Inotify::read_events
. (#1244)
✂ Removed
- Removed
sys::socket::addr::from_libc_sockaddr
from the public API. (#1215) Removed
sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper
from the public API. These were previously hidden in the docs but still usable by downstream. (#1235)Nix no longer implements
NixPath
forOption<P> where P: NixPath
. Most Nix functions that acceptNixPath
arguments can't do anything useful withNone
. The exceptions (mount
andquotactl_sync
) already take explicitly optional arguments. (#1242)✂ Removed
unistd::daemon
andunistd::pipe2
on OSX and ios (#1255)Removed
sys::event::FilterFlag::NOTE_EXIT_REPARENTED
andsys::event::FilterFlag::NOTE_REAP
on OSX and ios. (#1255)✂ Removed
sys::ptrace::ptrace
on Android and Linux. (#1255)⬇️ Dropped support for powerpc64-unknown-linux-gnu (#1266)
- ➕ Added