Home
last modified time | relevance | path

Searched refs:O_PATH (Results 1 – 25 of 46) sorted by relevance

12

/linux/tools/testing/selftests/openat2/
H A Dopenat2_test.c
H A Drename_attack_test.c
H A Dresolve_test.c
/linux/tools/testing/selftests/filesystems/openat2/
H A Dopenat2_test.c174 .how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL }, in TEST_F()
180 .how.flags = O_PATH | O_CLOEXEC }, in TEST_F()
182 .how.flags = O_PATH | O_DIRECTORY }, in TEST_F()
184 .how.flags = O_PATH | O_NOFOLLOW }, in TEST_F()
187 .how.flags = O_PATH | O_RDWR, .err = -EINVAL }, in TEST_F()
189 .how.flags = O_PATH | O_CREAT, .err = -EINVAL }, in TEST_F()
191 .how.flags = O_PATH | O_EXCL, .err = -EINVAL }, in TEST_F()
193 .how.flags = O_PATH | O_NOCTTY, .err = -EINVAL }, in TEST_F()
195 .how.flags = O_PATH | O_DIRECT, .err = -EINVAL }, in TEST_F()
197 .how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL }, in TEST_F()
[all …]
H A Dresolve_test.c46 how.flags |= O_PATH; in verify_resolve_test()
49 dfd = openat(rootfd, test->dir, O_PATH | O_DIRECTORY); in verify_resolve_test()
152 dfd = open(dirname, O_PATH | O_DIRECTORY); in FIXTURE_SETUP()
157 tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY); in FIXTURE_SETUP()
/linux/tools/perf/tests/
H A Dtests-scripts.c45 fd = open(devel_dirs[i], O_PATH); in shell_tests__dir_fd()
69 fd = open(path, O_PATH); in shell_tests__dir_fd()
73 fd = open(path, O_PATH); in shell_tests__dir_fd()
81 return open(path, O_PATH); in shell_test__description()
346 fd = openat(dir_fd, ent->d_name, O_PATH);
H A Dhwmon_pmu.c91 test_dirfd = open(dir, O_PATH|O_DIRECTORY); in test_pmu_get()
103 hwmon_dirfd = open(dir, O_PATH|O_DIRECTORY); in test_pmu_get()
/linux/tools/testing/selftests/landlock/
H A Dbase_test.c21 #ifndef O_PATH
22 #define O_PATH 010000000 macro
246 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
269 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
325 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
517 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
658 root_fd = open("/", O_PATH | O_CLOEXEC);
H A Dtrace_fs_test.c208 path_beneath.parent_fd = open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
272 path_beneath.parent_fd = open(path, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
445 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
473 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
676 open("/tmp", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
H A Dtrace.h595 open(rule_path, O_PATH | O_DIRECTORY | O_CLOEXEC); in sandbox_child_exec_true()
659 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC);
669 open(".", O_PATH | O_DIRECTORY | O_CLOEXEC);
H A Dfs_test.c486 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
489 ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
513 /* Tests without O_PATH. */ in TEST_F_FORK()
528 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
611 path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC); in TEST_F_FORK()
616 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
669 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
696 path_beneath.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC); in TEST_F_FORK()
725 path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC); in add_path_beneath()
834 path_beneath.parent_fd = open("/proc/self/ns/mnt", O_PATH | O_CLOEXE in TEST_F_FORK()
[all...]
H A Dtrace_test.c240 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
249 open("/tmp", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
330 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
511 path_beneath.parent_fd = open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
/linux/tools/include/uapi/asm-generic/
H A Dfcntl.h
/linux/tools/testing/selftests/filesystems/mount_cycle/
H A Dunmounted_tree_test.c172 fd = open(x, O_PATH | O_CLOEXEC); in TEST_F()
222 fd = open(x, O_PATH | O_CLOEXEC); in TEST_F()
326 fd = open(a->x, O_PATH | O_CLOEXEC); in vacant_child()
400 fd = open(a->x, O_PATH | O_CLOEXEC); in ordinary_copy()
406 fdy = open(a->y, O_PATH | O_CLOEXEC); in ordinary_copy()
H A Dmount_cover_test.c154 fds[0] = open(p, O_PATH | O_DIRECTORY | O_CLOEXEC); in cover_child()
156 fds[2] = open(t, O_PATH | O_DIRECTORY | O_CLOEXEC); in cover_child()
157 fds[3] = open(u, O_PATH | O_DIRECTORY | O_CLOEXEC); in cover_child()
H A Dovermount_reparent_test.c152 fd = open(bmp, O_PATH | O_CLOEXEC); in TEST_F()
/linux/tools/testing/selftests/proc/
H A Dfd-001-lookup.c146 fd = open("/", O_PATH|O_DIRECTORY); in main()
153 fd = open("/", O_PATH|O_DIRECTORY); in main()
/linux/tools/testing/selftests/exec/
H A Dexecveat.c276 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests()
279 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests()
283 O_RDONLY|O_PATH); in run_tests()
287 O_RDONLY|O_PATH); in run_tests()
/linux/rust/kernel/fs/
H A Dfile.rs73 pub const O_PATH: u32 = bindings::O_PATH; constant
/linux/tools/testing/selftests/filesystems/overlayfs/
H A Dset_layers_via_fds.c550 layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY | O_PATH); in TEST_F()
555 fd_work = openat(fd_tmpfs, "w", O_DIRECTORY | O_PATH); in TEST_F()
559 fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY | O_PATH); in TEST_F()
563 fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY | O_PATH); in TEST_F()
630 layer_fds[0] = openat(fd_tmp, "upper", O_CLOEXEC | O_DIRECTORY | O_PATH); in TEST_F()
633 layer_fds[1] = openat(fd_tmp, "work", O_CLOEXEC | O_DIRECTORY | O_PATH); in TEST_F()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbpf_obj_pinning.c148 pin_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_pin()
213 get_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_get()
/linux/tools/perf/trace/beauty/
H A Dopen_flags.c60 #ifdef O_PATH in open__scnprintf_flags()
/linux/tools/testing/selftests/fchmodat2/
H A Dfchmodat2_test.c33 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
/linux/fs/
H A Dopen.c951 if (unlikely(f->f_flags & O_PATH)) { in do_dentry_open()
1209 #define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC | O_EMPTYPATH)
1218 /* O_PATH beats everything else. */ in build_open_how()
1219 if (how.flags & O_PATH) in build_open_how()
1303 if (flags & O_PATH) { in build_open_flags()
1304 /* O_PATH only permits certain other flags to be set. */ in build_open_flags()
1345 op->intent = flags & O_PATH ? 0 : LOOKUP_OPEN; in build_open_flags()
1488 /* O_LARGEFILE is only allowed for non-O_PATH. */ in SYSCALL_DEFINE4()
1489 if (!(tmp.flags & O_PATH) && force_o_largefile()) in SYSCALL_DEFINE4()
/linux/tools/testing/selftests/filesystems/statmount/
H A Dstatmount_test.c136 orig_root = open("/", O_PATH); in setup_namespace()
729 fd = open(subdir, O_PATH); in test_statmount_by_fd()
858 fd = open(subdir, O_PATH); in main()

12