Skip to content

openat2 support for RESOLVE_WITH_ROOTFD #377

@cyphar

Description

@cyphar

The rootfd and cwdfd always having to be the same fd with openat2(2) is quite inconvenient and it makes implementing things like symlink-follow O_CREAT support not really possible in a nice way (i.e., without completely re-doing lookups an unbounded number of times), and some other problems are almost intractable without this interface.

Options are to have one bit (RESOLVE_WITH_ROOTFD) that must be used with RESOLVE_IN_ROOT or RESOLVE_BENEATH, or just have two new versions of those flags (RESOLVE_IN_ROOTFD, RESOLVE_BENEATH_ROOTFD or RESOLVE_BENEATHFD).

Metadata

Metadata

Assignees

No one assigned

    Labels

    linux/upstreamDependent on upstream kernel work.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions