/freebsd-10.3-release/lib/libc/gen/ |
H A D | dirfd.c | 26 * $FreeBSD: releng/10.3/lib/libc/gen/dirfd.c 235649 2012-05-19 14:30:49Z gleb $ 30 __FBSDID("$FreeBSD: releng/10.3/lib/libc/gen/dirfd.c 235649 2012-05-19 14:30:49Z gleb $"); 41 dirfd(DIR *dirp) function
|
H A D | Makefile.inc | 30 dirfd.c \ 307 directory.3 dirfd.3 \
|
/freebsd-10.3-release/usr.sbin/pw/ |
H A D | rm_r.c | 44 int dirfd; local 52 dirfd = openat(rootfd, path, O_DIRECTORY); 54 d = fdopendir(dirfd); 59 if (fstatat(dirfd, e->d_name, &st, AT_SYMLINK_NOFOLLOW) != 0) 62 rm_r(dirfd, e->d_name, uid); 64 unlinkat(dirfd, e->d_name, 0);
|
/freebsd-10.3-release/tools/regression/security/cap_test/ |
H A D | cap_test_capabilities.c | 114 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.3-release/contrib/netbsd-tests/fs/hfs/ |
H A D | t_pathconvert.c | 36 int dirfd, fd; local 58 RL(dirfd = rump_sys_open("/mp", O_RDONLY)); 60 RL(nbytes = rump_sys_getdents(dirfd, buf, sizeof buf)); 73 RL(rump_sys_close(dirfd));
|
/freebsd-10.3-release/crypto/heimdal/lib/roken/ |
H A D | cloexec.c | 64 rk_cloexec(dirfd(d));
|
/freebsd-10.3-release/sys/security/audit/ |
H A D | audit.h | 98 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 D | audit_arg.c | 444 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 D | audit_bsm_klib.c | 464 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 D | audit_private.h | 395 void audit_canon_path(struct thread *td, int dirfd, char *path,
|
/freebsd-10.3-release/sys/sys/ |
H A D | namei.h | 160 #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.3-release/include/ |
H A D | dirent.h | 79 int dirfd(DIR *);
|
/freebsd-10.3-release/usr.bin/bsdiff/bspatch/ |
H A D | bspatch.c | 56 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.3-release/bin/pax/ |
H A D | tables.c | 75 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.3-release/crypto/openssh/openbsd-compat/ |
H A D | bsd-closefrom.c | 84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
|
H A D | getcwd.c | 148 if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
|
/freebsd-10.3-release/contrib/openbsm/bin/auditdistd/ |
H A D | trail.c | 162 dfd = dirfd(dirfp); 221 dfd = dirfd(trail->tr_dirfp); 366 dfd = dirfd(trail->tr_dirfp); 420 dfd = dirfd(trail->tr_dirfp); 448 fd = dirfd(trail->tr_dirfp); 492 return (dirfd(trail->tr_dirfp));
|
/freebsd-10.3-release/usr.sbin/rwhod/ |
H A D | rwhod.c | 355 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.3-release/contrib/tcpdump/ |
H A D | tcpdump.c | 397 int dirfd; member in struct:dump_info 1602 dumpinfo.dirfd = open(dirname(WFileName), 1604 if (dumpinfo.dirfd < 0) { 1610 if (cap_rights_limit(dumpinfo.dirfd, &rights) < 0 && 1992 fd = openat(dump_info->dirfd, 2054 fd = openat(dump_info->dirfd, dump_info->CurrentFileName,
|
/freebsd-10.3-release/libexec/atrun/ |
H A D | atrun.c | 525 if (flock(dirfd(spool), LOCK_EX) == -1) 570 if (flock(dirfd(spool), LOCK_UN) == -1)
|
/freebsd-10.3-release/crypto/heimdal/lib/krb5/ |
H A D | kuserok.c | 141 fd = dirfd(d);
|
/freebsd-10.3-release/sys/kern/ |
H A D | vfs_lookup.c | 1055 const char *namep, int dirfd, struct vnode *startdir, cap_rights_t *rightsp, 1063 ndp->ni_dirfd = dirfd; 1138 enum uio_seg pathseg, char **pathbuf, int create, int dirfd) 1176 if (dirfd != AT_FDCWD) { 1179 * included in the already opened dirfd. 1054 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 1137 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 D | uipc_syscalls.c | 260 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.3-release/usr.bin/rwho/ |
H A D | rwho.c | 126 dfd = dirfd(dirp);
|
/freebsd-10.3-release/usr.sbin/lpr/common_source/ |
H A D | common.c | 132 if (fstat(dirfd(dirp), &stbuf) < 0)
|