58 KiB
Change Log
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
[0.23.1] - 2021-12-16
Added
Changed
- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts #1492. From now on, the MSRV is not guaranteed to work with all versions of all dependencies, just with some version of all dependencies. (#1607)
Fixed
- Fixed soundness issues in
FdSet::insert,FdSet::remove, andFdSet::containsinvolving file descriptors outside of the range0..FD_SETSIZE. (#1575)
Removed
[0.23.0] - 2021-09-28
Added
- Added the
LocalPeerCredsockopt. (#1482) - Added
TimeSpec::from_durationandTimeSpec::from_timespec(#1465) - Added
IPV6_V6ONLYsockopt. (#1470) - Added
impl From<User> for libc::passwdtrait implementation to convert aUserinto alibc::passwd. Consumes theUserstruct to give ownership over the member pointers. (#1471) - Added
pthread_kill. (#1472) - Added
mknodat. (#1473) - Added
setrlimitandgetrlimit. (#1302) - Added
ptrace::interruptmethod for platforms that supportPTRACE_INTERRUPT(#1422) - Added
IP6T_SO_ORIGINAL_DSTsockopt. (#1490) - Added the
PTRACE_EVENT_STOPvariant to thesys::ptrace::Eventenum (#1335) - Exposed
SockAddr::from_raw_sockaddr(#1447) - Added
TcpRepair(#1503) - Enabled
pwritevandpreadvfor more operating systems. (#1511) - Added support for
TCP_MAXSEGTCP Maximum Segment Size socket options (#1292) - Added
Ipv4RecvErrandIpv6RecvErrsockopts and associated control messages. (#1514) - Added
AsRawFdimplementation onPollFd. (#1516) - Added
Ipv4TtlandIpv6Ttlsockopts. (#1515) - Added
MAP_EXCL,MAP_ALIGNED_SUPER, andMAP_CONCEALmmap flags, and exposedMAP_ANONYMOUSfor all operating systems. (#1522) (#1525) (#1531) (#1534) - Added read/write accessors for 'events' on
PollFd. (#1517)
Changed
FdSet::{contains, highest, fds}no longer require a mutable reference. (#1464)User::gecosand correspondinglibc::passwd::pw_gecosare supported on 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#1471)eventfds are supported on Android, change conditional compilation to includesys::eventfd::eventfdandsys::eventfd::EfdFlagsfor Android builds. (#1481)- Most enums that come from C, for example
Errno, are now marked as#[non_exhaustive]. (#1474) - Many more functions, mostly contructors, are now
const. (#1476) (#1492) sys::event::KEvent::filternow returns aResultinstead of being infalliable. The only cases where it will now return an error are cases where it previously would've had undefined behavior. (#1484)- Minimum supported Rust version is now 1.46.0. (#1492)
- Rework
UnixAddrto encapsulate internals better in order to fix soundness issues. No longer allows creating aUnixAddrfrom a rawsockaddr_un. (#1496) - Raised bitflags to 1.3.0 and the MSRV to 1.46.0. (#1492)
Fixed
posix_fadvisenow returns errors in the conventional way, rather than as a non-zero value inOk(). (#1538)- Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#1467)
- Fixed potential undefined behavior in
Signal::try_fromon some platforms. (#1484) - Fixed buffer overflow in
unistd::getgrouplist. (#1545)
Removed
- Removed a couple of termios constants on redox that were never actually supported. (#1483)
- Removed
nix::sys::signal::NSIG. It was of dubious utility, and not correct for all platforms. (#1484) - Removed support for 32-bit Apple targets, since they've been dropped by both Rustc and Xcode. (#1492)
- Deprecated
SockAddr/InetAddr::to_strin favor ofToString::to_string(#1495) - Removed
SigevNotifyon OpenBSD and Redox. (#1511)
[0.22.0] - 9 July 2021
Added
- Added
if_nameindex(#1445) - Added
nmountfor FreeBSD. (#1453) - Added
IpFreebindsocket option (sockopt) on Linux, Fuchsia and Android. (#1456) - Added
TcpUserTimeoutsocket option (sockopt) on Linux and Fuchsia. (#1457) - Added
renameat2for Linux (#1458) - Added
RxqOvflsupport on Linux, Fuchsia and Android. (#1455)
Changed
ptsname_rnow returns a lossily-converted string in the event of bad UTF, just likeptsname. (#1446)- Nix's error type is now a simple wrapper around the platform's Errno. This
means it is now
Into<std::io::Error>. It's alsoClone,Copy,Eq, and has a small fixed size. It also requires less typing. For example, the old enum variantnix::Error::Sys(nix::errno::Errno::EINVAL)is now simplynix::Error::EINVAL. (#1446)
Fixed
Removed
[0.21.0] - 31 May 2021
Added
- Added
getresuidandgetresgid(#1430) - Added TIMESTAMPNS support for linux (#1402)
- Added
sendfile64(#1439) - Added
MS_LAZYTIMEtoMsFlags(#1437)
Changed
- Made
forkptyunsafe, likefork(#1390) - Made
Uid,GidandPidmethodsfrom_rawandas_rawaconst fn(#1429) - Made
Uid::is_rootaconst fn(#1429) AioCbis now always pinned. Once alibc::aiocbgets sent to the kernel, its address in memory must not change. Nix now enforces that by usingstd::pin. Most users won't need to change anything, except when usingaio_suspend. See that method's documentation for the new usage. (#1440)LioCbis now constructed using a distinctLioCbBuilderstruct. This avoids a soundness issue with the oldLioCb. Usage is similar but construction now uses the builder pattern. See the documentation for details. (#1440)- Minimum supported Rust version is now 1.41.0. (#1440)
- Errno aliases are now associated consts on
Errno, instead of consts in theerrnomodule. (#1452)
Fixed
- Allow
sockaddr_llsize, as reported by the Linux kernel, to be smaller then it's definition (#1395) - Fix spurious errors using
sendmmsgwith multiple cmsgs (#1414) - Added
Errno::EOPNOTSUPPto FreeBSD, where it was missing. (#1452)
Removed
- Removed
sys::socket::accept4from Android arm because libc removed it in version 0.2.87. (#1399) AioCb::from_boxed_sliceandAioCb::from_boxed_mut_slicehave been removed. They were useful with earlier versions of Rust, but should no longer be needed now that async/await are available.AioCbs now work exclusively with borrowed buffers, not owned ones. (#1440)- Removed some Errno values from platforms where they aren't actually defined. (#1452)
[0.20.0] - 20 February 2021
Added
- Added a
passwdfield toGroup(#1338) - Added
mremap(#1306) - Added
personality(#1331) - Added limited Fuchsia support (#1285)
- Added
getpeereid(#1342) - Implemented
IntoIteratorforDir(#1333).
Changed
- Minimum supported Rust version is now 1.40.0. (#1356)
- i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated by Xcode. (#1350)
- Fixed calling
recvfromon anAddrFamily::Packetsocket (#1344)
Fixed
TimerFdnow closes the underlying fd on drop. (#1381)- Define
*_MAGICfilesystem constants on Linux s390x (#1372) - mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 (#1366)
Removed
Dir,SignalFd, andPtyMasterare no longerClone. (#1382)- Removed
SockLevel, which hasn't been used for a few years (#1362) - Removed both
CopyandClonefromTimerFd. (#1381)
[0.19.1] - 28 November 2020
Fixed
- Fixed bugs in
recvmmsg. (#1341)
[0.19.0] - 6 October 2020
Added
- Added Netlink protocol families to the
SockProtocolenum (#1289) - Added
clock_gettime,clock_settime,clock_getres,clock_getcpuclockidfunctions andClockIdstruct. (#1281) - Added wrapper functions for
PTRACE_SYSEMUandPTRACE_SYSEMU_SINGLESTEP. (#1300) - Add support for Vsock on Android rather than just Linux. (#1301)
- Added
TCP_KEEPCNTandTCP_KEEPINTVLTCP keepalive options. (#1283)
Changed
- Expose
SeekDataandSeekHoleon all Linux targets (#1284) - Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both
&[&CStr]and&[CString]as its list argument(s). (#1278) - Made
unistd::forkan unsafe funtion, bringing it in line with libstd's decision. (#1293)
Fixed
Removed
[0.18.0] - 26 July 2020
Added
- Added
fchown(2)wrapper. (#1257) - Added support on linux systems for
MAP_HUGE_SIZEfamily of flags. (#1211) - Added support for
F_OFD_*fcntlcommands on Linux and Android. (#1195) - Added
env::clearenv(): callslibc::clearenvon platforms where it's available, and clears the environment of all variables viastd::env::varsandstd::env::remove_varon others. (#1185) FsTypeinner value made public. (#1187)- Added
unistd::setfsuidandunistd::setfsgidto set the user or group identity for filesystem checks per-thread. (#1163) - Derived
Ord,PartialOrdforunistd::Pid(#1189) - Added
select::FdSet::fdsmethod 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
sendmmsgandrecvmmsgcalls (#1208) - Added support for
SCM_CREDSmessages (UnixCredentials) on FreeBSD/DragonFly (#1216) - Added
BindToDevicesocket option (sockopt) on Linux (#1233) - Added
EventFilterbitflags forEV_DISPATCHandEV_RECEIPTon OpenBSD. (#1252) - Added support for
Ipv4PacketInfoandIpv6PacketInfotoControlMessage. (#1222) CpuSetandUnixCredentialsnow implementDefault. (#1244)- Added
unistd::ttyname(#1259) - Added support for
Ipv4PacketInfoandIpv6PacketInfotoControlMessagefor iOS and Android. (#1265) - Added support for
TimerFd. (#1261)
Changed
- Changed
fallocatereturn type fromc_intto()(#1201) - Enabled
sys::ptrace::setregsandsys::ptrace::getregson x86_64-unknown-linux-musl target (#1198) - On Linux,
ptrace::writeis now anunsafefunction. Caveat programmer. (#1245) execv,execve,execvpandexecveatin::nix::unistdandrebootin::nix::sys::rebootnow returnResult<Infallible>instead ofResult<Void>(#1239)sys::socket::sockaddr_storage_to_addris no longerunsafe. So isoffset_of!.sys::socket::sockaddr_storage_to_addr,offset_of!, andErrno::clearare no longerunsafe.SockAddr::as_ffi_pair,sys::socket::sockaddr_storage_to_addr,offset_of!, andErrno::clearare no longerunsafe. (#1244)- Several
Inotifymethods now takeselfby value instead of by reference (#1244) nix::poll::ppoll:timeoutparameter 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_datatoaf_alg_iv(#1206) -
Fixed
readlink/readlinkatwhen reading symlinks longer thanPATH_MAX(#1231) -
PollFd,EpollEvent,IpMembershipRequest,Ipv6MembershipRequest,TimeVal, andIoVecare 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_sockaddrfrom the public API. (#1215) -
Removed
sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapperfrom the public API. These were previously hidden in the docs but still usable by downstream. (#1235) -
Nix no longer implements
NixPathforOption<P> where P: NixPath. Most Nix functions that acceptNixPatharguments can't do anything useful withNone. The exceptions (mountandquotactl_sync) already take explicitly optional arguments. (#1242) -
Removed
unistd::daemonandunistd::pipe2on OSX and ios (#1255) -
Removed
sys::event::FilterFlag::NOTE_EXIT_REPARENTEDandsys::event::FilterFlag::NOTE_REAPon OSX and ios. (#1255) -
Removed
sys::ptrace::ptraceon Android and Linux. (#1255) -
Dropped support for powerpc64-unknown-linux-gnu (#1266)
[0.17.0] - 3 February 2020
Added
- Add
CLK_TCKtoSysconfVar(#1177)
Changed
Fixed
Removed
- Removed deprecated Error::description from error types (#1175)
[0.16.1] - 23 December 2019
Added
Changed
Fixed
- Fixed the build for OpenBSD (#1168)
Removed
[0.16.0] - 1 December 2019
Added
-
Added
ptrace::seize(): similar toattach()on Linux but with better-defined semantics. (#1154) -
Added
Signal::as_str(): returns signal name as&'static str(#1138) -
Added
posix_fallocate. (#1105) -
Implemented
DefaultforFdSet(#1107) -
Added
NixPath::is_empty. (#1107) -
Added
mkfifoat(#1133) -
Added
User::from_uid,User::from_name,User::from_gidandGroup::from_name, (#1139) -
Added
linkat(#1101) -
Added
sched_getaffinity. (#1148) -
Added optional
Signalargument toptrace::{detach, syscall}for signal injection. (#1083)
Changed
-
sys::termios::BaudRatenow implementsTryFrom<speed_t>instead ofFrom<speed_t>. The oldFromimplementation would panic on failure. (#1159) -
sys::socket::ControlMessage::ScmCredentialsandsys::socket::ControlMessageOwned::ScmCredentialsnow wrapUnixCredentialsrather thanlibc::ucred. (#1160) -
sys::socket::recvmsgnow takes a plainVecinstead of aCmsgBufferimplementor. If you were already usingcmsg_space!, then you needn't worry. (#1156) -
sys::socket::recvfromnow returnsResult<(usize, Option<SockAddr>)>instead ofResult<(usize, SockAddr)>. (#1145) -
Signal::from_c_inthas been replaced bySignal::try_from(#1113) -
Changed
readlinkandreadlinkatto returnOsString(#1109)# use nix::fcntl::{readlink, readlinkat}; // the buffer argument of `readlink` and `readlinkat` has been removed, // and the return value is now an owned type (`OsString`). // Existing code can be updated by removing the buffer argument // and removing any clone or similar operation on the output // old code `readlink(&path, &mut buf)` can be replaced with the following let _: OsString = readlink(&path); // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following let _: OsString = readlinkat(dirfd, &path); -
Minimum supported Rust version is now 1.36.0. (#1108)
-
Ipv4Addr::octets,Ipv4Addr::to_std,Error::as_errno,ForkResult::is_child,ForkResult::is_parent,Gid::as_raw,Uid::is_root,Uid::as_raw,Pid::as_raw, andPollFd::reventsnow takeselfby value. (#1107) -
Type
&CStringfor parameters ofexec(v|ve|vp|vpe|veat)are changed to&CStr. (#1121)
Fixed
-
Fix length of abstract socket addresses (#1120)
-
Fix initialization of msghdr in recvmsg/sendmsg when built with musl (#1136)
Removed
- Remove the deprecated
CmsgSpace. (#1156)
[0.15.0] - 10 August 2019
Added
- Added
MSG_WAITALLtoMsgFlagsinsys::socket. (#1079) - Implemented
Clone,Copy,Debug,Eq,Hash, andPartialEqfor most types that support them. (#1035) - Added
copy_file_rangewrapper (#1069) - Add
mkdirat. (#1084) - Add
posix_fadvise. (#1089) - Added
AF_VSOCKtoAddressFamily. (#1091) - Add
unlinkat(#1058) - Add
renameat. (#1097)
Changed
- Support for
ifaddrsnow present when building for Android. (#1077) - Minimum supported Rust version is now 1.31.0 (#1035) (#1095)
- Now functions
statfs()andfstatfs()return result withStatfswrapper (#928)
Fixed
- Enabled
sched_yieldfor all nix hosts. (#1090)
Removed
[0.14.1] - 2019-06-06
Added
-
Macros exported by
nixmay now be imported viauseon the Rust 2018 edition without importing helper macros on Linux targets. (#1066)For example, in Rust 2018, the
ioctl_read_bad!macro can now be imported without importing theconvert_ioctl_res!macro.use nix::ioctl_read_bad; ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
Changed
- Changed some public types from reexports of libc types like
uint32_tto the native equivalents likeu32.(#1072)
Fixed
- Fix the build on Android and Linux/mips with recent versions of libc. (#1072)
Removed
[0.14.0] - 2019-05-21
Added
- Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. (#1002)
- Added
inotify_init1,inotify_add_watchandinotify_rm_watchwrappers for Android and Linux. (#1016) - Add
ALG_SET_IV,ALG_SET_OPandALG_SET_AEAD_ASSOCLENcontrol messages andAF_ALGsocket types on Linux and Android (#1031) - Add killpg (#1034)
- Added ENOTSUP errno support for Linux and Android. (#969)
- Add several errno constants from OpenBSD 6.2 (#1036)
- Added
from_stdandto_stdmethods forsys::socket::IpAddr(#1043) - Added
nix::unistd:seteuidandnix::unistd::setegidfor those platforms that do not supportsetresuidnorsetresgidrespectively. (#1044) - Added a
accesswrapper (#1045) - Add
forkpty(#1042) - Add
sched_yield(#1050)
Changed
-
PollFdevent flags renamed toPollFlags(#1024) -
recvmsgnow returns an Iterator overControlMessageOwnedobjects rather thanControlMessageobjects. This is sadly not backwards-compatible. Fix code like this:if let ControlMessage::ScmRights(&fds) = cmsg {By replacing it with code like this:
if let ControlMessageOwned::ScmRights(fds) = cmsg {(#1020)
-
Replaced
CmsgSpacewith thecmsg_spacemacro. (#1020)
Fixed
-
Fixed multiple bugs when using
sendmsgandrecvmsgwith ancillary control messages (#1020) -
Macros exported by
nixmay now be imported viauseon the Rust 2018 edition without importing helper macros for BSD targets. (#1041)For example, in Rust 2018, the
ioctl_read_bad!macro can now be imported without importing theconvert_ioctl_res!macro.use nix::ioctl_read_bad; ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
Removed
Daemon,NOTE_REAP, andNOTE_EXIT_REPARENTEDare now deprecated on OSX and iOS. (#1033)PTRACE_GETREGS,PTRACE_SETREGS,PTRACE_GETFPREGS, andPTRACE_SETFPREGShave been removed from some platforms where they never should've been defined in the first place. (#1055)
[0.13.0] - 2019-01-15
Added
- Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. (#990)
- Added support of CString type in
setsockopt. (#972) - Added option
TCP_CONGESTIONinsetsockopt. (#972) - Added
symlinkatwrapper. (#997) - Added
ptrace::{getregs, setregs}. (#1010) - Added
nix::sys::signal::signal. (#817) - Added an
mprotectwrapper. (#991)
Changed
Fixed
lutimesnever worked on OpenBSD as it is not implemented on OpenBSD. It has been removed. (#1000)fexecvenever worked on NetBSD or on OpenBSD as it is not implemented on either OS. It has been removed. (#1000)
Removed
[0.12.0] 2018-11-28
Added
- Added
FromStrandDisplayimpls fornix::sys::Signal(#884) - Added a
syncwrapper. (#961) - Added a
sysinfowrapper. (#922) - Support the
SO_PEERCREDsocket option and theUnixCredentialstype on all Linux and Android targets. (#921) - Added support for
SCM_CREDENTIALS, allowing to send process credentials over Unix sockets. (#923) - Added a
dirmodule for reading directories (wrapsfdopendir,readdir, andrewinddir). (#916) - Added
kmodmodule that allows loading and unloading kernel modules on Linux. (#930) - Added
futimensandutimesatwrappers (#944), anlutimeswrapper (#967), and autimeswrapper (#946). - Added
AF_UNSPECwrapper toAddressFamily(#948) - Added the
mode_tpublic alias withinsys::stat. (#954) - Added a
truncatewrapper. (#956) - Added a
fchownatwrapper. (#955) - Added support for
ptraceon BSD operating systems (#949) - Added
ptracefunctions for reads and writes to tracee memory and ptrace kill (#949) (#958) - Added a
acctwrapper module for enabling and disabling process accounting (#952) - Added the
time_tandsuseconds_tpublic aliases withinsys::time. (#968) - Added
unistd::execvpefor Haiku, Linux and OpenBSD (#975) - Added
Error::as_errno. (#977)
Changed
Fixed
- Made
preadvtake immutable slice of IoVec. (#914) - Fixed passing multiple file descriptors over Unix Sockets. (#918)
Removed
[0.11.0] 2018-06-01
Added
- Added
sendfileon FreeBSD and Darwin. (#901) - Added
pselect(#894) - Exposed
preadvandpwritevon the BSDs. (#883) - Added
mlockallandmunlockall(#876) - Added
SO_MARKon Linux. (#873) - Added safe support for nearly any buffer type in the
sys::aiomodule. (#872) - Added
sys::aio::LioCbas a wrapper forlibc::lio_listio. (#872) - Added
unistd::getsid(#850) - Added
alarm. (#830) - Added interface flags
IFF_NO_PI, IFF_TUN, IFF_TAPon linux-like systems. (#853) - Added
statvfsmodule to all MacOS and Linux architectures. (#832) - Added
EVFILT_EMPTY,EVFILT_PROCDESC, andEVFILT_SENDFILEon FreeBSD. (#825) - Exposed
termios::cfmakesaneon FreeBSD. (#825) - Exposed
MSG_CMSG_CLOEXECon *BSD. (#825) - Added
fchmod,fchmodat. (#857) - Added
request_code_write_int!on FreeBSD/DragonFlyBSD (#833)
Changed
DisplayandDebugforSysControlAddrnow includes all fields. (#837)ioctl!has been replaced with a family ofioctl_*!macros. (#833)io!,ior!,iow!, andiorw!has been renamed torequest_code_none!,request_code_read!,request_code_write!, andrequest_code_readwrite!respectively. These have also now been exposed in the documentation. (#833)- Enabled more
ptrace::Requestdefinitions for uncommon Linux platforms (#892) - Emulation of
FD_CLOEXECandO_NONBLOCKwas removed fromsocket(),accept4(), andsocketpair(). (#907)
Fixed
- Fixed possible panics when using
SigAction::flagson Linux (#869) - Properly exposed 460800 and 921600 baud rates on NetBSD (#837)
- Fixed
ioctl_write_int!on FreeBSD/DragonFlyBSD (#833) ioctl_write_int!now properly supports passing ac_ulongas the parameter on Linux non-musl targets (#833)
Removed
- Removed explicit support for the
bytescrate from thesys::aiomodule. Seesys::aio::AioCb::from_boxed_sliceexamples for alternatives. (#872) - Removed
sys::aio::lio_listio. Usesys::aio::LioCb::listioinstead. (#872) - Removed emulated
accept4()from macos, ios, and netbsd targets (#907) - Removed
IFF_NOTRAILERSon OpenBSD, as it has been removed in OpenBSD 6.3 (#893)
[0.10.0] 2018-01-26
Added
- Added specialized wrapper:
sys::ptrace::step(#852) - Added
AioCb::from_ptrandAioCb::from_mut_ptr(#820) - Added specialized wrappers:
sys::ptrace::{traceme, syscall, cont, attach}. Using the matching routines withsys::ptrace::ptraceis now deprecated. - Added
nix::pollmodule for all platforms (#672) - Added
nix::ppollfunction for FreeBSD and DragonFly (#672) - Added protocol families in
AddressFamilyenum. (#647) - Added the
pid()method toWaitStatusfor extracting the PID. (#722) - Added
nix::unistd:fexecve. (#727) - Expose
uname()on all platforms. (#739) - Expose
signalfdmodule on Android as well. (#739) - Added
nix::sys::ptrace::detach. (#749) - Added timestamp socket control message variant:
nix::sys::socket::ControlMessage::ScmTimestamp(#663) - Added socket option variant that enables the timestamp socket
control message:
nix::sys::socket::sockopt::ReceiveTimestamp(#663) - Added more accessor methods for
AioCb(#773) - Add
nix::sys::fallocate(#768) - Added
nix::unistd::mkfifo. (#602) - Added
ptrace::Options::PTRACE_O_EXITKILLon Linux and Android. (#771) - Added
nix::sys::uio::{process_vm_readv, process_vm_writev}on Linux (#568) - Added
nix::unistd::{getgroups, setgroups, getgrouplist, initgroups}. (#733) - Added
nix::sys::socket::UnixAddr::as_abstracton Linux and Android. (#785) - Added
nix::unistd::execveaton Linux and Android. (#800) - Added the
from_raw()method toWaitStatusfor converting raw status values toWaitStatusindependent of syscalls. (#741) - Added more standard trait implementations for various types. (#814)
- Added
sigprocmaskto the signal module. (#826) - Added
nix::sys::socket::LinkAddron Linux and all bsdlike system. (#813) - Add socket options for
IP_TRANSPARENT/BIND_ANY. (#835)
Changed
- Exposed the
mqueuemodule for all supported operating systems. (#834) - Use native
pipe2on all BSD targets. Users should notice no difference. (#777) - Renamed existing
ptracewrappers to encourage namespacing (#692) - Marked
sys::ptrace::ptraceasunsafe. - Changed function signature of
socket()andsocketpair(). Theprotocolargument has changed type fromc_inttoSockProtocol. It accepts aNonevalue for default protocol that was specified with zero usingc_int. (#647) - Made
selecteasier to use, adding the ability to automatically calculate thenfdsparameter using the newFdSet::highest(#701) - Exposed
unistd::setresuidandunistd::setresgidon FreeBSD and OpenBSD (#721) - Refactored the
statvfsmodule removing extraneous API functions and thestatvfs::vfsmodule. Additionally(f)statvfs()now return the struct directly. And the returnedStatvfsstruct now exposes its data through accessor methods. (#729) - The
addrargument tomadviseandmsyncis now*mutto better match the libc API. (#731) shm_openandshm_unlinkare no longer exposed on Android targets, where they are not officially supported. (#731)MapFlags,MmapAdvise, andMsFlagsexpose some more variants and only officially-supported variants are provided for each target. (#731)- Marked
pty::ptsnamefunction asunsafe(#744) - Moved constants ptrace request, event and options to enums and updated ptrace functions and argument types accordingly. (#749)
AioCb::Dropwill now panic if theAioCbis still in-progress (#715)- Restricted
nix::sys::socket::UnixAddr::new_abstractto Linux and Android only. (#785) - The
ucredstruct has been removed in favor of aUserCredentialsstruct that contains only getters for its fields. (#814) - Both
ip_mreqandipv6_mreqhave been replaced withIpMembershipRequestandIpv6MembershipRequest. (#814) - Removed return type from
pause. (#829) - Changed the termios APIs to allow for using a
u32instead of theBaudRateenum on BSD platforms to support arbitrary baud rates. See the module docs fornix::sys::termiosfor more details. (#843)
Fixed
- Fix compilation and tests for OpenBSD targets (#688)
- Fixed error handling in
AioCb::fsync,AioCb::read, andAioCb::write. It is no longer an error to drop anAioCbthat failed to enqueue in the OS. (#715) - Fix potential memory corruption on non-Linux platforms when using
sendmsg/recvmsg, caused by mismatchedmsghdrdefinition. (#648)
Removed
AioCb::from_boxed_slicehas been removed. It was never actually safe. Usefrom_bytesorfrom_bytes_mutinstead. (#820)- The syscall module has been removed. This only exposed enough functionality for
memfd_create()andpivot_root(), which are still exposed as separate functions. (#747) - The
Errnovariants are no longer reexported from theerrnomodule.Errnoitself is no longer reexported from the crate root and instead must be accessed using theerrnomodule. (#696) - Removed
MS_VERBOSE,MS_NOSEC, andMS_BORNfromMsFlags. These are internal kernel flags and should never have been exposed. (#814)
[0.9.0] 2017-07-23
Added
- Added
sysconf,pathconf, andfpathconf(#630 - Added
sys::signal::SigAction::{ flags, mask, handler}(#611 - Added
nix::sys::pthread::pthread_self(#591 - Added
AioCb::from_boxed_slice(#582 - Added
nix::unistd::{openat, fstatat, readlink, readlinkat}(#551) - Added
nix::pty::{grantpt, posix_openpt, ptsname/ptsname_r, unlockpt}(#556 - Added
nix::ptr::openpty(#456) - Added
nix::ptrace::{ptrace_get_data, ptrace_getsiginfo, ptrace_setsiginfo and nix::Error::UnsupportedOperation}(#614) - Added
cfmakeraw,cfsetspeed, andtcgetsid. (#527) - Added "bad none", "bad write_ptr", "bad write_int", and "bad readwrite" variants to the
ioctl!macro. (#670) - On Linux and Android, added support for receiving
PTRACE_O_TRACESYSGOODevents fromwaitandwaitpidusingWaitStatus::PtraceSyscall(#566).
Changed
- The
ioctl!macro and its variants now allow the generated functions to have doccomments. (#661) - Changed
ioctl!(write ...)intoioctl!(write_ptr ...)andioctl!(write_int ..)variants to more clearly separate those use cases. (#670) - Marked
sys::mman::{ mmap, munmap, madvise, munlock, msync }as unsafe. (#559) - Minimum supported Rust version is now 1.13.
- Removed
reventsargument fromPollFd::new()as it's an output argument and will be overwritten regardless of value. (#542) - Changed type signature of
sys::select::FdSet::containsto makeselfimmutable (#564) - Introduced wrapper types for
gid_t,pid_t, anduid_tasGid,Pid, andUidrespectively. Various functions have been changed to use these new types as arguments. (#629) - Fixed compilation on all Android and iOS targets (#527) and promoted them to Tier 2 support.
nix::sys::statfs::{statfs,fstatfs}uses statfs definition fromlibc::statfsinstead of own linux specific typenix::sys::Statfs. Also file system type constants likenix::sys::statfs::ADFS_SUPER_MAGICwere removed in favor of the libc equivalent. (#561)- Revised the termios API including additional tests and documentation and exposed it on iOS. (#527)
eventfd,signalfd, andpwritev/preadvfunctionality is now included by default for all supported platforms. (#681)- The
ioctl!macro's plain variants has been replaced with "bad read" to be consistent with other variants. The generated functions also have more strict types for their arguments. The "*_buf" variants also now calculate total array size and take slice references for improved type safety. The documentation has also been dramatically improved. (#670)
Removed
- Removed
io::Errorfromnix::Errorand the conversion fromnix::ErrortoErrno(#614) - All feature flags have been removed in favor of conditional compilation on supported platforms.
execvpeis no longer supported, but this was already broken and will be added back in the next release. (#681) - Removed
ioc_*functions and many helper constants and macros within theioctlmodule. These should always have been private and only theioctl!should be used in public code. (#670)
Fixed
- Fixed multiple issues compiling under different archetectures and OSes.
Now compiles on Linux/MIPS (#538),
Linux/PPC(#553),MacOS/x86_64,i686(#553),NetBSD/x64_64(#538),FreeBSD/x86_64,i686(#536), andAndroid(#631). bindanderrno_locationnow work correctly onAndroid(#631)- Added
nix::ptraceon all Linux-kernel-based platforms #624. Previously it was only available on x86, x86-64, and ARM, and also not on Android. - Fixed
sys::socket::sendmsgwith zero entrycmsgsparameter. (#623) - Multiple constants related to the termios API have now been properly defined for all supported platforms. (#527)
ioctl!macro now supports working with non-int datatypes and properly supports all platforms. (#670)
[0.8.1] 2017-04-16
Fixed
- Fixed build on FreeBSD. (Cherry-picked a859ee3c)
[0.8.0] 2017-03-02
Added
- Added
::nix::sys::termios::BaudRateenum to provide portable baudrate values. (#518) - Added a new
WaitStatus::PtraceEventto support ptrace events on Linux and Android (#438) - Added support for POSIX AIO (#483) (#506)
- Added support for XNU system control sockets (#478)
- Added support for
ioctlcalls on BSD platforms (#478) - Added struct
TimeSpec(#475) (#483) - Added complete definitions for all kqueue-related constants on all supported OSes (#415)
- Added function
epoll_create1and bitflagsEpollCreateFlagsin::nix::sys::epollin order to support::libc::epoll_create1. (#410) - Added
setresuidandsetresgidfor Linux in::nix::unistd(#448) - Added
getpgidin::nix::unistd(#433) - Added
tcgetpgrpandtcsetpgrpin::nix::unistd(#451) - Added
CLONE_NEWCGROUPin::nix::sched(#457) - Added
getpgrpin::nix::unistd(#491) - Added
fchdirin::nix::unistd(#497) - Added
majorandminorin::nix::sys::statfor decomposingdev_t(#508) - Fixed the style of many bitflags and use
libcin more places. (#503) - Added
ppollin::nix::poll(#520) - Added support for getting and setting pipe size with fcntl(2) on Linux (#540)
Changed
::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}switched to useBaudRateenum fromspeed_t. (#518)epoll_ctlnow could accept None as argumenteventwhen op isEpollOp::EpollCtlDel. (#480)- Removed the
badkeyword from theioctl!macro (#478) - Changed
TimeValinto an opaque Newtype (#475) kill's signature, defined in::nix::sys::signal, changed, so that the signal parameter has typeT: Into<Option<Signal>>.Noneas an argument for that parameter will result in a 0 passed to libc'skill, while aSome-argument will result in the previous behavior for the containedSignal. (#445)- The minimum supported version of rustc is now 1.7.0. (#444)
- Changed
KEventto an opaque structure that may only be modified by its constructor and theev_setmethod. (#415) (#442) (#463) pipe2now callslibc::pipe2where available. Previously it was emulated usingpipe, which meant that settingO_CLOEXECwas not atomic. (#427)- Renamed
EpollEventKindtoEpollFlagsin::nix::sys::epollin order for it to conform with our conventions. (#410) EpollEventin::nix::sys::epollis now an opaque proxy for::libc::epoll_event. The formerly public fieldeventsis now be read-only accessible with the new methodevents()ofEpollEvent. Instances ofEpollEventcan be constructed using the new methodnew()of EpollEvent. (#410)SigFlagsin::nix::sys::signalhas be renamed toSigmaskHowand its type has changed frombitflagstoenumin order to conform to our conventions. (#460)sethostnamenow takes a&strinstead of a&[u8]as this provides an API that makes more sense in normal, correct usage of the API.gethostnamepreviously did not expose the actual length of the hostname written from the underlying system call at all. This has been updated to return a&CStrwithin the provided buffer that is always properly NUL-terminated (this is not guaranteed by the call with all platforms/libc implementations).- Exposed all fcntl(2) operations at the module level, so they can be
imported direclty instead of via
FcntlArgenum. (#541)
Fixed
- Fixed multiple issues with Unix domain sockets on non-Linux OSes (#474)
- Fixed using kqueue with
EVFILT_USERon FreeBSD (#415) - Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg functions on that same OS. (#397)
- Fixed an off-by-one bug in
UnixAddr::new_abstractin::nix::sys::socket. (#429) - Fixed clone passing a potentially unaligned stack. (#490)
- Fixed mkdev not creating a
dev_tthe same way as libc. (#508)
[0.7.0] 2016-09-09
Added
- Added
lseekandlseek64in::nix::unistd(#377) - Added
mkdirandgetcwdin::nix::unistd(#416) - Added accessors
sigmask_mutandsigmasktoUContextin::nix::ucontext. (#370) - Added
WUNTRACEDtoWaitPidFlagin::nix::sys::waitfor non-linux targets. (#379) - Added new module
::nix::sys::rebootwith enumerationRebootModeand functionsrebootandset_cad_enabled. Currently for linux only. (#386) FdSetin::nix::sys::selectnow also implementsClone. (#405)- Added
F_FULLFSYNCtoFcntlArgin::nix::fcntlfor apple targets. (#407) - Added
CpuSet::unsetin::nix::sched. (#402) - Added constructor method
new()toPollFdin::nix::poll, in order to allow creation of objects, after removing public access to members. (#399) - Added method
revents()toPollFdin::nix::poll, in order to provide read access to formerly public memberrevents. (#399) - Added
MSG_CMSG_CLOEXECtoMsgFlagsin::nix::sys::socketfor linux only. (#422)
Changed
- Replaced the reexported integer constants for signals by the enumeration
Signalin::nix::sys::signal. (#362) - Renamed
EventFdFlagtoEfdFlagsin::nix::sys::eventfd. (#383) - Changed the result types of
CpuSet::is_setandCpuSet::setin::nix::schedtoResult<bool>andResult<()>, respectively. They now returnEINVAL, if an invalid argument for thefieldparameter is passed. (#402) MqAttrin::nix::mqueueis now an opaque proxy for::libc::mq_attr, which has the same structure as the oldMqAttr. The fieldmq_flagsof::libc::mq_attris readable using the new methodflags()ofMqAttr.MqAttralso no longer implementsDebug. (#392)- The parameter
msq_prioofmq_receivewith typeu32in::nix::mqueuewas replaced by a parameter namedmsg_priowith type&mut u32, so that the message priority can be obtained by the caller. (#392) - The type alias
MQdin::nix::queuewas replaced by the type aliaslibc::mqd_t, both of which are aliases for the same type. (#392)
Removed
- Type alias
SigNumfrom::nix::sys::signal. (#362) - Type alias
CpuMaskfrom::nix::shed. (#402) - Removed public fields from
PollFdin::nix::poll. (See also added methodrevents(). (#399)
Fixed
- Fixed the build problem for NetBSD (Note, that we currently do not support it, so it might already be broken again). (#389)
- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg functions on that same OS. (#397)
[0.6.0] 2016-06-10
Added
- Added
gettidin::nix::unistdfor linux and android. (#293) - Some mips support in
::nix::schedand::nix::sys::syscall. (#301) - Added
SIGNALFD_SIGINFO_SIZEin::nix::sys::signalfd. (#309) - Added new module
::nix::ucontextwith structUContext. Currently for linux only. (#311) - Added
EPOLLEXCLUSIVEtoEpollEventKindin::nix::sys::epoll. (#330) - Added
pauseto::nix::unistd. (#336) - Added
sleepto::nix::unistd. (#351) - Added
S_IFDIR,S_IFLNK,S_IFMTtoSFlagin::nix::sys::stat. (#359) - Added
clearandextendfunctions toSigSet's implementation in::nix::sys::signal. (#347) sockaddr_storage_to_addrin::nix::sys::socketnow supportssockaddr_nlon linux and android. (#366)- Added support for
SO_ORIGINAL_DSTin::nix::sys::socketon linux. (#367) - Added
SIGINFOin::nix::sys::signalfor the macos target as well asSIGPWRandSIGSTKFLTin::nix::sys::signalfor non-macos targets. (#361)
Changed
- Changed the structure
IoVecin::nix::sys::uio. (#304) - Replaced
CREATE_NEW_FDbySIGNALFD_NEWin::nix::sys::signalfd. (#309) - Renamed
SaFlagtoSaFlagsandSigFlagtoSigFlagsin::nix::sys::signal. (#314) - Renamed
ForktoForkResultand changed its fields in::nix::unistd. (#332) - Added the
signalparameter toclone's signature in::nix::sched. (#344) execv,execve, andexecvpnow returnResult<Void>instead ofResult<()>in::nix::unistd. (#357)
Fixed
- Improved the conversion from
std::net::SocketAddrtoInetAddrin::nix::sys::socket::addr. (#335)