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

12

/freebsd-12-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-12-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);
47 openat(int fd, const char *path, int flags, ...) function
H A Dinterposing_table.c52 SLOT(openat, __sys_openat),
/freebsd-12-stable/cddl/compat/opensolaris/include/
H A Dfcntl.h36 #define openat64(...) openat(__VA_ARGS__)
/freebsd-12-stable/tests/sys/vfs/
H A Dlookup_cap_dotdot.c50 ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
91 atf_tc_set_md_var(tc, "descr", "Basic positive openat testcases");
98 ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0);
99 ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0);
100 ATF_REQUIRE(openat(dirfd, "l3/f3", O_RDONLY) >= 0);
101 ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0);
102 ATF_REQUIRE(openat(dirfd, "../testdir/d1/f1", O_RDONLY) >= 0);
103 ATF_REQUIRE(openat(dirfd, "lup/f1", O_RDONLY) >= 0);
104 ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0);
105 ATF_REQUIRE(openat(dirf
[all...]
/freebsd-12-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-12-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-12-stable/contrib/openbsm/bin/auditdistd/
H A Dopenat.h38 openat(int fd, const char *path, int flags, ...) function
H A Dtrail.c55 #include "openat.h"
224 fd = openat(dfd, trail->tr_filename, O_RDONLY);
366 trail->tr_filefd = openat(dfd, curfile, O_RDONLY);
/freebsd-12-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-12-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-12-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-12-stable/lib/libutil/
H A Dflopen.c74 if ((fd = openat(dirfd, path, flags, mode)) == -1)
/freebsd-12-stable/contrib/dma/
H A Ddma-mbox-create.c176 f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
/freebsd-12-stable/tests/sys/capsicum/
H A Dbindat_connectat.c63 return (openat(rootfd, path + 1, flags, mode));
65 return (openat(AT_FDCWD, path, flags, mode));
/freebsd-12-stable/sys/kern/
H A Dcapabilities.conf477 openat
/freebsd-12-stable/contrib/mandoc/
H A Dcatman.c132 if ((out_fd = openat(dstdir_fd, path,
135 warn("openat(%s)", path);
/freebsd-12-stable/sys/sys/
H A Dfcntl.h206 * to determine the target of relative file paths in the openat() and
336 int openat(int, const char *, int, ...);
H A Dsyscall.mk347 openat.o \
/freebsd-12-stable/tests/sys/cddl/zfs/bin/
H A Dmktree.c181 if ((afd = openat(fd, "xattr", O_CREAT | O_RDWR | O_XATTR, 0777)) < 0) {
182 (void) fprintf(stderr, "openat failed.\n[%d]: %s.\n",
/freebsd-12-stable/contrib/file/src/
H A Dseccomp.c210 ALLOW_RULE(openat);
/freebsd-12-stable/lib/libc/include/
H A Dnamespace.h86 #define openat _openat macro

Completed in 324 milliseconds

12