Age | Commit message (Collapse) | Author |
|
|
|
954: Make sys::stat::mode_t public r=asomers a=jmmv
This allows using e.g. sys::stat::Mode::from_bits() without having to
pull the mode_t type from libc (which is ugly if a project is trying
to use nix exclusively to avoid libc's unsafety).
This change mimics dev_t which was already exposed as public.
Co-authored-by: Julio Merino <julio@meroh.net>
|
|
This allows using e.g. sys::stat::Mode::from_bits() without having to
pull the mode_t type from libc (which is ugly if a project is trying
to use nix exclusively to avoid libc's unsafety).
This change mimics dev_t which was already exposed as public.
|
|
953: Eliminate compiler warnings, especially on non-Linux platforms r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
948: socket: add AF_UNSPEC to AddressFamily r=asomers a=levex
Hi!
I work on a [crate](https://github.com/levex/network-bridge-rs) where it would make sense to use `AF_UNSPEC` in place of `AF_INET`, since that's the API most bridge libraries use. Unfortunately, it seems that `nix` is missing a representation for `AF_UNSPEC`. This PR adds `Unspec` to `AddressFamily`, so we can now represent `AF_UNSPEC`.
Co-authored-by: Levente Kurusa <lkurusa@acm.org>
|
|
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
|
|
950: Fix #945 - documentation fix r=Susurrus a=jabedude
Correct references to user ids to group ids. Fixes #945
Co-authored-by: Josh Abraham <sinisterpatrician@gmail.com>
|
|
Correct references to user ids to group ids.
|
|
946: Add a wrapper for utimes(2) r=asomers a=jmmv
PR #944 added wrappers for the more-modern futimens(2) and utimesat(2),
but unfortunately these APIs are not available on old-ish systems.
In particular, macOS Sierra and below don't implement them, making the
new APIs unusable. Whether we should care about such "old" systems is
debatable, but the problem is that, at the moment, this is the only
macOS version usable on Travis to test kexts and, thus, to test FUSE
file systems.
Co-authored-by: Julio Merino <julio@meroh.net>
|
|
PR #944 added wrappers for the more-modern futimens(2) and utimesat(2),
but unfortunately these APIs are not available on old-ish systems.
In particular, macOS Sierra and below don't implement them, making the
new APIs unusable. Whether we should care about such "old" systems is
debatable, but the problem is that, at the moment, this is the only
macOS version usable on Travis to test kexts and, thus, to test FUSE
file systems.
|
|
944: Add wrappers for futimens(2) and utimesat(2) r=asomers a=jmmv
Hello again!
Let's see how this looks like. I don't think there is any other way of doing this via the standard library, though I see there is a `filetime` crate in the Rust nursery to add this missing functionality. Not sure what your policy for adding features into `nix` is.
Co-authored-by: Julio Merino <jmmv@google.com>
|
|
|
|
930: Add wrapper for linux kernel module loading r=Susurrus a=bachp
- init_module and finit_module to load kernel modules
- delete_module to unload kernel modules
Co-authored-by: Pascal Bach <pascal.bach@nextrem.ch>
|
|
- init_module and finit_module to load kernel modules
- delete_module to unload kernel modules
Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch>
|
|
This macro can be used in tests to skip the test if it requires root to sucssfully run.
|
|
|
|
This avoids having both 0.4 and 0.5 (required by tempfile)
|
|
884: impl FromStr for sys::Signal r=Susurrus a=quodlibetor
This implements both ALLCAPS and lowercase full name (including SIG) and short
name.
This matches what `kill` accepts in many shells, and it also allows the `Debug`
representation of `Signal`, which means it can be round-tripped, if desired.
Co-authored-by: Brandon W Maister <quodlibetor@gmail.com>
|
|
This is a subset of what `kill` accepts in many shells. The Display
implementation matches the `Debug` representation of `Signal`.
The `FromStr` matches both Debug/Display which means it can be round-tripped,
if desired.
|
|
916: new dir module r=Susurrus a=scottlamb
Fixes #915
This is a lower-level interface than `std::fs::ReadDir`. Notable differences:
* can be opened from a file descriptor (as returned by `openat`, perhaps
before knowing if the path represents a file or directory). Uses
`fdopendir` for this, available on all Unix platforms as of
rust-lang/libc#1018.
* implements `AsRawFd`, so it can be passed to `fstat`, `openat`, etc.
* can be iterated through multiple times without closing and reopening the
file descriptor. Each iteration rewinds when finished.
* returns entries for `.` (current directory) and `..` (parent directory).
* returns entries' names as a `CStr` (no allocation or conversion beyond
whatever libc does).
Co-authored-by: Scott Lamb <slamb@slamb.org>
|
|
This is a lower-level interface than `std::fs::ReadDir`. Notable differences:
* can be opened from a file descriptor (as returned by `openat`, perhaps
before knowing if the path represents a file or directory). Uses
`fdopendir` for this, available on all Unix platforms as of
rust-lang/libc#1018.
* implements `AsRawFd`, so it can be passed to `fstat`, `openat`, etc.
* can be iterated through multiple times without closing and reopening the
file descriptor. Each iteration rewinds when finished.
* returns entries for `.` (current directory) and `..` (parent directory).
* returns entries' names as a `CStr` (no allocation or conversion beyond
whatever libc does).
|
|
900: deps: update tempfile to 3 r=Susurrus a=ignatenkobrain
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Co-authored-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
923: Fix control message *decoding* and add support for `ScmCredentials` r=asomers a=jonas-schievink
While https://github.com/nix-rust/nix/pull/918 fixed the *encoding*, the *decoding* done by the `CmsgIterator` still remained broken when multiple messages are received. However, since nix didn't support any control message that could reliably be sent twice in one `sendmsg` call, this couldn't be tested properly.
This PR addresses this by adding `SCM_CREDENTIALS` support and testing all of this by passing both an `SCM_CREDENTIALS` and a `SCM_RIGHTS` message at the same time.
I've also verified that the resulting encoding is the same as for roughly equivalent C code.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
|
|
927: Enable the select tests on powerpc and mips r=asomers a=jonas-schievink
They pass at least on my machine with QEMU, so the underlying bugs might
have been fixed.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
They pass at least on my machine with QEMU, so the underlying bugs might
have been fixed.
|
|
921: Get `SO_PEERCRED` working on all Linux targets r=asomers a=jonas-schievink
These were disabled for ARM way back in 0db6ed1a28b4fb4d408cd9b7c4dba0a79bccf1f7 and 09c00ed7d9d92db2a79baa3ed212e7e239edceb9. Try to enable them for all arches and Android as well, since the removal wasn't really explained and I see no reason why this shouldn't work.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
918: Fix passing multiple file descriptors / control messages via sendmsg r=asomers a=jonas-schievink
Fixes #464
Closes #874 because it's incorporated here
Closes #756 because it adds the test from that issue (with fixes)
Co-authored-by: alecmocatta <alec@mocatta.net>
|
|
|
|
922: Add a sysinfo wrapper r=asomers a=jonas-schievink
Closes #505
Returned values were also inspected manually to be correct.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
|
|
|
|
914: Make preadv take immutable slice of IoVecs r=asomers a=farnoy
fixes #913
I filled in the CHANGELOG, but I see that it usually links to PRs and not issues, do you want me to change it or remove and leave for you to describe?
This change seems to be strictly backwards-compatible, I didn't have to change the test for it to work.
Co-authored-by: Jakub Okoński <jakub@okonski.org>
|
|
|
|
912: Fix compilation on aarch64-unknown-linux-musl r=Susurrus a=Susurrus
trust/cross don't support this architecture, so it's non-trivial to add CI testing for this to nix, but this fixed it locally for me. Since it's not a supported platform, I haven't added anything to the CHANGELOG, since this could break before the next release.
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
|
|
911: Start the next dev cycle r=Susurrus a=Susurrus
bors r+
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
|
|
910: Specify bytes version r=Susurrus a=Susurrus
Needed to do this for the v0.11.0 release, but I missed it on my first pass through. Also updated the release notes to hopefully prevent this error in the future.
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
It can be easy to miss something that's required for a
release, so run cargo publish as a dry run to make sure
everything's set.
|
|
|
|
908: Prep for 0.11 release r=Susurrus a=Susurrus
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
909: Remove tests that weren't mine r=Susurrus a=Susurrus
cc @kristate
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
|
|
|
|
|