Age | Commit message (Collapse) | Author |
|
New implementation performs no allocations after all the necessary
structures are created, removes potentially unsound code that
was used by the old version (see below) and adds a bit more
documentation about bugs in how timeout is actually handled
```
let timeout = if let Some(mut t) = timeout {
t.as_mut() as *mut libc::timespec
} else {
ptr::null_mut()
};
```
|
|
|
|
We'll be using that to reinitialize buffers later
|
|
This is already an unsafe function, dealing with pointers directly
does not make it much more unsafe but simplifies lifetimes later on
and similar to a previous commit allows to alocate a single buffer
to store all the control messages
|
|
CMSG_FIRSTHDR/CMSG_NEXTHDR operate in terms of pointers contained
inside msghdr structure, vector capacity doesn't matter for them.
This would change external behavior of recvmsg/recvmmsg in a sense
that buffer passed to store controll messages won't have it's length
updated but intended way to receive control messages is with cmsgs
iterator on `RecvMsg` which would still work.
This change is required to allow using a single vector to store
control messages from multiple packets
|
|
1743: add XFS_SUPER_NUMBER to nix::sys::statfs r=rtzoeller a=MrCroxx
Close #1742 .
Co-authored-by: MrCroxx <mrcroxx@outlook.com>
|
|
|
|
1842: add eaccess on freebsd, dragonfly and linux r=rtzoeller a=SteveLauC
#### man pages
* [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=eaccess&sektion=2&n=1)
* [DragonFly](https://man.dragonflybsd.org/?command=access§ion=2)
* [Linux](https://man7.org/linux/man-pages/man3/euidaccess.3.html)
#### difference between `eaccess` and `access/faccessat`
IMHO, `eaccess` uses effective identifiers to perform the permission check while `access/faccessat` use real IDs.
Fixes #1373
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
1846: fix '<newline>' being interpreted as html r=asomers a=rtzoeller
This is breaking nightly.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
|
|
|
|
1843: Fix typo: remove unnecessary verb from doc comment of `dup` r=rtzoeller a=magurotuna
Extremely minor one, but I found it by chance so why not open a PR :)
Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
|
|
|
|
1841: add faccessat on illumos r=asomers a=SteveLauC
This binding has been added in [libc#2953](https://github.com/rust-lang/libc/pull/2953)
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1840: Upgrade parking_lot dev-dependency to 0.12 r=asomers a=rtzoeller
We were previously stuck on 0.11 for MSRV reasons, but since bumping nix's MSRV to Rust 1.56 this is no longer the case.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
We were previously stuck on 0.11 for MSRV reasons, but since
bumping nix's MSRV to Rust 1.56 this is no longer the case.
|
|
1833: add syncfs on linux r=rtzoeller a=SteveLauC
Fixes #1818
Change has not been added to `CHANGELOG.md`, will add it when #1831 is merged, or there will be a merge conflict
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
1839: Fix clippy warnings on nightly r=asomers a=rtzoeller
Clippy is now smarter about detecting unnecessary casts and useless conversions, which means we need to be more explicit about when the conversions are needed for a subset of platforms.
Required changes found by repeatedly running the following command against a list of the supported platforms.
`xargs -t -I {} sh -c "cargo clippy -Zbuild-std --target {} --all-targets -- -D warnings || exit 255"`
I removed the casts it complained about, and then restored them with an `#[allow]` if a later target needed the cast.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
Clippy is now smarter about detecting unnecessary casts and
useless conversions, which means we need to be more explicit
about when the conversions are needed for a subset of platforms.
Required changes found by repeatedly running the following command
against a list of the supported platforms.
`xargs -t -I {} sh -c "cargo clippy -Zbuild-std --target {} --all-targets -- -D warnings || exit 255"`
I removed the casts it complained about, and then restored them
with an `#[allow]` if a later target needed the cast.
|
|
|
|
1831: re-export RLIM_INFINITY from libc r=rtzoeller a=SteveLauC
Fixes #1803
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1829: statfs: add namespace fs magic r=rtzoeller a=tammela
Namespace filesystem magic is missing from FsType constants.
Co-authored-by: Pedro Tammela <pctammela@gmail.com>
|
|
|
|
Namespace filesystem magic is missing from FsType constants.
|
|
1825: Add a `sched_getcpu` wrapper r=rtzoeller a=jonas-schievink
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
|
|
|
|
1828: bump libc to 0.2.133 r=rtzoeller a=SteveLauC
Bump `libc` so that `setgrent/getgrent/endgrent` are available on fuchsia, and thus the CI failure in #1820 will be resolved
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1824: fix bugs on android armv7, because `pw.pw_passwd.is_null()` r=rtzoeller a=ClarkGuan
crash on my Android phone because `pw.pw_passwd == NULL`
Co-authored-by: wdsgyj <gongbo.guan@momenta.ai>
|
|
|
|
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>
|
|
|
|
1808: expose memfd on freebsd r=asomers a=i509VCB
Resolves #1775
Co-authored-by: i509VCB <git@i509.me>
|
|
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>
|
|
|
|
1816: Clippy cleanup r=rtzoeller a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
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>
|
|
We no longer need it since updating our MSRV to 1.56.1.
Issue #1809
|
|
1804: Add sched_getaffinity and sched_setaffinity on FreeBSD r=asomers a=rtzoeller
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.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>
|