1815: Handle unacceptable name gracefully in {User,Group}::from_name r=asomers a=magicant
Calling `unwrap` on the result of `CString::new` may cause the current thread to panic, which is a bit surprising undocumented behavior. It would be more reasonable to treat the erroneous name as a non-existing user or group.
Co-authored-by: WATANABE Yuki <magicant@wonderwand.net>
Calling `unwrap` on the result of `CString::new` may cause the current
thread to panic, which is a bit surprising undocumented behavior. It
would be more reasonable to treat the erroneous name as a non-existing
user or group.
1810: Eliminate Cargo.lock.msrv r=rtzoeller a=asomers
We no longer need it since updating our MSRV to 1.56.1.
Issue #1809
Co-authored-by: Alan Somers <asomers@gmail.com>
1805: Add `line` field to `Termios` struct r=rtzoeller a=tertsdiepraam
Fixes https://github.com/nix-rust/nix/issues/1802
I have to admit I'm not really sure how to test this properly, so if that's necessary I require some help :)
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
1806: Remove MSRV-related workaround for doc aliases r=asomers a=rtzoeller
Remove the MSRV-related workaround added by #1693, since we now can use doc aliases in all supported versions of Rust.
Closes#1674.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1801: fix microsecond calculation for TimeSpec r=rtzoeller a=StephanvanSchaik
The implementation of `num_microseconds()` for `TimeSpec` returns the number of seconds not microseconds, as it divided by the wrong factor. The number of nanoseconds should be divided by 1000 to get the number of microseconds.
Co-authored-by: S.J.R. van Schaik <stephan@synkhronix.com>
1792: Raise the MSRV to 1.56.1 r=rtzoeller a=asomers
Nix's code hasn't changed. However, Serde accidentally raised its MSRV
to 1.51.0 in a patch release, due to a Cargo bug. They don't plan to
change it back. Nix does not depend on Serde, but it's used by
cargo-hack, which we build as part of our CI process. So we need to
either raise our MSRV, or else install a separate toolchain during CI
just to build cargo-hack.
https://github.com/serde-rs/serde/issues/2255
Co-authored-by: Alan Somers <asomers@gmail.com>
cargo-release automatically incremented the master branch's version
post-release. I don't like that, because it makes it harder for
consumers, especially indirect consumers, to use a `[patch.crates-io]`
section in their Cargo.toml files.
Also, configure cargo-release not to do this again in the future.
1794: Reenable cargo-hack in CI r=rtzoeller a=asomers
But instead of building it from source, download pre-built binaries.
Co-authored-by: Alan Somers <asomers@gmail.com>
1776: Add support for the IP_SENDSRCADDR control message r=rtzoeller a=matttpt
This control message is available on FreeBSD, NetBSD, and OpenBSD. When used with `sendmsg`, it sets the IPv4 source address. This adds support through a new `ControlMessage::Ipv4SendSrcAddr` variant that complements `ControlMessageOwned::Ipv4RecvDstAddr`.
A few notes:
* `IP_SENDSRCADDR` is actually just an alias for `IP_RECVDSTADDR` (though the code doesn't depend on this).
* On NetBSD, `IP_PKTINFO` can be used to accomplish the same thing and is already supported by nix. On FreeBSD and OpenBSD, though, `IP_SENDSRCADDR` is the only method I'm aware of.
* The accompanying test binds a UDP socket to all local interfaces (0.0.0.0). If this is not acceptable, please let me know; however, FreeBSD requires this to use `IP_SENDSRCADDR`.
I'll add a change-log entry once I see the PR number.
Thanks!
Co-authored-by: Matthew Ingwersen <matttpt@gmail.com>
1790: minor terminology fix in User docs r=asomers a=oconnor663
Passwords are hashed, not encrypted.
Co-authored-by: Jack O'Connor <oconnor663@gmail.com>
1793: Disable cargo-hack in CI r=rtzoeller a=asomers
Serde accidentally raised its MSRV to 1.51.0 in a patch release. They
don't intent to fix it. Nix uses Serde via cargo-hack in CI. Disable it
so we can publish a final release at 1.46.0.
Co-authored-by: Alan Somers <asomers@gmail.com>
Serde accidentally raised its MSRV to 1.51.0 in a patch release. They
don't intent to fix it. Nix uses Serde via cargo-hack in CI. Disable it
so we can publish a final release at 1.46.0.
1780: Implement faccessat r=asomers a=nateavers
This is a re-post of #1134, which seems to have been abandoned. Includes the changes requested in [this comment](https://github.com/nix-rust/nix/pull/1134#issuecomment-541346612).
Co-authored-by: Zhang Miaolei <zmlcc@outlook.com>
This control message (actually just an alias for IP_RECVDSTADDR) sets
the IPv4 source address when used with sendmsg. It is available on
FreeBSD, NetBSD, OpenBSD, and DragonFlyBSD.
1779: Upgrade libc to 0.2.127 r=asomers a=rtzoeller
This is the last version of libc which will support Rust 1.46, per https://github.com/rust-lang/libc/pull/2845.
I think we should ship nix 0.25.0 against this version of libc (at some point, not necessarily now), as it will allow us to maintain an MSRV of 1.46, and subsequently upgrade to a later libc immediately after releasing 0.25.0.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>