Home
last modified time | relevance | path

Searched refs:path_beneath (Results 1 – 4 of 4) sorted by relevance

/linux/samples/landlock/
H A Dsandboxer.c125 struct landlock_path_beneath_attr path_beneath = { in populate_ruleset_fs() local
154 path_beneath.parent_fd = open(path_list[i], O_PATH | O_CLOEXEC); in populate_ruleset_fs()
155 if (path_beneath.parent_fd < 0) { in populate_ruleset_fs()
160 if (fstat(path_beneath.parent_fd, &statbuf)) { in populate_ruleset_fs()
163 close(path_beneath.parent_fd); in populate_ruleset_fs()
166 path_beneath.allowed_access = allowed_access; in populate_ruleset_fs()
168 path_beneath.allowed_access &= ACCESS_FILE; in populate_ruleset_fs()
170 &path_beneath, 0)) { in populate_ruleset_fs()
174 close(path_beneath.parent_fd); in populate_ruleset_fs()
177 close(path_beneath.parent_fd); in populate_ruleset_fs()
/linux/tools/testing/selftests/landlock/
H A Dfs_test.c478 struct landlock_path_beneath_attr path_beneath = { in TEST_F_FORK()
489 path_beneath.parent_fd = in TEST_F_FORK()
491 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F_FORK()
496 &path_beneath, 0)); in TEST_F_FORK()
504 &path_beneath, 0)); in TEST_F_FORK()
514 &path_beneath, 0)); in TEST_F_FORK()
515 ASSERT_EQ(0, close(path_beneath.parent_fd)); in TEST_F_FORK()
518 path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
519 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F_FORK()
521 &path_beneath, in TEST_F_FORK()
477 struct landlock_path_beneath_attr path_beneath = { TEST_F_FORK() local
661 struct landlock_path_beneath_attr path_beneath = {}; TEST_F_FORK() local
690 struct landlock_path_beneath_attr path_beneath = {}; TEST_F_FORK() local
723 struct landlock_path_beneath_attr path_beneath = { add_path_beneath() local
804 struct landlock_path_beneath_attr path_beneath; TEST_F_FORK() local
[all...]
H A Dnet_test.c1629 struct landlock_path_beneath_attr path_beneath = { in TEST_F() local
1645 path_beneath.parent_fd = open("/dev", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
1646 ASSERT_LE(0, path_beneath.parent_fd); in TEST_F()
1648 &path_beneath, 0)); in TEST_F()
1649 EXPECT_EQ(0, close(path_beneath.parent_fd)); in TEST_F()
/linux/Documentation/userspace-api/
H A Dlandlock.rst159 struct landlock_path_beneath_attr path_beneath = {
166 path_beneath.parent_fd = open("/usr", O_PATH | O_CLOEXEC);
167 if (path_beneath.parent_fd < 0) {
173 &path_beneath, 0);
174 close(path_beneath.parent_fd);