Home
last modified time | relevance | path

Searched refs:parent_fd (Results 1 – 6 of 6) sorted by relevance

/openbmc/linux/tools/testing/selftests/landlock/
H A Dbase_test.c152 .parent_fd = -1, in TEST()
182 path_beneath_attr.parent_fd = in TEST()
184 ASSERT_LE(0, path_beneath_attr.parent_fd); in TEST()
187 ASSERT_EQ(0, close(path_beneath_attr.parent_fd)); in TEST()
199 .parent_fd = -1, in TEST()
205 path_beneath_attr.parent_fd = in TEST()
207 ASSERT_LE(0, path_beneath_attr.parent_fd); in TEST()
210 ASSERT_EQ(0, close(path_beneath_attr.parent_fd)); in TEST()
277 path_beneath_attr.parent_fd = in TEST()
279 ASSERT_LE(0, path_beneath_attr.parent_fd); in TEST()
[all …]
H A Dfs_test.c433 .parent_fd = -1, in TEST_F_FORK()
441 path_beneath.parent_fd = in TEST_F_FORK()
443 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F_FORK()
467 ASSERT_EQ(0, close(path_beneath.parent_fd)); in TEST_F_FORK()
470 path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
471 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F_FORK()
474 ASSERT_EQ(0, close(path_beneath.parent_fd)); in TEST_F_FORK()
477 path_beneath.parent_fd = ruleset_fd; in TEST_F_FORK()
483 path_beneath.parent_fd = in TEST_F_FORK()
485 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F_FORK()
[all …]
/openbmc/linux/samples/landlock/
H A Dsandboxer.c94 .parent_fd = -1, in populate_ruleset()
122 path_beneath.parent_fd = open(path_list[i], O_PATH | O_CLOEXEC); in populate_ruleset()
123 if (path_beneath.parent_fd < 0) { in populate_ruleset()
128 if (fstat(path_beneath.parent_fd, &statbuf)) { in populate_ruleset()
129 close(path_beneath.parent_fd); in populate_ruleset()
140 close(path_beneath.parent_fd); in populate_ruleset()
143 close(path_beneath.parent_fd); in populate_ruleset()
/openbmc/linux/security/landlock/
H A Dsyscalls.c101 path_beneath_size += sizeof(path_beneath_attr.parent_fd); in build_check_abi()
262 fd, ((struct landlock_path_beneath_attr *)NULL)->parent_fd)); in get_path_from_fd()
370 err = get_path_from_fd(path_beneath_attr.parent_fd, &path); in SYSCALL_DEFINE4()
/openbmc/linux/include/uapi/linux/
H A Dlandlock.h75 __s32 parent_fd; member
/openbmc/linux/Documentation/userspace-api/
H A Dlandlock.rst126 path_beneath.parent_fd = open("/usr", O_PATH | O_CLOEXEC);
127 if (path_beneath.parent_fd < 0) {
134 close(path_beneath.parent_fd);