Age | Commit message (Collapse) | Author |
|
|
|
|
|
Remove the example Cargo.toml entry from README.md because it's obvious,
and it creates extra work at release time.
|
|
1538: posix_fadvise doesn't return -1 as sentinel value r=asomers a=ocadaruma
## Summary
- `posix_fadvise(2)` does return error number directly (i.e. not through `errno`)
* refs: https://man7.org/linux/man-pages/man2/posix_fadvise.2.html , https://man7.org/linux/man-pages/man2/posix_fadvise.2.html
- However `posix_fadvise`-binding uses `Errno::result` to translate the error now, which is mis-use.
1545: Fix memory unsafety in unistd::getgrouplist r=asomers a=asomers
Fixes #1541
1546: Revert "Expose SockAddr::from_raw_sockaddr" r=asomers a=asomers
This reverts commit ed43d2c65e65dd68c9cf2dcf06f5ec45a44aaccd.
As discussed in #1544 the API of this function needs to change. For
now, revert the PR that made it public, because it has not yet been
included in any release.
Co-authored-by: Haruki Okada <ocadaruma@gmail.com>
Co-authored-by: vitalyd <vitalyd@gmail.com>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
libc::posix_fadvise returns errnos directly rather than in the errno
variable.
|
|
This reverts commit ed43d2c65e65dd68c9cf2dcf06f5ec45a44aaccd.
As discussed in #1544 the API of this function needs to change. For
now, revert the PR that made it public, because it has not yet been
included in any release.
|
|
Fixes #1541
|
|
1536: Lower limits in setrlimit example r=asomers a=rtzoeller
The current values causes the doc test to fail on Fedora 34 for unprivileged users. The values can be lowered without meaningfully changing the example.
Previously the example failed with EPERM.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
[skip ci] tweak CHANGELOG formatting
|
|
|
|
The current value causes the doc test to fail on Fedora 34 for
unprivileged users.
|
|
1517: Fix #411 - Provide accessors for 'events' in PollFd r=asomers a=cemeyer
Test: `cargo test --test test test_pollfd_events`
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
Test: `cargo test --test test test_pollfd_events`
|
|
1534: Actually connect the mman tests to the build r=asomers a=asomers
This was an oversight from #1306.
Reported-by: `@ocadaruma`
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This was an oversight from #1306.
Reported-by: @ocadaruma
|
|
1531: mman add MAP_CONCEAL mmap flag for openbsd r=asomers a=devnexen
Co-authored-by: David Carlier <devnexen@gmail.com>
|
|
|
|
1532: mman MAP_JIT flag documentation. r=asomers a=devnexen
Co-authored-by: David Carlier <devnexen@gmail.com>
|
|
1522: mman mod adding MAP_ALIGNED_SUPER flag for freebsd. r=asomers a=devnexen
Co-authored-by: David Carlier <devnexen@gmail.com>
|
|
Clippy cleanup
|
|
And this time, start running Clippy in CI
|
|
|
|
|
|
Set libc version to 0.2.102
|
|
|
|
1496: Rework UnixAddr to fix soundness issues r=asomers a=coolreader18
Fixes #1494
I went with making `sun_path` always nul-terminated since that just seems to make things easier, since (at least according to linux man pages) `sockaddr_un`s returned by the kernel will always be nul-terminated.
Co-authored-by: Noa <33094578+coolreader18@users.noreply.github.com>
|
|
1525: mman: add MAP_EXCL flag for freebsd. r=asomers a=devnexen
Co-authored-by: David Carlier <devnexen@gmail.com>
|
|
|
|
1526: Update the FreeBSD CI image r=asomers a=asomers
FreeBSD 11.4 will be EoL on 30-Sept
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
FreeBSD 11.4 will be EoL on 30-Sept
|
|
1524: Add docs for most sockopts r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
This macro is not exported outside of the crate, so there's no danger.
|
|
1520: mman module netbsd additions. r=asomers a=devnexen
1523: mman: add MAP_STACK to openbsd which is needed … r=asomers a=devnexen
…to created stack mappings
Co-authored-by: David Carlier <devnexen@gmail.com>
|
|
|
|
|
|
1521: Prevent buffer over-read in getgroups() r=asomers a=blyxxyz
An edge case I found in another wrapper around `getgroups()`. `@jhscheer` pointed me to this implementation which had the same issue.
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
|
|
|
|
1509: Allow Android to use timerfd r=asomers a=rtzoeller
This is a continuation of #1336 which also enables the timerfd tests.
```
running 3 tests
test sys::test_timerfd::test_timerfd_unset ... ok
test sys::test_timerfd::test_timerfd_oneshot ... ok
test sys::test_timerfd::test_timerfd_interval ... ok
```
1515: Add IP_TTL/IPV6_UNICAST_HOPS SockOpts r=asomers a=cemeyer
Test: `cargo test --test test test_ttl_opts`
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
1518: Make Errno::result() inline r=asomers a=linkmauve
This makes the success case a single `cmpl $-1, %eax` followed with a non-taken conditional jump, instead of the current `callq` which is always taken.
I have not benchmarked the difference, but it is an obvious improvement.
Co-authored-by: linkmauve <linkmauve@linkmauve.fr>
|
|
This makes the success case a single `cmpl $-1, %eax` followed
with a non-taken conditional jump, instead of the current `callq`
which is always taken.
I have not benchmarked the difference, but it is an obvious
improvement.
|
|
Test: `cargo test --test test test_ttl_opts`
|
|
1292: Support `TCP_MAXSEG` TCP Maximum Segment Size socket options r=asomers a=eaon
Found myself in a situation where I needed to advertise a specific MSS. Thought this crate is the appropriate place for this feature (especially since the `TCP_MAXSEG` const was exposed through it before), so here goes.
Actual change is of course tiny but it comes with a test. Happy to make changes, especially since I need to do more research on which platforms this works.
Co-authored-by: eaon <eaon@posteo.net>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
1516: Implement AsRawFd for PollFd r=asomers a=cemeyer
Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.
Subsumes #1147, #1286. Closes #1146.
Test: `cargo test --test test test_pollfd_fd`
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
1317: test_af_alg_aead waits indefinitely r=asomers a=ritzk
Starting with linux kernel 4.9, the crypto interface changed slightly such that the authentication tag memory is only needed in the output buffer for encryption and in the input buffer for decryption. Thus, we have fewer bytes to read than the buffer size. Do not block on read.
alternatively, we can adjust the decrypted buffer size based on kernel version ( ">= 4.9") to not include auth_size .
```
if kernel_version >= "4.9":
let mut decrypted = vec![0u8; payload_len + (assoc_size as usize) ];
```
before
```
test sys::test_socket::test_af_alg_aead ... test sys::test_socket::test_af_alg_aead has been running for over 60 seconds
```
after
```
test sys::test_socket::test_af_alg_aead ... ok
```
Co-authored-by: Ritesh Khadgaray <khadgaray@gmail.com>
|
|
Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.
Subsumes #1147, #1286. Closes #1146.
Test: `cargo test --test test test_pollfd_fd`
|
|
1514: Add support for IP_RECVERR r=asomers a=cemeyer
This pull request adds support for setting the `IP_RECVERR` (and corresponding `IPV6_RECVERR`) sockopt, and then decoding the resulting control messages from `recvmsg()`. It is a Linux-specific API.
This PR extends #1161 by:
* Making the address associated with a `IpvXRecvErr` control message optional (`recvmsg` documentation claims it is not provided for some kinds of error), per `@WGH-.`
* Adding basic tests for both IPv4 and IPv6 (blat a UDP packet at a hopefully-unoccupied port on localhost and observe ICMP port unreachable).
* Adding a Changelog entry.
I added some trivial doc comments on the `ControlMessageOwned` variants, but I'm not sure exactly what documentation you had in mind earlier on #1161.
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
Setting these options enables receiving errors, such as ICMP errors from
the network, via `recvmsg()` with `MSG_ERRQUEUE`.
Adds new `Ipv{4,6}RecvErr` variants to `ControlMessageOwned`. These
control messages are produced when `Ipv4RecvErr` or `Ipv6RecvErr`
options are enabled on a raw or datagram socket.
New tests for the functionality can be run with `cargo test --test test
test_recverr`.
This commit builds on an earlier draft of the functionality authored by
Matthew McPherrin <git@mcpherrin.ca>.
|