Searched refs:dirfd (Results 1 - 25 of 38) sorted by relevance

12

/freebsd-10.1-release/lib/libc/gen/
H A Ddirfd.c41 dirfd(DIR *dirp) function
H A DMakefile.inc29 dirfd.c \
306 directory.3 dirfd.3 \
H A DSymbol.map385 dirfd;
/freebsd-10.1-release/tools/regression/security/cap_test/
H A Dcap_test_capabilities.c114 try_file_ops(int filefd, int dirfd, cap_rights_t rights) argument
138 REQUIRE(dfd_cap = cap_new(dirfd, rights));
191 CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0);
197 CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0);
202 CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0);
207 ret = openat(dirfd, "cap_fsync", O_CREAT, 0600);
234 CHECK(unlinkat(dirfd, "cap_fsync", 0) == 0);
239 ret = openat(dirfd, "cap_ftruncate", O_CREAT, 0600);
254 CHECK(unlinkat(dirfd, "cap_ftruncate", 0) == 0);
260 CHECK(ret == -1 || unlinkat(dirfd, "cap_creat
435 int filefd, dirfd, tmpfd; local
[all...]
/freebsd-10.1-release/crypto/heimdal/lib/roken/
H A Dcloexec.c64 rk_cloexec(dirfd(d));
/freebsd-10.1-release/sys/security/audit/
H A Daudit.h98 void audit_arg_sockaddr(struct thread *td, int dirfd, struct sockaddr *sa);
102 void audit_arg_upath1(struct thread *td, int dirfd, char *upath);
103 void audit_arg_upath2(struct thread *td, int dirfd, char *upath);
270 #define AUDIT_ARG_SOCKADDR(td, dirfd, sa) do { \
272 audit_arg_sockaddr((td), (dirfd), (sa)); \
290 #define AUDIT_ARG_UPATH1(td, dirfd, upath) do { \
292 audit_arg_upath1((td), (dirfd), (upath)); \
295 #define AUDIT_ARG_UPATH2(td, dirfd, upath) do { \
297 audit_arg_upath2((td), (dirfd), (upath)); \
368 #define AUDIT_ARG_SOCKADDR(td, dirfd, s
[all...]
H A Daudit_arg.c444 audit_arg_sockaddr(struct thread *td, int dirfd, struct sockaddr *sa) argument
466 if (dirfd != AT_FDCWD)
467 audit_arg_atfd1(dirfd);
468 audit_arg_upath1(td, dirfd,
713 audit_arg_upath(struct thread *td, int dirfd, char *upath, char **pathp) argument
718 audit_canon_path(td, dirfd, upath, *pathp);
722 audit_arg_upath1(struct thread *td, int dirfd, char *upath) argument
730 audit_arg_upath(td, dirfd, upath, &ar->k_ar.ar_arg_upath1);
735 audit_arg_upath2(struct thread *td, int dirfd, char *upath) argument
743 audit_arg_upath(td, dirfd, upat
[all...]
H A Daudit_bsm_klib.c464 audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) argument
493 if (dirfd == AT_FDCWD) {
498 error = fgetvp(td, dirfd, NULL, &cvnp);
H A Daudit_private.h395 void audit_canon_path(struct thread *td, int dirfd, char *path,
/freebsd-10.1-release/sys/sys/
H A Dnamei.h160 #define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \
161 NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, 0, td)
162 #define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \
163 NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td)
168 enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir,
/freebsd-10.1-release/include/
H A Ddirent.h79 int dirfd(DIR *);
/freebsd-10.1-release/usr.bin/bsdiff/bspatch/
H A Dbspatch.c56 static int dirfd = -1; variable
62 if (dirfd != -1 && newfile != NULL)
63 if (unlinkat(dirfd, newfile, 0))
124 (dirfd = open(directory, O_DIRECTORY)) < 0)
130 if ((newfd = openat(dirfd, newfile,
152 cap_rights_limit(dirfd, &rights_dir) < 0)
/freebsd-10.1-release/bin/pax/
H A Dtables.c75 static int dirfd = -1; /* storage for setting created dir time/mode */ variable
1094 if (dirfd != -1)
1101 if ((dirfd = mkstemp(tempfile)) >= 0) {
1128 if (dirfd < 0)
1135 if ((dblk.npos = lseek(dirfd, 0L, SEEK_CUR)) < 0) {
1148 if ((write(dirfd, name, dblk.nlen) == dblk.nlen) &&
1149 (write(dirfd, (char *)&dblk, sizeof(dblk)) == sizeof(dblk))) {
1171 if (dirfd < 0)
1181 if (lseek(dirfd, -((off_t)sizeof(dblk)), SEEK_CUR) < 0)
1183 if (read(dirfd,(cha
[all...]
/freebsd-10.1-release/crypto/openssh/openbsd-compat/
H A Dbsd-closefrom.c84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
H A Dgetcwd.c148 if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
/freebsd-10.1-release/contrib/openbsm/bin/auditdistd/
H A Dtrail.c164 dfd = dirfd(dirfp);
223 dfd = dirfd(trail->tr_dirfp);
368 dfd = dirfd(trail->tr_dirfp);
422 dfd = dirfd(trail->tr_dirfp);
450 fd = dirfd(trail->tr_dirfp);
494 return (dirfd(trail->tr_dirfp));
/freebsd-10.1-release/usr.sbin/rwhod/
H A Drwhod.c355 int dirfd; local
362 dirfd = open(".", O_RDONLY | O_DIRECTORY);
363 if (dirfd < 0) {
369 if (cap_rights_limit(dirfd, &rights) < 0 && errno != ENOSYS) {
409 whod = openat(dirfd, path, O_WRONLY | O_CREAT, 0644);
446 (void) close(dirfd);
/freebsd-10.1-release/contrib/tcpdump/
H A Dtcpdump.c397 int dirfd; member in struct:dump_info
1531 dumpinfo.dirfd = open(dirname(WFileName),
1533 if (dumpinfo.dirfd < 0) {
1539 if (cap_rights_limit(dumpinfo.dirfd, &rights) < 0 &&
1922 fd = openat(dump_info->dirfd,
1988 fd = openat(dump_info->dirfd, dump_info->CurrentFileName,
/freebsd-10.1-release/libexec/atrun/
H A Datrun.c525 if (flock(dirfd(spool), LOCK_EX) == -1)
570 if (flock(dirfd(spool), LOCK_UN) == -1)
/freebsd-10.1-release/crypto/heimdal/lib/krb5/
H A Dkuserok.c141 fd = dirfd(d);
/freebsd-10.1-release/sys/kern/
H A Dvfs_lookup.c1056 const char *namep, int dirfd, struct vnode *startdir, cap_rights_t *rightsp,
1064 ndp->ni_dirfd = dirfd;
1139 enum uio_seg pathseg, char **pathbuf, int create, int dirfd)
1177 if (dirfd != AT_FDCWD) {
1180 * included in the already opened dirfd.
1055 NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir, cap_rights_t *rightsp, struct thread *td) argument
1138 kern_alternate_path(struct thread *td, const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd) argument
H A Duipc_syscalls.c260 kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) argument
268 AUDIT_ARG_SOCKADDR(td, dirfd, sa);
282 if (dirfd == AT_FDCWD)
285 error = sobindat(dirfd, so, sa, td);
626 kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) argument
634 AUDIT_ARG_SOCKADDR(td, dirfd, sa);
653 if (dirfd == AT_FDCWD)
656 error = soconnectat(dirfd, so, sa, td);
/freebsd-10.1-release/usr.bin/rwho/
H A Drwho.c126 dfd = dirfd(dirp);
/freebsd-10.1-release/usr.sbin/lpr/common_source/
H A Dcommon.c132 if (fstat(dirfd(dirp), &stbuf) < 0)
/freebsd-10.1-release/contrib/sendmail/src/
H A Dmap.c1501 int dirfd;
1510 dirfd = safeopen(dirfile, mode, DBMMODE, sff);
1513 if (dirfd < 0 || pagfd < 0)
1516 if (dirfd >= 0)
1517 (void) close(dirfd);
1525 if (ftruncate(dirfd, (off_t) 0) < 0 ||
1529 (void) close(dirfd);
1539 (fstat(dirfd, &std) < 0 || fstat(pagfd, &stp) < 0))
1542 (void) close(dirfd);
1551 map->map_lockfd = dirfd;
[all...]

Completed in 287 milliseconds

12