Symbol: O_DIRECTORY
drivers/block/zloop.c
1259
zlo->data_dir = zloop_filp_open_fmt(O_RDONLY | O_DIRECTORY, 0, "%s/%u",
fs/9p/vfs_inode_dotl.c
178
{ O_DIRECTORY, P9_DOTL_DIRECTORY },
fs/ceph/file.c
402
flags = O_DIRECTORY; /* mds likes to know */
fs/ceph/file.c
66
ceph_sys2wire(O_DIRECTORY);
fs/ceph/util.c
59
#ifdef O_DIRECTORY /* fixme */
fs/ceph/util.c
60
if ((flags & O_DIRECTORY) == O_DIRECTORY)
fs/fhandle.c
330
if (!(o_flags & O_DIRECTORY))
fs/namei.c
4473
open_flag |= O_DIRECTORY;
fs/nfs/dir.c
2129
if ((open_flags & O_DIRECTORY)) {
fs/nfsd/nfs4recover.c
448
nn->rec_file = filp_open(user_recovery_dirname, O_RDONLY | O_DIRECTORY, 0);
fs/open.c
1134
#define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC | O_EMPTYPATH)
fs/open.c
1205
if ((flags & (O_DIRECTORY | O_CREAT)) == (O_DIRECTORY | O_CREAT))
fs/open.c
1215
if (!(flags & O_DIRECTORY))
fs/open.c
1224
if ((flags & (O_DIRECTORY | OPENAT2_REGULAR)) ==
fs/open.c
1225
(O_DIRECTORY | OPENAT2_REGULAR))
fs/open.c
1280
if (flags & O_DIRECTORY)
fs/smb/client/file.c
464
if (flags & O_DIRECTORY)
include/linux/fcntl.h
13
FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \
include/trace/misc/fs.h
37
{ O_DIRECTORY, "O_DIRECTORY" }, \
include/uapi/asm-generic/fcntl.h
100
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
include/uapi/asm-generic/fcntl.h
56
#ifndef O_DIRECTORY
kernel/trace/trace_syscalls.c
173
{ O_DIRECTORY, "O_DIRECTORY" },
kernel/trace/trace_syscalls.c
426
"{ 0x%x, \"O_DIRECTORY\" }, ", O_DIRECTORY);
samples/pidfd/pidfd-metadata.c
58
procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
tools/lib/bpf/libbpf.c
5132
bpffs_fd = open(bpffs_path, O_DIRECTORY, O_RDWR);
tools/perf/tests/hwmon_pmu.c
103
hwmon_dirfd = open(dir, O_PATH|O_DIRECTORY);
tools/perf/tests/hwmon_pmu.c
91
test_dirfd = open(dir, O_PATH|O_DIRECTORY);
tools/perf/tests/openat-syscall-tp-fields.c
19
#ifndef O_DIRECTORY
tools/perf/tests/openat-syscall-tp-fields.c
39
int flags = O_RDONLY | O_DIRECTORY;
tools/perf/tests/pmu.c
77
dirfd = open(dir, O_DIRECTORY);
tools/perf/trace/beauty/open_flags.c
12
#ifndef O_DIRECTORY
tools/perf/ui/browsers/scripts.c
181
scripts_dir_fd = open(scripts_path, O_DIRECTORY);
tools/perf/ui/browsers/scripts.c
212
lang_dir_fd = openat(scripts_dir_fd, lang_dirent->d_name, O_DIRECTORY);
tools/perf/util/drm_pmu.c
406
fd_dir_fd = openat(proc_dir, buf, O_DIRECTORY);
tools/perf/util/drm_pmu.c
452
fdinfo_dir_fd = openat(proc_dir, buf, O_DIRECTORY);
tools/perf/util/drm_pmu.c
645
int proc_dir = open(procfs__mountpoint(), O_DIRECTORY);
tools/perf/util/evsel.c
4183
fd_dir_fd = openat(dirfd(proc_dir), buf, O_DIRECTORY);
tools/perf/util/header.c
1451
io_dir__init(&dir, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/header.c
1510
io_dir__init(&dir, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
249
io_dir__init(&dir, open(pmu->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
421
int dir = open(hwm->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/hwmon_pmu.c
720
io_dir__init(&class_hwmon_dir, open(buf, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
735
hwmon_dir = open(buf, O_DIRECTORY);
tools/perf/util/hwmon_pmu.c
771
int dir = open(hwm->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/machine.c
1408
io_dir__init(&iod, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/pmu.c
242
fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY);
tools/perf/util/pmu.c
2566
caps_fd = open(caps_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/pmu.c
2702
return open(path, O_DIRECTORY);
tools/perf/util/pmu.c
753
events_dir_fd = open(path, O_DIRECTORY);
tools/perf/util/pmu.c
769
events_dir_fd = openat(sysfs_fd, path, O_DIRECTORY, 0);
tools/perf/util/synthetic-events.c
817
io_dir__init(&iod, open(filename, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/tp_pmu.c
41
io_dir__init(&evt_dir, open(evt_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/tp_pmu.c
74
io_dir__init(&events_dir, open(events_dir_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/power/x86/turbostat/turbostat.c
10985
fd_target_dir = open(target_path, O_RDONLY | O_DIRECTORY);
tools/power/x86/turbostat/turbostat.c
11006
fd_telem_dir = openat(dirfd(pmt_iter.dir), dirname->d_name, O_RDONLY | O_DIRECTORY);
tools/testing/selftests/bpf/progs/profiler.inc.h
22
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
tools/testing/selftests/bpf/test_sockmap.c
1917
cg_fd = open(optarg, O_DIRECTORY, O_RDONLY);
tools/testing/selftests/capabilities/test_execve.c
216
int ourpath_fd = open(our_path, O_RDONLY | O_DIRECTORY);
tools/testing/selftests/cgroup/lib/cgroup_util.c
497
return open(dir, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW | O_PATH);
tools/testing/selftests/exec/execveat.c
271
int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
273
O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
274
int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
275
int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
276
int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
277
int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC);
tools/testing/selftests/fchmodat2/fchmodat2_test.c
33
dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/file_stressor.c
142
self->fd_proc_pid[i] = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/openat2/openat2_test.c
174
.how.flags = O_PATH | O_DIRECTORY },
tools/testing/selftests/filesystems/openat2/rename_attack_test.c
71
self->dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/openat2/resolve_test.c
149
dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/openat2/resolve_test.c
154
tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/openat2/resolve_test.c
49
dfd = openat(rootfd, test->dir, O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
187
layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
192
fd_work = openat(fd_tmpfs, "w", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
196
fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
200
fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
254
layer_fds[0] = openat(fd_tmpfs, "w", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
257
layer_fds[1] = openat(fd_tmpfs, "u", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
260
layer_fds[2] = openat(fd_tmpfs, "l1", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
263
layer_fds[3] = openat(fd_tmpfs, "l2", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
399
layer_fds[0] = openat(fd_tmpfs, "w", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
402
layer_fds[1] = openat(fd_tmpfs, "u", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
405
layer_fds[2] = openat(fd_tmpfs, "l1", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
408
layer_fds[3] = openat(fd_tmpfs, "l2", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
473
layer_fds[0] = openat(fd_tmpfs, "w", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
476
layer_fds[1] = openat(fd_tmpfs, "u", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
479
layer_fds[2] = openat(fd_tmpfs, "l1", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
482
layer_fds[3] = openat(fd_tmpfs, "l2", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
550
layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
555
fd_work = openat(fd_tmpfs, "w", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
559
fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
563
fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
630
layer_fds[0] = openat(fd_tmp, "upper", O_CLOEXEC | O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
633
layer_fds[1] = openat(fd_tmp, "work", O_CLOEXEC | O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
75
layer_fds[0] = openat(fd_tmpfs, "w", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
78
layer_fds[1] = openat(fd_tmpfs, "u", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
81
layer_fds[2] = openat(fd_tmpfs, "l1", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
84
layer_fds[3] = openat(fd_tmpfs, "l2", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
87
layer_fds[4] = openat(fd_tmpfs, "l3", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
90
layer_fds[5] = openat(fd_tmpfs, "l4", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
93
layer_fds[6] = openat(fd_tmpfs, "d1", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
96
layer_fds[7] = openat(fd_tmpfs, "d2", O_DIRECTORY);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
99
layer_fds[8] = openat(fd_tmpfs, "d3", O_DIRECTORY);
tools/testing/selftests/landlock/base_test.c
227
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
250
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
404
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
432
ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
434
dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
444
dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
447
dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
467
dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
480
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
494
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
513
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
525
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
558
ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
10137
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_DIRECTORY);
tools/testing/selftests/landlock/fs_test.c
10175
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_DIRECTORY);
tools/testing/selftests/landlock/fs_test.c
1024
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1030
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1037
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1046
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1052
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1059
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1068
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1074
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1081
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1295
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1300
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1305
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1329
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1334
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1339
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1350
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1355
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1360
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1380
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1385
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1393
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1410
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1412
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1425
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1427
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1835
dirfd = open(dir_s1d2, O_DIRECTORY);
tools/testing/selftests/landlock/fs_test.c
490
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
493
ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
4936
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4940
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4944
ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4947
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4955
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4959
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4964
ASSERT_EQ(EACCES, test_open(dir_s2d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4967
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4968
ASSERT_EQ(0, test_open(bind_dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4976
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4980
ASSERT_EQ(EACCES, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4985
ASSERT_EQ(EACCES, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4989
ASSERT_EQ(EACCES, test_open(bind_dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
501
ruleset_fd = open(dir_s1d1, O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5086
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, "..", O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
5104
test_open_rel(bind_s1d3_fd, "..", O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
518
path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5189
EXPECT_EQ(EACCES, test_open_rel(bind_s1d3_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
5195
EXPECT_EQ(ENOENT, test_open_rel(bind_s1d3_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
532
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5471
open(TMP_DIR "/s2d1/s2d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5901
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5904
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5908
EXPECT_EQ(0, test_open_rel(s1d41_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
5909
EXPECT_EQ(0, test_open_rel(s1d42_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
5916
EXPECT_EQ(ENOENT, test_open_rel(s1d41_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
5917
EXPECT_EQ(ENOENT, test_open_rel(s1d42_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6028
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6032
open(TMP_DIR "/s3d1/s3d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
620
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6423
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6427
EXPECT_EQ(0, test_open_rel(s1d3_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6428
EXPECT_EQ(0, test_open_rel(s1d3_bind_fd, "../..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6432
EXPECT_EQ(0, test_open_rel(s1d3_bind_fd, "..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6433
EXPECT_EQ(ENOENT, test_open_rel(s1d3_bind_fd, "../..", O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
673
open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6834
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6847
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6863
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6877
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6899
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6924
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6947
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
7382
EXPECT_EQ(EACCES, test_open(dir_s1d1, O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
971
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
977
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
983
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/net_test.c
2529
path_beneath.parent_fd = open("/dev", O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/wait-pipe-sandbox.c
119
if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) {
tools/testing/selftests/landlock/wait-pipe-sandbox.c
96
if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) {
tools/testing/selftests/mount_setattr/mount_setattr_test.c
705
dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
981
fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/namespaces/file_handle_test.c
1421
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_DIRECTORY);
tools/testing/selftests/nolibc/nolibc-test.c
1346
dev = openat(AT_FDCWD, "/dev", O_DIRECTORY);
tools/testing/selftests/nolibc/nolibc-test.c
807
ret = fd = open(dir, O_RDONLY | O_DIRECTORY);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
406
{ O_DIRECTORY, "O_DIRECTORY" },
tools/testing/selftests/pidfd/pidfd_setns_test.c
106
proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_test.c
104
pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_test.c
168
pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_test.c
272
pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_test.c
408
pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_wait.c
44
pidfd = open("/proc/self", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
tools/testing/selftests/proc/fd-001-lookup.c
146
fd = open("/", O_PATH|O_DIRECTORY);
tools/testing/selftests/proc/fd-001-lookup.c
153
fd = open("/", O_PATH|O_DIRECTORY);
tools/testing/selftests/proc/fd-002-posix-eq.c
32
fd0 = open("/", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/proc/fd-003-kthread.c
48
dir_fd = open(buf, O_RDONLY|O_DIRECTORY);
tools/testing/selftests/proc/fd-003-kthread.c
90
fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY);
tools/testing/selftests/proc/proc-pid-vm.c
314
if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) {
tools/testing/selftests/proc/read.c
109
fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY);