Age | Commit message (Collapse) | Author |
|
|
|
* Fix race conditions in the tests. Two tests were grabbing a mutex but
immediately dropping it. Thank you, Clippy.
* Remove vestigial Windows support. Remove some code added to support
Windows in 2015. Nix is no longer intended to ever run on Windows.
* Various other minor Clippy lints.
|
|
* 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.
|
|
Suppress a build warning on Fuchsia
|
|
Beginning with 1.41.0, Rust considers it UB to zero-initialize a
function pointer, even if you try to hide it behind `mem::MaybeUninit`.
Suppress this warning to fix the build until we come up with a better
permanent solution.
Issue #1441
|
|
It's not available from libc on that platform.
|
|
`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.
|
|
|
|
|
|
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>
|
|
1414: Fix corrupted sendmmsg() call r=asomers a=eaufavor
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.
Co-authored-by: Yuchen Wu <yuchen@cloudflare.com>
|
|
|
|
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.
|
|
The homegrown macro was fine in 2016, but at some point it technically
became UB. The memoffset crate does the same thing, but avoids UB when
using rustc 1.51.0 or later.
Fixes #1415
|
|
|
|
Co-authored-by: Dominik Hassler <hadfl@omnios.org>
Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
|
|
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.
|
|
libc removed it in version 0.2.87.
https://github.com/rust-lang/libc/pull/2079
|
|
|
|
|
|
|
|
|
|
|
|
1387: fix(unsafe): remove unnecessary unsafe r=asomers a=matu3ba
libc 0.2.82 exposes status signals with macros generating safe functions
Co-authored-by: Jan Philipp Hafer <jan.hafer@rwth-aachen.de>
|
|
closes #1380
libc 0.2.82 exposes status signals with macros generating safe functions
|
|
|
|
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>
|
|
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.
|
|
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>
|
|
|
|
Allow nix to compile on Fuchsia by conditionally avoiding libc
functionality that does not exist for Fuchsia.
|
|
Adds a high level `Persona` bitflags enum, as well as `personality::get()`
and `personality::set()` for interacting with `libc::personality()`.
|
|
It's been unused since PR #133
|
|
There were two problems discovered with the `recvmmsg(2)` implementation
that this changeset attempts to fix:
1. As mentioned in nix-rust/issues/1325, `recvmmsg(2)` can return fewer
messages than requested, and
2. Passing the return value of `recvmmsg(2)` as the number of bytes in
the messages received is incorrect.
This changeset incorporates the proposed fix from nix-rust/issues/1325,
as well as passing the correct value (`mmsghdr.msg_len`) for the number
of bytes in a given message.
|
|
See https://github.com/rust-lang/libc/issues/1848 in which this type is
changing from i32 to i64; the change is being announced via this
deprecation.
|
|
See https://github.com/rust-lang/libc/issues/1501 in which this type's
trait implementations are being removed; the change is being announced
via this deprecation.
|
|
Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive
settings can be set globally, but not per-socket (see e.g.
https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this).
Since it seems that NetBSD and DragonflyBSD have these settings, it makes more
sense to only exclude them on OpenBSD rather than include them on (pretty much
every) other operating systems.
|
|
|
|
|
|
1303: Renable the ScmTimestamp test on FreeBSD i386 r=posborne a=asomers
The relevant bug was fixed in 11.3-RELEASE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
Fix deprecation warning from libc update.
|
|
The relevant bug was fixed in 11.3-RELEASE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
|
|
|
|
|
|
(https://github.com/rust-lang/libc/pull/1870)
Denied lint being overridden instead of unsafe block removed
to preserve compatibility with old `libc` versions.
|
|
1282: `ioctl-number.rst` moved. Update the link. r=asomers a=SolraBizna
<!-- This space deliberately left blank -->
Co-authored-by: Solra Bizna <solra@bizna.name>
|
|
Currently the SockProtocol enum is rather scarce. This commit adds the Netlink protocols
defined in netlink(7) to the SockProtocol enum allowing us to use the Nix socket library for
more indepth Netlink work
|
|
fchmod should be fchmodat
Signed-off-by: ed neville <ed@s5h.net>
|
|
|
|
1224: Update the Linux CI environment to Ubuntu Bionic r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
Co-authored-by: Alan Somers <asomers@axcient.com>
|