summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
AgeCommit message (Collapse)Author
2021-06-12Remove Errno consts from platforms where they aren't defined.Alan Somers
Previously these were aliases for UnknownErrno. Now, they're compile errors.
2021-06-06Add a wrapper around if_nameindexNoah
2021-05-31Release v0.21.0Alan Somers
2021-05-31Add getresuid() and getresgid() to unistdJeryl Vaz
2021-05-31Merge #1437bors[bot]
1437: Add MS_LAZYTIME flag r=asomers a=ManaSugi MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode timestamps (atime, mtime, ctime) by maintaining these changes only in memory. MS_LAZYTIME is available from `libc` v0.2.95. Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com> Co-authored-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-05-31Add MS_LAZYTIME flagManabu Sugimoto
MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode timestamps (atime, mtime, ctime) by maintaining these changes only in memory. Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-05-30Adapt aio to the world of async/await, and fix some potential unsoundness.Alan Somers
* libc::aiocb must not be moved while the kernel has a pointer to it. This change enforces that requirement by using std::pin. * Split LioCbBuilder out of LioCb. struct LioCb relied on the (incorrect) assumption that a Vec's elements have a stable location in memory. That's not true; they can be moved during Vec::push. The solution is to use a Vec in the new Builder struct, but finalize it to a boxed slice (which doesn't support push) before allowing it to be submitted to the kernel. * Eliminate owned buffer types. mio-aio no longer uses owned buffers with nix::aio. There's little need for it in the world of async/await. I'm not aware of any other consumers. This substantially simplifies the code.
2021-05-28Add pull request link to changelogTom Dryer
2021-05-28Add sendfile64Tom Dryer
`sendfile64` is a Linux-specific call with a wider type for the `offset` argument than `sendfile`. This is largely a copy of the existing `sendfile` function and associated test.
2021-05-13Use https instead of httpRyan Zoeller
2021-04-26constify from_raw and as_raw for Uid, Gid and PidWolfgang Bumiller
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-04-08Merge #1402bors[bot]
1402: Support TIMESTAMPNS r=asomers a=WiSaGaN This adds support of linux TIMESTAMPNS. The code is mostly copied paste from https://github.com/nix-rust/nix/pull/663 Co-authored-by: Lu, Wangshan <wisagan@gmail.com>
2021-04-08Support TIMESTAMPNS for linuxLu, Wangshan
2021-04-07Fix spurious errors using `sendmmsg` with multiple cmsgsYuchen Wu
Before this fix, the buffer that holds cmsgs may move due to the resize() call. That causes msg_hdr pointing to invalid memory, which ends up breaking the sendmmsg() call, resulting in EINVAL. This change fixes it by avoiding re-allocating the buffers.
2021-03-05Allow sockaddr_ll size mismatchJustin Ossevoort
Apparently the Linux kernel can return smaller sizes when the value in the last element of sockaddr_ll (`sll_addr`) is smaller than the declared size of that field.
2021-03-04Remove accept4 on Android armAlan Somers
libc removed it in version 0.2.87. https://github.com/rust-lang/libc/pull/2079
2021-02-20pty: Make forkpty() unsafeTavian Barnes
After the child returns from a fork() of a multi-threaded process, it is undefined behaviour to call non-async-signal-safe functions according to POSIX. Since forkpty() is implemented in terms of fork(), those restrictions should apply to it too.
2021-02-20[skip ci] add a new CHANGELOG sectionAlan Somers
2021-02-20Prepare for release 0.20.0Alan Somers
2021-02-20[skip ci] reformat CHANGELOGAlan Somers
2021-02-20Merge branch 'master' into timerfd-file-leakAlan Somers
2021-02-16Close file descriptor on drop in TimerFdChristopher Dumoulin
2021-02-15Log x32 fixesнаб
2021-02-15Dir: Implement `IntoIterator` for `Dir`William Manley
This is useful to allow returning an iterator based on a directory iterator without needing a self-referential struct.
2021-02-13Merge #1382bors[bot]
1382: Don't implement Clone on Dir, SignalFd, and PtyMaster r=asomers a=asomers Since they close their file descriptors on Drop, it's almost impossible to use Clone without creating a double-close situation. Also, check for EBADF in SignalFd::drop and Dir::drop. Co-authored-by: Alan Somers <asomers@gmail.com>
2021-02-07Don't implement Clone on Dir, SignalFd, and PtyMasterAlan Somers
Since they close their file descriptors on Drop, it's almost impossible to use Clone without creating a double-close situation. Also, check for EBADF in SignalFd::drop and Dir::drop.
2021-02-07add passwords to GroupsBen Linsay
2021-02-02Define *_MAGIC filesystem constants on Linux s390xJakob Naucke
Since rust-lang/libc is now using the correct data type on s390x (c_uint) for statfs constants, the s390x exemptions in the statfs MAGIC definitions like EXT4_SUPER_MAGIC can be removed. Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-01-04Add support for when receiving packetsJustin Ossevoort
2020-12-19unistd: Add getpeereid(3)William Woodruff
Closes #1339.
2020-12-19Add fuchsia supportAmanda Tait
Allow nix to compile on Fuchsia by conditionally avoiding libc functionality that does not exist for Fuchsia.
2020-12-15feat(sys): High-level personality(2) wrappersWilliam Woodruff
Adds a high level `Persona` bitflags enum, as well as `personality::get()` and `personality::set()` for interacting with `libc::personality()`.
2020-12-14Remove SockLevelAlan Somers
It's been unused since PR #133
2020-12-10Raise MSRV to 1.40.0Alan Somers
This will shortly be needed for Fuchsia support.
2020-12-06Demote i686-apple-darwin to Tier 2Alan Somers
It's deprecated by Xcode, and the version of Xcode installed by Cirrus-CI doesn't include 32 bit libraries.
2020-11-28[skip ci] Add v0.19.1 release notes to CHANGELOGAlan Somers
2020-11-28[skip ci] update CHANGELOG for PR #1341Alan Somers
2020-10-13Add wrapper for mremapJim Newsome
2020-10-12Merge #1307bors[bot]
1307: Release v0.19.0. r=kamalmarhubi a=qwandor-google I'd like to get a new version of the crate released including #1301 so that I can get the vsock crate building on Android, and get both imported into the Android tree. Co-authored-by: Andrew Walbran <qwandor@google.com>
2020-10-10Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.Yoav Steinberg
2020-10-06Release v0.19.0.Andrew Walbran
2020-10-04Support vsock on Android as well as Linux.Andrew Walbran
Fix deprecation warning from libc update.
2020-10-03Merge #1300bors[bot]
1300: Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support r=asomers a=voidc Closes #1249. I think @jabedude was working on this, but as there was no progress since May I went ahead and implemented it myself. I'm not completely sure about the cfg gates. Could we enable the functions for more targets? I'm also open for suggestions of better names for the new functions. Co-authored-by: Dominik Stolz <d.stolz@tum.de>
2020-10-03Merge #1293bors[bot]
1293: Mark nix::unistd::fork as unsafe. r=asomers a=vi Fix tests. No change in documentation. Resolves #1030. Don't forget to bump major version number to `0.19`. Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
2020-10-03Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP supportDominik Stolz
2020-09-28Added clock_gettime, clock_getres, clock_settime, clock_getcpuclockidDaniil Bondarev
2020-09-20Add CHANGELOG.md entry about unsafe fork.Vitaly _Vi Shukela
2020-08-22Merge branch 'master' into musl_seekAlan Somers
2020-08-22Add changelog entryAmanieu d'Antras
2020-08-22Merge #1278bors[bot]
1278: Allow both &[CString] and &[&CStr] for sequence args in unistd r=asomers a=youknowone I am new to this project, so I wonder this kind of change is acceptable for the project or not. I agree taking `&[&CStr]` is the ideal way for the functions. But unfortunately, when users generate `CString`s from `&str`, they may get `&[CString]` rather than `&[&CStr]` Unlike single `CString` to `&CStr` argument, there is no easy way to convert `&[CString]` to `&[&CStr]` without creating new vector. By changing the type from `&[&CStr]` to `&[AsRef<CStr>]`, the args now can take both `&[CString]` and `&[&CStr]` without changing that much from nix. Co-authored-by: Jeong YunWon <jeong@youknowone.org>