Messages in this thread | | | Date | Tue, 21 Mar 2023 09:10:28 +1100 | From | Aleksa Sarai <> | Subject | Re: [PATCH] do_open(): Fix O_DIRECTORY | O_CREAT behavior |
| |
On 2023-03-20, Linus Torvalds <torvalds@linux-foundation.org> wrote: > What about O_PATH? I guess it's fine to create a file and only get a > path fd to the result?
O_PATH ignores the O_CREAT flag so it's the same as just passing O_PATH. This is the case for all flags not in O_PATH_FLAGS (so only O_DIRECTORY, O_NOFOLLOW, O_CLOEXEC have an effect on O_PATH). With openat2, passing any other flag with O_PATH returns -EINVAL.
-- Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH <https://www.cyphar.com/> [unhandled content-type:application/pgp-signature] | |