Age | Commit message (Collapse) | Author |
|
1216: Add UnixCredentials support on FreeBSD/DragonFly r=asomers a=myfreeweb
This allows working with `SCM_CREDS` messages, which are like `SCM_CREDENTIALS` on Linux, but slightly different (always overwritten by the kernel, contain a bit more info — euid and groups).
With this PR, it is possible to write portable code that would use the appropriate message for the platform, but one remaining quirk is that `PassCred` thing still has to be present and `cfg`'d to Linux.
Adding the `SCM_CREDS` constant to libc: https://github.com/rust-lang/libc/pull/1740
Co-authored-by: Greg V <greg@unrelenting.technology>
|
|
1227: Test on Rust stable again r=asomers a=asomers
This commit reverts eba3b516f7f76465e2fbe1c16724786144f01e8e, which
worked around a Travis CI bug that has since been fixed. The effect is
to resume testing on the latest Rust stable.
1228: Fix an "unused macro" warning on non-Linux platforms r=asomers a=asomers
cc @glebpom
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
This commit reverts eba3b516f7f76465e2fbe1c16724786144f01e8e, which
worked around a Travis CI bug that has since been fixed. The effect is
to resume testing on the latest Rust stable.
|
|
1215: Remove sys::socket::addr::from_libc_sockaddr from the public API r=posborne a=asomers
This function never should've been public, since it's basically
impossible to use directly. It's only public due to an oversight from
PR #667 .
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
1208: Support sendmmsg/recvmmsg r=asomers a=glebpom
This pull request adds `sendmmsg` and `recvmmsg` functions. They are used to send and receive multiple messages per one call. Additionally, `AsMut` implemented for both `TimeSpec` and `TimeVal`.
This is still WIP, because we need to find the best way on how to pass multiple values to *mmsg functions. Current approach with iterators doesn't seem ergonomic.
Co-authored-by: Gleb Pomykalov <gleb@lancastr.com>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
1209: Support UDP GSO and GRO on linux r=asomers a=glebpom
This PR implements support for UDP GSO and GRO on Linux. It provides the way to send/receive UDP payloads bigger than interface MTU. The goal is to improve UDP performance.
GSO was introduced in Linux 4.18, GRO in 5.3
Co-authored-by: Gleb Pomykalov <gleb@lancastr.com>
|
|
1221: Fix compilation on DragonFly (statfs) r=asomers a=mneumann
Co-authored-by: Michael Neumann <mneumann@ntecs.de>
|
|
|
|
1220: Fix RISC-V support r=asomers a=andreas-schwab
Don't try to use PTRACE_[GS]ETREGS, PTRACE_[GS]ETFPREGS or
PTRACE_[GS]ETFPXREGS on riscv64, they are legacy-only.
Co-authored-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
Don't try to use PTRACE_[GS]ETREGS, PTRACE_[GS]ETFPREGS or
PTRACE_[GS]ETFPXREGS on riscv64, they are legacy-only.
|
|
1210: impl io::{Read,Write} for PtyMaster r=asomers a=cuviper
`PtyMaster` acts like an owned file descriptor, even closing on `Drop`.
Implementing `io::Read` and `io::Write` lets it be used directly in
standard I/O operations.
Co-authored-by: Josh Stone <jistone@redhat.com>
|
|
1211: Feature/hugepage size r=asomers a=GuillaumeDIDIER
Should solve #1194 .
Co-authored-by: GuillaumeDIDIER <guillaume.didier95@hotmail.fr>
|
|
`PtyMaster` acts like an owned file descriptor, even closing on `Drop`.
Implementing `io::Read` and `io::Write` lets it be used directly in
standard I/O operations.
|
|
Closes #1194
Use git libc for development
(Remember to reset this to released version for the next nix release, once libc has released >=0.2.69)
|
|
1217: Remove a few more cases of mem::uninitialized in the tests r=asomers a=asomers
Somehow I didn't noticed these in PR #1158, probably because they're
only built on Linux.
1218: Update the FreeBSD CI image to 11.3. r=asomers a=asomers
11.2 is EOL.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
11.2 is EOL.
|
|
1207: Add select::FdSet::fds() method r=asomers a=zombiezen
To be more consistent with most Rust APIs and enable cloning of the iterator, I made `FdSet::contains` operate on an immutable borrow instead of a mutable one by copying the set. If this is not desirable, I can roll that back from this PR and focus purely on the `fds()` method.
Co-authored-by: Ross Light <ross@zombiezen.com>
|
|
Somehow I didn't noticed these in PR #1158, probably because they're
only built on Linux.
|
|
1206: Fix unaligned casting of cmsg data to af_alg_iv r=asomers a=glebpom
Casting a pointer to `cmsg_data` to `af_alg_iv` is incorrect since it's not properly aligned. As of the [`cmsg` man page](http://man7.org/linux/man-pages/man3/cmsg.3.html) "Applications should not cast it to a pointer type matching the payload, but should instead use memcpy(3) to copy data to or from a suitably declared object."
Co-authored-by: Gleb Pomykalov <gleb@lancastr.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1214: Fix UB in getsockopt r=asomers a=asomers
The old code tried to zero-initialize an enum for which 0 is not a valid
value. That worked for older compilers, but triggers a panic with Rust
1.44.0. The correct technique is to use mem::MaybeUninit.
Fixes #1212
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This function never should've been public, since it's basically
impossible to use directly. It's only public due to an oversight from
PR #667 .
|
|
The old code tried to zero-initialize an enum for which 0 is not a valid
value. That worked for older compilers, but triggers a panic with Rust
1.44.0. The correct technique is to use mem::MaybeUninit.
Fixes #1212
|
|
|
|
|
|
1195: Implement open file descriptor locks in fcntl r=asomers a=andrenth
Hello
This PR updates libc to 0.2.68, which adds the `F_OFD_*` fcntl commands, and uses them in `nix::fcntl::fcntl`.
Co-authored-by: Andre Nathan <andre@digirati.com.br>
|
|
|
|
1205: unistd: avoid infinite loop caused by reserve_double_buffer_size r=asomers a=stevendanna
Functions such as Group::from_anything use reserve_double_buffer_size
in a loop, expecting it to return ERANGE if the passed limit is
reached.
However, the returned vector is passed as pointer to a libc function
that writes data into memory and doesn't update the length of the
Vec. Because of this, the previous code would never return ERANGE and
the calling loops would never exit if they hit a case where the
required buffer was larger than the maximum buffer.
This fixes the problem by checking the capacity rather than the
length.
Signed-off-by: Steven Danna <steve@chef.io>
Co-authored-by: Steven Danna <steve@chef.io>
|
|
Functions such as Group::from_anything use reserve_double_buffer_size
in a loop, expecting it to return ERANGE if the passed limit is
reached.
However, the returned vector is passed as pointer to a libc function
that writes data into memory and doesn't update the length of the
Vec. Because of this, the previous code would never return ERANGE and
the calling loops would never exit if they hit a case where the
required buffer was larger than the maximum buffer.
This fixes the problem by checking the capacity rather than the
length.
Signed-off-by: Steven Danna <steve@chef.io>
|
|
1198: Enable getregs/setregs on x86_64 musl r=asomers a=coord-e
Hi, I needed `ptrace::getregs` in my project. I noticed that they're only enabled on glibc while they can be compiled with musl. This PR enables getregs/setregs on x86_64 musl libc environment.
Co-authored-by: coord.e <me@coord-e.com>
|
|
Update CHANGELOG for #1198
|
|
|
|
1201: Fix fallocate signature r=asomers a=DianaNites
Fixes #1200
Co-authored-by: Diana <5275194+DianaNites@users.noreply.github.com>
|
|
Untested, done on github.
Fixes #1200
|
|
|
|
|
|
|
|
|
|
|
|
|