Searched refs:openat (Results 1 - 25 of 61) sorted by relevance

123

/freebsd-13-stable/lib/libc/sys/
H A Dopenat.c42 __sym_compat(openat, __impl_openat, FBSD_1.1);
43 __weak_reference(openat, __impl_openat);
44 __sym_default(openat, openat, FBSD_1.2);
46 #pragma weak openat macro
48 openat(int fd, const char *path, int flags, ...) function
H A Dinterposing_table.c52 SLOT(openat, __sys_openat),
/freebsd-13-stable/tools/regression/security/cap_test/
H A Dcap_test_relative.c46 * Test openat(2) in a variety of sitations to ensure that it obeys Capsicum
73 * openat(2) with regular file descriptors in non-capability mode
76 CHECK_SYSCALL_SUCCEEDS(openat, etc, "/etc/passwd", O_RDONLY);
77 CHECK_SYSCALL_SUCCEEDS(openat, AT_FDCWD, "/etc/passwd", O_RDONLY);
78 CHECK_SYSCALL_SUCCEEDS(openat, etc, "passwd", O_RDONLY);
79 CHECK_SYSCALL_SUCCEEDS(openat, etc, "../etc/passwd", O_RDONLY);
86 CHECK_SYSCALL_SUCCEEDS(openat, etc_cap_ro, "passwd", O_RDONLY);
87 CHECK_SYSCALL_SUCCEEDS(openat, etc_cap_base, "passwd", O_RDONLY);
88 CHECK_SYSCALL_SUCCEEDS(openat, etc_cap_all, "passwd", O_RDONLY);
90 CHECK_NOTCAPABLE(openat, etc_cap_r
[all...]
H A Dcap_test_capabilities.c187 ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDONLY, 0600);
188 CHECK_RESULT(openat(O_CREATE | O_RDONLY),
192 ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY | O_APPEND,
194 CHECK_RESULT(openat(O_CREATE | O_WRONLY | O_APPEND),
198 ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600);
199 CHECK_RESULT(openat(O_CREATE | O_RDWR | O_APPEND),
207 ret = openat(dirfd, "cap_fsync", O_CREAT, 0600);
210 ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDONLY);
211 CHECK_RESULT(openat(O_FSYNC | O_RDONLY),
214 ret = openat(dfd_ca
[all...]
/freebsd-13-stable/libexec/rtld-elf/rtld-libc/
H A Dnamespace.h36 #define openat _openat macro
H A Dun-namespace.h36 #undef openat macro
/freebsd-13-stable/cddl/compat/opensolaris/include/
H A Dfcntl.h38 #define openat64(...) openat(__VA_ARGS__)
/freebsd-13-stable/tests/sys/vfs/
H A Dlookup_cap_dotdot.c50 ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
92 atf_tc_set_md_var(tc, "descr", "Basic positive openat testcases");
99 ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0);
100 ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0);
101 ATF_REQUIRE(openat(dirfd, "l3/f3", O_RDONLY) >= 0);
102 ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0);
103 ATF_REQUIRE(openat(dirfd, "../testdir/d1/f1", O_RDONLY) >= 0);
104 ATF_REQUIRE(openat(dirfd, "lup/f1", O_RDONLY) >= 0);
105 ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0);
106 ATF_REQUIRE(openat(dirf
[all...]
/freebsd-13-stable/contrib/capsicum-test/
H A Dopenat.cc27 // Test openat(2) in a variety of sitations to ensure that it obeys Capsicum
39 // - the openat(2) operation includes the O_BENEATH flag.
70 // openat(2) with regular file descriptors in non-capability mode
72 EXPECT_OPEN_OK(openat(etc, "/etc/passwd", O_RDONLY));
73 EXPECT_OPEN_OK(openat(AT_FDCWD, "/etc/passwd", O_RDONLY));
74 EXPECT_OPEN_OK(openat(etc, "passwd", O_RDONLY));
75 EXPECT_OPEN_OK(openat(etc, "../etc/passwd", O_RDONLY));
79 EXPECT_OPEN_OK(openat(etc_cap_ro, "passwd", O_RDONLY));
80 EXPECT_OPEN_OK(openat(etc_cap_base, "passwd", O_RDONLY));
82 // Performing openat(
[all...]
H A Dcapability-fd.cc299 int file = openat(dir, "cap_openat_testfile", O_RDONLY|O_CREAT, 0644);
304 int new_file = openat(dir, "../dev/null", O_RDONLY);
307 new_file = openat(dir, "..", O_RDONLY);
310 new_file = openat(dir, "/dev/null", O_RDONLY);
313 new_file = openat(dir, "/", O_RDONLY);
359 // and check that this restriction is inherited through openat().
372 int file = openat(dir, filename, O_WRONLY|O_CREAT, 0644);
378 file = openat(cap_dir, filename, O_RDONLY);
387 file = openat(cap_dir, filename, O_WRONLY|O_APPEND);
686 int rc = openat(dfd_ca
[all...]
H A Dcapsicum-test.h169 SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
170 const int result = openat((fd), (path), (flags)); \
181 SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
182 const int result = openat((fd), (path), (flags)); \
H A Dmakefile2 OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o
/freebsd-13-stable/contrib/netbsd-tests/lib/libc/c063/
H A Dt_openat.c46 #define FILE "dir/openat"
47 #define BASEFILE "openat"
53 atf_tc_set_md_var(tc, "descr", "See that openat works with fd");
65 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDONLY, 0)) != -1);
74 "See that openat works with fd as AT_FDCWD");
85 ATF_REQUIRE((fd = openat(AT_FDCWD, BASEFILE, O_RDONLY, 0)) != -1);
93 "See that openat fails with fd as AT_FDCWD and bad path");
100 ATF_REQUIRE((fd = openat(AT_FDCWD, FILEERR, O_RDONLY, 0)) == -1);
106 atf_tc_set_md_var(tc, "descr", "See that openat fail with bad path");
115 ATF_REQUIRE((fd = openat(df
[all...]
H A Dt_o_search.c73 atf_tc_set_md_var(tc, "descr", "See that openat enforces search permission");
87 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
92 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1);
103 atf_tc_set_md_var(tc, "descr", "See that root openat honours O_SEARCH");
117 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
122 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
127 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
135 atf_tc_set_md_var(tc, "descr", "See that openat honours O_SEARCH");
149 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
154 ATF_REQUIRE((fd = openat(df
[all...]
/freebsd-13-stable/usr.sbin/pw/
H A Dcpdir.c68 homefd = openat(rootfd, dir, O_DIRECTORY);
87 copymkdir(homefd, p, openat(skelfd, e->d_name, O_DIRECTORY),
104 if ((srcfd = openat(skelfd, e->d_name, O_RDONLY)) == -1)
106 destfd = openat(homefd, p, O_RDWR | O_CREAT | O_EXCL,
H A Drm_r.c54 dirfd = openat(rootfd, path, O_DIRECTORY);
/freebsd-13-stable/contrib/openbsm/bin/auditdistd/
H A Dopenat.h38 openat(int fd, const char *path, int flags, ...) function
/freebsd-13-stable/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/
H A Dcp_files.c43 int fd = openat(tfd, dirent->d_name, O_CREAT|O_WRONLY, 0666);
/freebsd-13-stable/tests/sys/capsicum/
H A DMakefile28 openat.cc \
/freebsd-13-stable/lib/libc/tests/gen/
H A Ddir2_test.c76 fd = openat(dirfd, filename, O_WRONLY | O_CREAT, 0600);
153 fd = openat(dirfd, filename, O_WRONLY | O_CREAT, 0600);
/freebsd-13-stable/libexec/rtld-elf/tests/
H A Dld_library_pathfds.c170 (dp->binary = openat(dp->testdir, "target", O_RDONLY)) >= 0);
220 return openat(parent, name, O_RDONLY | O_DIRECTORY);
/freebsd-13-stable/tests/sys/audit/
H A Dopen.c29 * Note: open(2) and openat(2) have 12 events each for various values of 'flag'
32 * 270:AUE_OPENAT_R:openat(2) - read:fr
33 * 271:AUE_OPENAT_RC:openat(2) - read,creat:fc,fr,fa,fm
34 * 272:AUE_OPENAT_RT:openat(2) - read,trunc:fd,fr,fa,fm
35 * 273:AUE_OPENAT_RTC:openat(2) - read,creat,trunc:fc,fd,fr,fa,fm
36 * 274:AUE_OPENAT_W:openat(2) - write:fw
37 * 275:AUE_OPENAT_WC:openat(2) - write,creat:fc,fw,fa,fm
38 * 276:AUE_OPENAT_WT:openat(2) - write,trunc:fd,fw,fa,fm
39 * 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm
40 * 278:AUE_OPENAT_RW:openat(
[all...]
/freebsd-13-stable/lib/libutil/
H A Dflopen.c74 if ((fd = openat(dirfd, path, flags, mode)) == -1)
/freebsd-13-stable/contrib/dma/
H A Ddma-mbox-create.c176 f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
/freebsd-13-stable/sys/kern/
H A Dcapabilities.conf489 openat

Completed in 244 milliseconds

123