Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for openat2() #1400

Closed
Serentty opened this issue Mar 13, 2021 · 1 comment · Fixed by #2339
Closed

Support for openat2() #1400

Serentty opened this issue Mar 13, 2021 · 1 comment · Fixed by #2339

Comments

@Serentty
Copy link

On Linux, the recent openat2() system call provides a broader API surface than openat(). However, it's not yet wrapped in GLIBC, so it would be necessary to make the system call directly. Would this be a problem in terms of maintainability and portability, or is this something that the Nix crate is already used to dealing with?

@asomers
Copy link
Member

asomers commented Mar 13, 2021

It's highly annoying, but not a deal-breaker. Nix already has a few functions that do that. Just grep Nix's codebase for libc::syscall.

blinsay added a commit to blinsay/nix that referenced this issue Mar 20, 2024
Adds support for openat2 on linux. Includes a new ResolveFlag struct to
pass resolve flags, which is passed directly to the new fcntl::openat2
function. libc::open_how isn't exposed here, which may mean this API
needs to change if there's an update to openat2 to extend open_how with
new fields.

Fixes nix-rust#1400.
@blinsay blinsay mentioned this issue Mar 20, 2024
3 tasks
blinsay added a commit to blinsay/nix that referenced this issue Mar 20, 2024
Adds support for openat2 on linux. Includes a new ResolveFlag struct to
pass resolve flags, which is passed directly to the new fcntl::openat2
function. libc::open_how isn't exposed here, which may mean this API
needs to change if there's an update to openat2 to extend open_how with
new fields.

Fixes nix-rust#1400.
blinsay added a commit to blinsay/nix that referenced this issue Mar 20, 2024
Adds support for openat2 on linux. Includes a new ResolveFlag struct to
pass resolve flags, which is passed directly to the new fcntl::openat2
function. libc::open_how isn't exposed here, which may mean this API
needs to change if there's an update to openat2 to extend open_how with
new fields.

Fixes nix-rust#1400.
blinsay added a commit to blinsay/nix that referenced this issue Mar 23, 2024
Adds an openat2 function with an OpenHow and ResolveFlag options for
configuring path resolution.

Fixes nix-rust#1400.
blinsay added a commit to blinsay/nix that referenced this issue Mar 23, 2024
Adds an openat2 function with an OpenHow and ResolveFlag options for
configuring path resolution.

Fixes nix-rust#1400.
blinsay added a commit to blinsay/nix that referenced this issue Mar 23, 2024
Adds an openat2 function with an OpenHow and ResolveFlag options for
configuring path resolution.

Fixes nix-rust#1400.
blinsay added a commit to blinsay/nix that referenced this issue Mar 25, 2024
Adds an openat2 function with an OpenHow and ResolveFlag options for
configuring path resolution.

Fixes nix-rust#1400.
github-merge-queue bot pushed a commit that referenced this issue Mar 25, 2024
Adds an openat2 function with an OpenHow and ResolveFlag options for
configuring path resolution.

Fixes #1400.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants