Lines Matching refs:dirfd
63 static int sys_execveat(int dirfd, const char *pathname, char *const argv[], in sys_execveat() argument
66 return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); in sys_execveat()
429 static int test_open_rel(const int dirfd, const char *const path, in test_open_rel() argument
435 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
1907 int dirfd, ruleset_fd; in test_relative_path() local
1937 dirfd = open(dir_s1d2, O_DIRECTORY); in test_relative_path()
1938 ASSERT_LE(0, dirfd); in test_relative_path()
1942 dirfd = AT_FDCWD; in test_relative_path()
1950 dirfd = AT_FDCWD; in test_relative_path()
1958 dirfd = AT_FDCWD; in test_relative_path()
1963 test_open_rel(dirfd, "..", O_RDONLY)); in test_relative_path()
1964 ASSERT_EQ(0, test_open_rel(dirfd, ".", O_RDONLY)); in test_relative_path()
1968 ASSERT_EQ(0, test_open_rel(dirfd, "./s2d3", O_RDONLY)); in test_relative_path()
1971 ASSERT_EQ(0, test_open_rel(dirfd, "./s1d3", O_RDONLY)); in test_relative_path()
1976 ASSERT_EQ(0, test_open_rel(dirfd, "/..", O_RDONLY)); in test_relative_path()
1977 ASSERT_EQ(0, test_open_rel(dirfd, "/", O_RDONLY)); in test_relative_path()
1978 ASSERT_EQ(0, test_open_rel(dirfd, "/f1", O_RDONLY)); in test_relative_path()
1979 ASSERT_EQ(0, test_open_rel(dirfd, "/s1d3", O_RDONLY)); in test_relative_path()
1983 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s1d1", O_RDONLY)); in test_relative_path()
1984 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2", O_RDONLY)); in test_relative_path()
1985 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2/s1d3", in test_relative_path()
1988 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s2d1", O_RDONLY)); in test_relative_path()
1989 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2", O_RDONLY)); in test_relative_path()
1990 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2/s2d3", in test_relative_path()
1995 ASSERT_EQ(0, close(dirfd)); in test_relative_path()