diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-02-10 21:50:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 21:50:29 +0000 |
commit | b2318f98d31ff96bcd8f85910766a48638c16622 (patch) | |
tree | af6224b5a74d38e807bafc43159f01729a7eca92 | |
parent | 2a4012836c5372e0bc7212ff1907e96a31f66c52 (diff) | |
parent | e458f5f093c18b590750e8fd8fd3baa8cdaaf52d (diff) | |
download | nix-b2318f98d31ff96bcd8f85910766a48638c16622.zip |
Merge #1995
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>
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/fcntl.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d4e7a1..e8bde843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] - ReleaseDate ### Added +- Added `AT_EACCESS` to `AtFlags` on all platforms but android + ([#1995](https://github.com/nix-rust/nix/pull/1995)) - Add `PF_ROUTE` to `SockType` on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos. ([#1867](https://github.com/nix-rust/nix/pull/1867)) - Added `nix::ucontext` module on `aarch64-unknown-linux-gnu`. diff --git a/src/fcntl.rs b/src/fcntl.rs index 1e24f603..a9ef9ad1 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -35,7 +35,7 @@ libc_bitflags! { AT_NO_AUTOMOUNT; #[cfg(any(target_os = "android", target_os = "linux"))] AT_EMPTY_PATH; - #[cfg(any(target_os = "illumos", target_os = "solaris"))] + #[cfg(not(target_os = "android"))] AT_EACCESS; } } |