Age | Commit message (Collapse) | Author |
|
It's been unused since PR #133
|
|
On Cirrus CI, this test would sometimes fail, probably due to pause
being awoken by SIGRT_1. sigwait is a superior alternative to pause.
Fixes #1354
|
|
Travis has been super-slow lately (> 6 hours per build). Cirrus is much
faster: about 20 minutes. Cirrus also has slightly better test
coverage, mainly because it doesn't use SECCOMP.
Also,
* Fix the Redox CI build. The old Travis configuration didn't actually
build for Redox, so we never noticed that Redox can't be built with a
stable compiler. Thanks to @coolreader18 for finding this.
* Disable the udp_offload tests on cross-tested platforms. These tests
are failing with ENOPROTOOPT in Cirrus-CI. I suspect it's due to a
lack of support in QEMU. These tests were skipped on Travis because
its kernel was too old.
* Fix require_kernel_version on Cirrus-CI. Cirrus reports the Linux
kernel version as 4.19.112+, which the semver crate can't handle.
* Fix test_setfsuid on Cirrus. When run on Cirrus, it seems like the
file in /tmp gets deleted as soon as it's closed. Probably an
overzealous temporary file cleaner. Use /var/tmp, because no
temporary file cleaner should run in there.
* Skip mount tests on Cirrus. They fail for an unknown reason.
Issue #1351
* Skip the AF_ALG tests on Cirrus-CI
Issue #1352
|
|
|
|
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
|
|
1296: DragonFlyBSD: use __errno_location now provided by the libc crate r=asomers a=cmusser
Dragonfly recently (in Dfly 5.8) added an `__errno_location()` function to make it easy to access the thread-local `errno` variable. This has been exposed in rust-libc as of 0.2.77. This PR uses that functionality instead of the locally compiled C language shim, which the PR removes. One issue is backwards compatibilty. It requires 0.2.77 libc and DragonFly 5.8. Not sure how to gracefully handle older DragonFly versions, although I'm also not sure doing so is worth it.
Co-authored-by: Chuck Musser <cmusser@sonic.net>
|
|
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>
|
|
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>
|
|
|
|
|
|
This obviates the need for the C language shim for this variable,
which this commit removes.
|
|
Fix tests. No change in documentation.
Resolves #1030.
|
|
(https://github.com/rust-lang/libc/pull/1870)
Denied lint being overridden instead of unsafe block removed
to preserve compatibility with old `libc` versions.
|
|
|
|
These were previously missing on musl and mips targets because of
missing definitions in the libc crate.
|
|
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>
|
|
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>
|
|
Removed support for timerfd on Android as it seems to have been deprecated? See https://android.googlesource.com/platform/development/+/73a5a3b/ndk/platforms/android-20/include/sys/timerfd.h or https://github.com/rust-lang/libc/issues/1589
Removed the public status of `TimerSpec`, as it should not be exposed to the user.
Implemented `FromRawFd` for `TimerFd` as it already implements `AsRawFd`.
Addressed comments from the latest code review:
- Removed upper bound assertions on timer expirations in tests.
- Made the main example runnable and added code to show how to wait for the timer.
- Refactored `ClockId` to use `libc_enum`.
- Added comments for all public parts of the module.
- Wrapped to 80 cols.
- Changed the size of the buffer in the tests to the minimum required.
* Ran rustfmt.
* Added a `From` implementation for `libc::timespec` -> `TimeSpec`.
* Reworked the example with the new changes and changed the timer from 5 to 1 second.
* Added a constructor for a 0-initialized `TimerSpec`.
* Added a new method to get the timer configured expiration (based on timerfd_gettime).
* Added an helper method to unset the expiration of the timer.
* Added a `wait` method to actually read from the timer.
* Renamed `settime` into just `set`.
* Refactored the tests and added a new one that tests both the `unset` and the `get` method.
Modified CHANGELOG.
|
|
The commit https://github.com/nix-rust/nix/pull/1222 added the very
useful Ipv4PktInfo to allow `sendmsg` to define the origin of the ip.
Unfortunattely, it didn't add the struct to Android target devices as
well. This commit adds the `target_os = "android"` checks on the same
place to allow the compilation to work for the following archs tested:
- `cross build --target aarch64-linux-android`
- `cross build --target x86_64-linux-android`
- `cross build --target armv7-linux-androideabi`
Also introduces iOS to allow using on libs for those platforms
|
|
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
|
|
|
|
OFD lock functions don't work as expected on overlayfs, which is a type
of union file system. And OVERLAYFS_SUPER_MAGIC isn't defined on musl,
at least not yet.
|
|
|
|
|
|
It was only marked unsafe because it did a pointer cast, but that
particular pointer cast is always allowed by C.
|
|
All it does is assign a value to a thread-local int. There's nothing
unsafe about that.
|
|
It's small and `Copy`, so pass by value is more efficient. This is
technically a breaking change, but most code should compile without
changes.
|
|
|
|
|
|
It already fully validated its arguments, so there's no need for it to
be `unsafe`.
|
|
Reported-by: Clippy
|
|
This adds Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage,
allowing these to be used with sendmsg/sendmmsg.
This change contains the following squashed commits:
Add Ipv{4,6}PacketInfo to ControlMessage.
Add documentation links to Ipv{4,6}PacketInfo
Add changelog entry for Ipv{4,6}PacketInfo
Add link to PR in the Changelog.
Add extra build environments.
Add tests for Ipv{4,6}PacketInfo.
Swap #[test] and #[cfg]
The CI appears to be running the test, even though it's not cfg'd for
that platform. I _think_ this might be due to these being in the wrong
order. So lets try swapping them.
s/freebsd/netbsd/ for Ipv4PacketInfo
netbsd supports in_pktinfo, not freebsd.
Fix the cfg for Ipv{4,6}PacketInfo usage.
Ah, I see what I did wrong. I had fixed the definitions, but I had the
wrong cfg() in the usage. This has the usage match the definitions.
Change SOL_IPV6 to IPPROTO_IPV6.
FreeBSD doesn't have SOL_IPV6, but does have IPPROTO_IPV6, and the two
constants are defined as being equal. So change to use IPPROTO_IPV6.
Skip Ipv6PacketInfo test if v6 is not available.
If IPv6 is not available, then when we try and bind to ip6-localhost,
we'll get a EADDRNOTAVAIL, so skip the test.
This should mean that the test will run on any machine that has a v6
loopback address.
More architecture cfg() fixes.
These all need to be the same, and they were not. Make them them all
the same. Attempt III.
Fix up mismatched cfg's again.
Take IV. Make sure the cfg's that use a enum variant match the enum
definition.
|
|
1255: Remove several deprecated constants and functions r=asomers a=asomers
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
|
|
|