O_PATH
} else if (unlikely(file->f_flags & O_PATH)) {
file = dentry_open(path, O_PATH, current_cred());
return dentry_open(&path, O_PATH, current_cred());
dentry_open(&new_path, O_PATH, fc->cred));
#define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC)
if (how.flags & O_PATH)
if (flags & O_PATH) {
op->intent = flags & O_PATH ? 0 : LOOKUP_OPEN;
if (!(tmp.flags & O_PATH) && force_o_largefile())
if (unlikely(f->f_flags & O_PATH)) {
oflags |= O_PATH;
O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
#ifndef O_PATH
if (!(open->how.flags & O_PATH) && force_o_largefile())
return FD_ADD(O_CLOEXEC, dentry_open(&unix_sk(sk)->path, O_PATH, current_cred()));
path_beneath.parent_fd = open(path_list[i], O_PATH | O_CLOEXEC);
test_dirfd = open(dir, O_PATH|O_DIRECTORY);
hwmon_dirfd = open(dir, O_PATH|O_DIRECTORY);
fd = openat(dir_fd, ent->d_name, O_PATH);
fd = open(devel_dirs[i], O_PATH);
fd = open(path, O_PATH);
fd = open(path, O_PATH);
return open(path, O_PATH);
#ifdef O_PATH
dir_fd = open(path, O_PATH);
fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
int err, fd = openat(dirfd, dirp, O_PATH);
pin_opts.path_fd = open("/sys/fs/bpf", O_PATH);
get_opts.path_fd = open("/sys/fs/bpf", O_PATH);
indicatorfd = open("/tmp/", O_PATH);
return open(dir, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW | O_PATH);
int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH);
int fd_path = open_or_die("execveat", O_RDONLY|O_PATH);
O_RDONLY|O_PATH);
O_RDONLY|O_PATH);
dfd = open(dirname, O_PATH | O_DIRECTORY);
self->orig_root = open("/", O_PATH | O_CLOEXEC);
self->orig_root = open("/", O_PATH | O_CLOEXEC);
layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY | O_PATH);
fd_work = openat(fd_tmpfs, "w", O_DIRECTORY | O_PATH);
fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY | O_PATH);
fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY | O_PATH);
layer_fds[0] = openat(fd_tmp, "upper", O_CLOEXEC | O_DIRECTORY | O_PATH);
layer_fds[1] = openat(fd_tmp, "work", O_CLOEXEC | O_DIRECTORY | O_PATH);
orig_root = open("/", O_PATH);
fd = open(subdir, O_PATH);
fd = open(subdir, O_PATH);
fd = open(mnt, O_PATH);
#ifndef O_PATH
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
curr = openat(curr, path, O_PATH);
int fd = openat(AT_FDCWD, ".", O_PATH);
fd = openat(fd, path, O_PATH);
int newfd = openat(fd, "..", O_PATH);
curr = open(".", O_PATH);
fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC);
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
open(TMP_DIR "/s2d1/s2d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
O_DIRECTORY | O_PATH | O_CLOEXEC);
O_DIRECTORY | O_PATH | O_CLOEXEC);
O_DIRECTORY | O_PATH | O_CLOEXEC);
open(TMP_DIR "/s3d1/s3d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
O_DIRECTORY | O_PATH | O_CLOEXEC);
open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC);
path_beneath.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC);
path_beneath.parent_fd = open("/proc/self/ns/mnt", O_PATH | O_CLOEXEC);
ASSERT_EQ(0, test_open("/", O_RDONLY | O_PATH));
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY | O_PATH));
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY | O_PATH));
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_PATH));
path_beneath.parent_fd = open("/dev", O_PATH | O_DIRECTORY | O_CLOEXEC);
.how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL },
.how.flags = O_PATH | O_CLOEXEC },
.how.flags = O_PATH | O_DIRECTORY },
.how.flags = O_PATH | O_NOFOLLOW },
.how.flags = O_PATH | O_RDWR, .err = -EINVAL },
.how.flags = O_PATH | O_CREAT, .err = -EINVAL },
.how.flags = O_PATH | O_EXCL, .err = -EINVAL },
.how.flags = O_PATH | O_NOCTTY, .err = -EINVAL },
.how.flags = O_PATH | O_DIRECT, .err = -EINVAL },
.how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL },
.how.flags = O_PATH, .how.mode = 0600, .err = -EINVAL },
.how.flags = O_PATH,
afd = openat(dfd, "a", O_PATH);
dfd = open(dirname, O_PATH | O_DIRECTORY);
.flags = O_PATH,
test->how.flags |= O_PATH;
dfd = openat(rootfd, test->dir, O_PATH | O_DIRECTORY);
dfd = open(dirname, O_PATH | O_DIRECTORY);
tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY);
{ O_PATH, "O_PATH" },
fd = open("/", O_PATH|O_DIRECTORY);
fd = open("/", O_PATH|O_DIRECTORY);
if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) {