summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-19Add test coverage for bug with unset socket address lengthJarred Allen
2023-05-19Set the length of a sockaddr received on LinuxJarred Allen
2023-05-09Merge #2033bors[bot]
2033: remove unused mut from two variable declarations in sys/socket/mod.rs r=asomers a=inglorion This addresses diagnostics like: error: variable does not need to be mutable --> src/sys/socket/mod.rs:1537:13 | 1537 | let mut p = &mut mmsghdr.msg_hdr; Co-authored-by: Bob Haarman <inglorion@google.com>
2023-05-09remove unused mut from two variable declarations in sys/socket/mod.rsBob Haarman
This addresses diagnostics like: error: variable does not need to be mutable --> src/sys/socket/mod.rs:1537:13 | 1537 | let mut p = &mut mmsghdr.msg_hdr;
2023-04-26Merge #2026bors[bot]
2026: Update to published release of libc r=asomers a=atouchet Co-authored-by: Alex Touchet <alextouchet@outlook.com>
2023-04-25Update to crates.io release of libcAlex Touchet
2023-04-16Merge #2021bors[bot]
2021: Fixing link in rustdoc comments in User::from_name r=asomers a=austinkeeley Link text is correct but the URL goes to the wrong function. Probably just a copy/paste issue from the other function. Co-authored-by: Austin Keeley <austin.keeley@gmail.com>
2023-04-16Merge #2022bors[bot]
2022: Quiet Clippy::manual_slice_size_calculation lints r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2023-04-16Quiet a clippy::suspicious_doc_comments lintAlan Somers
2023-04-16Quiet Clippy::manual_slice_size_calculation lintsAlan Somers
2023-04-16Fixing linkAustin Keeley
2023-04-05Merge #2012bors[bot]
2012: Enable socket and select on redox r=asomers a=coolreader18 Co-authored-by: Noa <coolreader18@gmail.com>
2023-04-03Add CHANGELOG entryNoa
2023-04-02Merge #1999bors[bot]
1999: inotify: Add AsFd to allow using with epoll (issue #1998) r=asomers a=VorpalBlade This resolves issue #1998 and allows `Inotify` to be used by `Epoll` by adding AsFd. I'm not entirely sure about the unit test. Maybe it would be possible to do a more comperhensive check by contructing inotify using `from_raw_fd` and checking that I get the same value back. However, that would basically mean duplicating `Inotify::new` and that feels a bit pointless. Another option would be to create an integration test to combine `Inotify` and `Epoll`. Fixes #1998 Co-authored-by: Arvid Norlander <VorpalBlade@users.noreply.github.com>
2023-03-21Merge #1925bors[bot]
1925: fix: send ETH_P_ALL in htons format r=asomers a=tzneal Co-authored-by: Todd Neal <toddneal@protonmail.com>
2023-03-20fix: send ETH_P_ALL in htons formatTodd Neal
2023-03-13Enable select on redoxNoa
2023-03-13Enable socket on redoxNoa
2023-02-19inotify: Add AsFd to allow using with epoll (issue #1998)Arvid Norlander
2023-02-10Merge #1995bors[bot]
1995: Add `AT_EACCESS` to `AtFlags` on all platforms r=asomers a=MatteoNardi On Linux, I need the `AT_EACCESS` flag for `faccessat`: ``` AT_EACCESS Perform access checks using the effective user and group IDs. By default, faccessat() uses the real IDs (like access()). ``` ~~This commit is enabling it for all platforms but redox. I'm not really sure if this is correct of I should have just added a target_os = "linux". A did quick git grep -e AT_EACCESS -e 'AT_REMOVEDIR' on libc and it showed they're available on the same targets, so for consistence I just removed the cfg limitation.~~ CI was helpful and showed me I was wrong: it's undefined on android. Co-authored-by: Matteo Nardi <matteo@exein.io>
2023-02-10Merge #1943bors[bot]
1943: Rustier kqueue API r=rtzoeller a=asomers * Prefer methods instead of functions. * Create a newtype for a kqueue. * Document everything. * Deprecate EVFILT_SENDFILE, because it was never fully implemented upstream. * Add support to the libc_enum! macro to be able to deprecate variants. Co-authored-by: Alan Somers <asomers@gmail.com>
2023-02-09Rustier kqueue APIAlan Somers
* Prefer methods instead of functions. * Create a newtype for a kqueue. * Document everything. * Deprecate EVFILT_SENDFILE, because it was never fully implemented upstream. * Add support to the libc_enum! macro to be able to deprecate variants.
2023-02-09Merge #1967bors[bot]
1967: Added LOCAL_PEERPID/LocalPeerPid sockopt for macos r=asomers a=mitsuhiko macOS has a badly documented `LOCAL_PEERPID` sockopt that can be used to retrieve the PID of the connected peer. I intentionally only added this for macOS because I know it exists there, and I'm not sure about ios yet even if it exists there, it's doubtful that the PID information gets any use there. Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
2023-02-09Merge #1991bors[bot]
1991: setgroups type mismatches on Solaris #1986 r=asomers a=gco Addresses #1986 Co-authored-by: gco <gco@jazzhaiku.com>
2023-02-01Enabled `AtFlags::AT_EACCESS` on all platforms but android and redoxMatteo Nardi
2023-01-31setgroups type mismatches on Solaris #1986gco
2023-01-27Merge #1978bors[bot]
1978: Null-check `libc::group` members before converting r=rtzoeller a=djkoloski This mirrors the approach used for the `From<&libc::passwd> for User` impl. Co-authored-by: David Koloski <djkoloski@gmail.com>
2023-01-27Merge #1979bors[bot]
1979: Make `*::from_anything` methods unsafe r=rtzoeller a=djkoloski The called function must uphold some invariants about initializing data in order for the calls to `from_anything` to be sound. Co-authored-by: David Koloski <djkoloski@gmail.com>
2023-01-24Make `*::from_anything` methods unsafeDavid Koloski
The called function must uphold some invariants about initializing data in order for the calls to `from_anything` to be sound.
2023-01-24Null-check `libc::group` members before convertingDavid Koloski
This mirrors the approach used for the `From<&libc::passwd> for User` impl.
2023-01-23Merge #1976bors[bot]
1976: Deps: update to memoffset 0.8 r=asomers a=poliorcetics Co-authored-by: Alexis (Poliorcetics) Bourget <alexis.bourget@gmail.com>
2023-01-23Deps: update to memoffset 0.8Alexis (Poliorcetics) Bourget
2023-01-17Merge #1971bors[bot]
1971: Document the mount.linux module r=asomers a=asomers Also, deprecate a few flags that should not be used by userland. Co-authored-by: Alan Somers <asomers@gmail.com>
2023-01-17Merge #1973bors[bot]
1973: if_nameindex: add `target_os = illumos` r=asomers a=jgallagher illumos [also has if_nameindex()](https://illumos.org/man/3XNET/if_nameindex); this change allows calling nix's wrappers when building for it. Co-authored-by: John Gallagher <john@oxidecomputer.com>
2023-01-15Try enabling LocalPeerPid for iosArmin Ronacher
2023-01-15Document the mount.linux moduleAlan Somers
Also, deprecate a few flags that should not be used by userland.
2023-01-14Added changelog entry and test for LocalPeerPidArmin Ronacher
2023-01-14Added LOCAL_PEERPID/LocalPeerPid sockopt for macosArmin Ronacher
2023-01-13if_nameindex: add illumos targetJohn Gallagher
2023-01-13Merge #1964bors[bot]
1964: Fix endian swap on SocketAddrV6. r=asomers a=aarond10 This is a bug. flowinfo and scope_id should not be byte swapped here. See also https://github.com/nix-rust/nix/issues/1963. Co-authored-by: Aaron Drew <aarond10@gmail.com>
2023-01-13Fix endian swap on SocketAddrV6.Aaron Drew
flowinfo and scope_id should not be byte swapped.
2023-01-11Merge #1966bors[bot]
1966: Added `mq_timedreceive` to `::nix::mqueue`. r=asomers a=DavidCollard Noticed when working on a project that `mq_timedreceive` is missing from the `mqueue` module. Not entirely familiar with best practices around feature gating in tests - I feel like I might have messed up by not including a `#[cfg(feature = "time")]`. Would like a little guidance there. Co-authored-by: David Collard <davidcollardprofessional@gmail.com>
2023-01-11Merge #1962bors[bot]
1962: fix: Update libc r=asomers a=JonathanWoollett-Light To include fix https://github.com/rust-lang/libc/commit/44cc30c6b68427d3628926868758d35fe561bbe6. This is needed to unblock https://github.com/nix-rust/nix/pull/1868. Co-authored-by: Jonathan <jonathanwoollettlight@gmail.com>
2023-01-10Added `mq_timedreceive` to `::nix::mqueue`.David Collard
2023-01-09fix: Update libcJonathan
To include fix https://github.com/rust-lang/libc/commit/44cc30c6b68427d3628926868758d35fe561bbe6.
2023-01-08Merge #1947 #1961bors[bot]
1947: Target table r=rtzoeller a=JonathanWoollett-Light Put targets into a table. <table> <tr><th>Before</th><th>After</th></tr> <tr><td><img alt="image" src="https://user-images.githubusercontent.com/16856679/208483287-e39c218c-0a5c-4cf8-9fc2-b9ab5408ce28.png"></td><td><img alt="image" src="https://user-images.githubusercontent.com/16856679/208483421-53743623-e43b-40d4-8b36-83e570326b56.png"></td></tr> </table> 1961: feat: I/O safety `ftruncate` r=rtzoeller a=JonathanWoollett-Light Uses `AsFd` for `unistd::ftruncate`. Co-authored-by: Jonathan Woollett-Light <jonathanwoollettlight@gmail.com> Co-authored-by: Jonathan <jonathanwoollettlight@gmail.com>
2023-01-08docs: Target tableJonathan Woollett-Light
2023-01-08feat: I/O safety `ftruncate`Jonathan
2023-01-08Merge #1956bors[bot]
1956: fix: clippy::size_of_ref r=rtzoeller a=JonathanWoollett-Light Closes #1955 Co-authored-by: Jonathan <jonathanwoollettlight@gmail.com>
2022-12-31fix: clippy::size_of_refJonathan