| /openbsd-src/usr.sbin/cron/ |
| H A D | atrun.c | 63 int dfd, pending; in scan_atjobs() local 72 dfd = open(_PATH_AT_SPOOL, O_RDONLY|O_DIRECTORY|O_CLOEXEC); in scan_atjobs() 73 if (dfd == -1) { in scan_atjobs() 77 if (fstat(dfd, &sb) != 0) { in scan_atjobs() 79 close(dfd); in scan_atjobs() 83 close(dfd); in scan_atjobs() 87 if ((atdir = fdopendir(dfd)) == NULL) { in scan_atjobs() 89 close(dfd); in scan_atjobs() 102 if (fstatat(dfd, file->d_name, &sb, AT_SYMLINK_NOFOLLOW) != 0 || in scan_atjobs() 162 int dfd, len; in atrun() local [all …]
|
| H A D | database.c | 169 process_crontab(int dfd, const char *uname, const char *fname, in process_crontab() argument 186 fd = openat(dfd, fname, O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC); in process_crontab()
|
| /openbsd-src/usr.sbin/installboot/ |
| H A D | util.c | 42 int sfd, dfd; in filecopy() local 56 dfd = open(dstfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); in filecopy() 57 if (dfd == -1) { in filecopy() 61 if (fchown(dfd, 0, 0) == -1) in filecopy() 66 if (fchmod(dfd, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) { in filecopy() 84 if (write(dfd, buf, n) != n) { in filecopy() 91 ftruncate(dfd, sb.st_size); in filecopy() 93 close(dfd); in filecopy()
|
| /openbsd-src/usr.bin/rsync/ |
| H A D | copy.c | 70 int fromfd, tofd, dfd; in copy_file() local 72 dfd = openat(rootfd, basedir, O_RDONLY | O_DIRECTORY); in copy_file() 73 if (dfd == -1) in copy_file() 76 fromfd = openat(dfd, f->path, O_RDONLY | O_NOFOLLOW); in copy_file() 79 close(dfd); in copy_file()
|
| H A D | receiver.c | 178 int rc = 0, dfd = -1, phase = 0, c; in rsync_receiver() local 271 dfd = open(root, O_RDONLY | O_DIRECTORY); in rsync_receiver() 272 if (dfd == -1) in rsync_receiver() 290 if (!flist_del(sess, dfd, dfl, dflsz)) { in rsync_receiver() 307 ul = upload_alloc(root, dfd, fdout, CSUM_LENGTH_PHASE1, fl, flsz, in rsync_receiver() 315 dl = download_alloc(sess, fdin, fl, flsz, dfd); in rsync_receiver() 451 if (dfd != -1) in rsync_receiver() 452 close(dfd); in rsync_receiver()
|
| H A D | uploader.c | 756 int dfd, x; in pre_file() local 758 dfd = openat(p->rootfd, root, O_RDONLY | O_DIRECTORY); in pre_file() 759 if (dfd == -1) in pre_file() 761 x = check_file(dfd, f, &st, sess); in pre_file() 774 close(dfd); in pre_file() 780 close(dfd); in pre_file()
|
| /openbsd-src/usr.sbin/rbootd/ |
| H A D | parseconf.c | 296 DIR *dfd; in GetBootFiles() local 310 if ((dfd = opendir(".")) == NULL) { /* open BootDir */ in GetBootFiles() 322 for (dp = readdir(dfd); dp != NULL; dp = readdir(dfd)) { in GetBootFiles() 334 (void) closedir(dfd); /* close BootDir */ in GetBootFiles()
|
| /openbsd-src/usr.bin/chpass/ |
| H A D | chpass.c | 65 int i, ch, pfd, tfd, dfd; in main() local 133 dfd = mkostemp(tempname, O_CLOEXEC); in main() 134 if (dfd == -1) in main() 136 display(tempname, dfd, pw); in main() 149 close(dfd); in main()
|
| /openbsd-src/gnu/llvm/compiler-rt/include/sanitizer/ |
| H A D | linux_syscall_hooks.h | 1574 #define __sanitizer_syscall_pre_mknodat(dfd, filename, mode, dev) \ argument 1575 __sanitizer_syscall_pre_impl_mknodat((long)(dfd), (long)(filename), \ 1577 #define __sanitizer_syscall_post_mknodat(res, dfd, filename, mode, dev) \ argument 1578 __sanitizer_syscall_post_impl_mknodat(res, (long)(dfd), (long)(filename), \ 1580 #define __sanitizer_syscall_pre_mkdirat(dfd, pathname, mode) \ argument 1581 __sanitizer_syscall_pre_impl_mkdirat((long)(dfd), (long)(pathname), \ 1583 #define __sanitizer_syscall_post_mkdirat(res, dfd, pathname, mode) \ argument 1584 __sanitizer_syscall_post_impl_mkdirat(res, (long)(dfd), (long)(pathname), \ 1586 #define __sanitizer_syscall_pre_unlinkat(dfd, pathname, flag) \ argument 1587 __sanitizer_syscall_pre_impl_unlinkat((long)(dfd), (long)(pathname), \ [all …]
|
| /openbsd-src/usr.bin/at/ |
| H A D | at.c | 445 int dfd, i, shortformat; in list_jobs() local 478 if ((dfd = open(_PATH_AT_SPOOL, O_RDONLY|O_DIRECTORY)) == -1 || in list_jobs() 479 (spool = fdopendir(dfd)) == NULL) in list_jobs() 482 if (fstat(dfd, &stbuf) != 0) in list_jobs() 498 if (fstatat(dfd, dirent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW) != 0) in list_jobs() 621 int error, i, ch, changed, dfd; in process_jobs() local 623 if ((dfd = open(_PATH_AT_SPOOL, O_RDONLY|O_DIRECTORY)) == -1 || in process_jobs() 624 (spool = fdopendir(dfd)) == NULL) in process_jobs() 656 if (fstatat(dfd, dirent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW) != 0) in process_jobs() 694 if (unlinkat(dfd, diren in process_jobs() [all...] |
| /openbsd-src/usr.sbin/acme-client/ |
| H A D | netproc.c | 51 int dfd; /* dnsproc handle */ 182 if ((ssz = urlresolve(c->dfd, host, src)) < 0) { in nreq() 258 if ((ssz = urlresolve(c->dfd, host, src)) < 0) { in sreq() 312 } else if ((ssz = urlresolve(c->dfd, host, src)) < 0) { in sreq() 672 netproc(int kfd, int afd, int Cfd, int cfd, int dfd, int rfd, in netproc() 744 c.dfd = dfd; in netproc() 910 close(dfd); in netproc() 50 int dfd; /* dnsproc handle */ global() member 660 netproc(int kfd,int afd,int Cfd,int cfd,int dfd,int rfd,int revocate,struct authority_c * authority,const char * const * alts,size_t altsz) netproc() argument
|
| /openbsd-src/sbin/savecore/ |
| H A D | savecore.c | 556 DIR *dfd; in find_dev() local 561 if ((dfd = opendir(_PATH_DEV)) == NULL) { in find_dev() 566 while ((dir = readdir(dfd))) { in find_dev() 576 closedir(dfd); in find_dev() 584 closedir(dfd); in find_dev()
|
| /openbsd-src/lib/libc/gen/ |
| H A D | fts.c | 794 fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) in fts_stat() argument 803 if (dfd == -1) { in fts_stat() 805 dfd = AT_FDCWD; in fts_stat() 818 if (fstatat(dfd, path, sbp, 0)) { in fts_stat() 820 if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { in fts_stat() 827 } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { in fts_stat()
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_common_syscalls.inc | 2712 PRE_SYSCALL(mknodat)(long dfd, const void *filename, long mode, long dev) { 2719 (long res, long dfd, const void *filename, long mode, long dev) {} 2721 PRE_SYSCALL(mkdirat)(long dfd, const void *pathname, long mode) { 2727 POST_SYSCALL(mkdirat)(long res, long dfd, const void *pathname, long mode) {} 2729 PRE_SYSCALL(unlinkat)(long dfd, const void *pathname, long flag) { 2735 POST_SYSCALL(unlinkat)(long res, long dfd, const void *pathname, long flag) {} 2772 PRE_SYSCALL(futimesat)(long dfd, const void *filename, void *utimes) { 2779 (long res, long dfd, const void *filename, void *utimes) { 2786 PRE_SYSCALL(faccessat)(long dfd, const void *filename, long mode) { 2792 POST_SYSCALL(faccessat)(long res, long dfd, const void *filename, long mode) {} [all …]
|
| /openbsd-src/gnu/usr.bin/perl/ |
| H A D | doio.c | 1695 int dfd; in S_argvout_final() 1709 dfd = my_dirfd(dir); in S_argvout_final() 1749 linkat(dfd, orig_pv, dfd, SvPVX(*back_psv), 0) < 0 && in S_argvout_final() 1762 S_my_renameat(dfd, orig_pv, dfd, SvPVX(*back_psv)) < 0 && in S_argvout_final() 1772 if (unlinkat(dfd, SvPVX_const(*temp_psv), 0) < 0 && in S_argvout_final() 1809 S_my_renameat(dfd, SvPVX(*temp_psv), dfd, orig_pv) < 0 && in S_argvout_final() 1819 if (unlinkat(dfd, SvPVX_cons 1652 int dfd; S_argvout_final() local [all...] |
| H A D | perlio.c | 3556 const int dfd = PerlLIO_dup_cloexec(fileno(stdio)); 3557 if (dfd >= 0) { 3558 stdio = PerlSIO_fdopen(dfd, PerlIO_modestr(o,mode)); in PerlIOStdio_get_cnt() 3131 const int dfd = PerlLIO_dup_cloexec(fileno(stdio)); PerlIOStdio_dup() local
|
| /openbsd-src/usr.bin/vi/common/ |
| H A D | recover.c | 463 rcv_openat(SCR *sp, int dfd, const char *name, int *locked) in rcv_openat() argument 472 fd = openat(dfd, name, O_RDONLY|O_NOFOLLOW|O_NONBLOCK); in rcv_openat()
|