summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-27Add a `sched_getcpu` wrapperJonas Schievink
2022-09-17Merge #1817bors[bot]
1817: fix issue1814 add domainname field of utsname on android and linux r=asomers a=SteveLauC Closes #1814 Co-authored-by: Steve Lau <stevelauc@outlook.com> Co-authored-by: SteveLau <stevelauc@outlook.com>
2022-09-12Merge branch 'master' into issue1814-expose-domainname-of-utsnameSteveLau
2022-09-12Merge #1808bors[bot]
1808: expose memfd on freebsd r=asomers a=i509VCB Resolves #1775 Co-authored-by: i509VCB <git@i509.me>
2022-09-12Merge #1815bors[bot]
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>
2022-09-12fix issue1814Steve Lau
2022-09-11Merge #1816bors[bot]
1816: Clippy cleanup r=rtzoeller a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2022-09-11Clippy cleanupAlan Somers
2022-09-11Handle unacceptable name gracefully in {User,Group}::from_nameWATANABE Yuki
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.
2022-09-07expose memfd on freebsdi509VCB
2022-08-26Merge #1810bors[bot]
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>
2022-08-25Eliminate Cargo.lock.msrvAlan Somers
We no longer need it since updating our MSRV to 1.56.1. Issue #1809
2022-08-26Merge #1804bors[bot]
1804: Add sched_getaffinity and sched_setaffinity on FreeBSD r=asomers a=rtzoeller Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-08-25Add sched_getaffinity and sched_setaffinity on FreeBSDRyan Zoeller
2022-08-22Merge #1805bors[bot]
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>
2022-08-22add line field to Termios structTerts Diepraam
2022-08-21Merge #1806bors[bot]
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>
2022-08-20Remove MSRV-related workaround for doc aliasesRyan Zoeller
2022-08-21Merge #1801bors[bot]
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>
2022-08-20fix microsecond calculation for TimeSpecS.J.R. van Schaik
2022-08-16Merge #1792bors[bot]
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>
2022-08-14Fix a new clippy lintAlan Somers
2022-08-14Raise the MSRV to 1.56.1 in anticipation of the next releaseAlan Somers
And fix some documentation lints warned about by the newer rustdoc.
2022-08-13Merge #1796bors[bot]
1796: No dev version r=rtzoeller a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2022-08-13[skip ci] Rollback master branch to 0.25.0Alan Somers
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.
2022-08-13[skip ci] add a CHANGELOG section for the next releaseAlan Somers
2022-08-13(cargo-release) start next development iteration 0.25.1-alpha.0Alan Somers
2022-08-13(cargo-release) version 0.25.0Alan Somers
2022-08-13Merge #1795bors[bot]
1795: [skip ci] reformat CHANGELOG prior to 0.25.0 release r=rtzoeller a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2022-08-13[skip ci] reformat CHANGELOG prior to 0.25.0 releaseAlan Somers
2022-08-12Merge #1794bors[bot]
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>
2022-08-12Reenable cargo-hack in CIAlan Somers
But instead of building it from source, download pre-built binaries.
2022-08-12Merge #1782bors[bot]
1782: feat #1733: add F_GET_SEALS and F_ADD_SEALS on FreeBSD r=rtzoeller a=SteveLauC Closes #1733 Co-authored-by: SteveLauC <stevelauc@outlook.com>
2022-08-12feat nix-rust#1733: add F_GET_SEALS and F_ADD_SEALS on FreeBSDSteveLauC
2022-08-12Merge #1776bors[bot]
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>
2022-08-12Merge #1785bors[bot]
1785: Remove deprecated items r=asomers a=SteveLauC #### What this pr does 1. Convert `assert!(x == y)` to `assert_eq!(x, y)` 2. Convert `assert!(x != y)` to `assert_ne!(x, y)` 3. Add `.unwrap()` to unused `Result/Option` (in code comments) 4. Convert `std::ixx::MAX` to `ixx::MAX` 5. Convert `Box<Trait>` to `Box<dyn Trait>` Co-authored-by: SteveLauC <stevelauc@outlook.com> Co-authored-by: SteveLau <stevelauc@outlook.com>
2022-08-12fix CI errorSteveLauC
2022-08-12Merge branch 'nix-rust:master' into remove-deprecated-itemsSteveLau
2022-08-12Merge #1790bors[bot]
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>
2022-08-12Merge #1786bors[bot]
1786: Folloup for !1778, remove some of the less helpful error msgs r=asomers a=pacak Co-authored-by: Michael Baikov <manpacket@gmail.com>
2022-08-11minor terminology fix in User docsJack O'Connor
Passwords are hashed, not encrypted.
2022-08-12Folloup for !1778, remove some of the less helpful error msgsMichael Baikov
2022-08-12Merge #1793bors[bot]
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>
2022-08-11Also raise the MSRV just for cross-tests. Cross uses Serde too.Alan Somers
2022-08-11Disable cargo-hack in CIAlan Somers
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.
2022-08-09remove deprecated itemsSteveLauC
2022-08-09format codeSteveLauC
2022-08-09remove deprecated itemsSteveLauC
2022-08-06Merge #1780bors[bot]
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>
2022-08-05add faccessatZhang Miaolei