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

12

/freebsd-10-stable/lib/libc/gen/
H A Ddirfd.c41 dirfd(DIR *dirp) function
H A DMakefile.inc30 dirfd.c \
307 directory.3 dirfd.3 \
H A DSymbol.map385 dirfd;
/freebsd-10-stable/usr.sbin/pw/
H A Drm_r.c44 int dirfd; local
52 dirfd = openat(rootfd, path, O_DIRECTORY);
53 if (dirfd == -1) {
57 d = fdopendir(dirfd);
62 if (fstatat(dirfd, e->d_name, &st, AT_SYMLINK_NOFOLLOW) != 0)
65 rm_r(dirfd, e->d_name, uid);
67 unlinkat(dirfd, e->d_name, 0);
/freebsd-10-stable/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-stable/crypto/heimdal/lib/roken/
H A Dcloexec.c64 rk_cloexec(dirfd(d));
/freebsd-10-stable/contrib/netbsd-tests/fs/hfs/
H A Dt_pathconvert.c36 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-stable/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);
/freebsd-10-stable/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-stable/include/
H A Ddirent.h79 int dirfd(DIR *);
/freebsd-10-stable/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))
133 (dirfd = open(directory, O_DIRECTORY)) < 0)
139 if ((newfd = openat(dirfd, newfile,
161 cap_rights_limit(dirfd, &rights_dir) < 0)
/freebsd-10-stable/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-stable/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-stable/contrib/openbsm/bin/auditdistd/
H A Dtrail.c162 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-stable/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-stable/contrib/tcpdump/
H A Dtcpdump.c397 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-stable/libexec/atrun/
H A Datrun.c526 if (flock(dirfd(spool), LOCK_EX) == -1)
571 if (flock(dirfd(spool), LOCK_UN) == -1)
/freebsd-10-stable/crypto/heimdal/lib/krb5/
H A Dkuserok.c141 fd = dirfd(d);
/freebsd-10-stable/usr.bin/rwho/
H A Drwho.c126 dfd = dirfd(dirp);
/freebsd-10-stable/sys/kern/
H A Dvfs_lookup.c1055 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 Duipc_syscalls.c254 kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) argument
262 AUDIT_ARG_SOCKADDR(td, dirfd, sa);
276 if (dirfd == AT_FDCWD)
279 error = sobindat(dirfd, so, sa, td);
618 kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) argument
626 AUDIT_ARG_SOCKADDR(td, dirfd, sa);
645 if (dirfd == AT_FDCWD)
648 error = soconnectat(dirfd, so, sa, td);
/freebsd-10-stable/usr.sbin/cron/cron/
H A Ddatabase.c127 if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 &&

Completed in 313 milliseconds

12