| /freebsd-14-stable/usr.bin/mail/ |
| HD | edit.c | 141 char *edit, tempname[PATHSIZE]; in run_editor() local 144 (void)snprintf(tempname, sizeof(tempname), in run_editor() 146 if ((t = mkstemp(tempname)) == -1 || in run_editor() 148 warn("%s", tempname); in run_editor() 152 warn("%s", tempname); in run_editor() 153 (void)rm(tempname); in run_editor() 169 warnx("%s", tempname); in run_editor() 170 (void)rm(tempname); in run_editor() 175 warn("%s", tempname); in run_editor() 176 (void)rm(tempname); in run_editor() [all …]
|
| HD | quit.c | 76 char *mbox, tempname[PATHSIZE]; in quit() local 110 (void)snprintf(tempname, sizeof(tempname), in quit() 112 if ((fd = mkstemp(tempname)) == -1 || in quit() 129 if ((rbuf = Fopen(tempname, "r")) == NULL) in quit() 131 (void)rm(tempname); in quit() 202 (void)snprintf(tempname, sizeof(tempname), in quit() 204 if ((fd = mkstemp(tempname)) == -1 || in quit() 206 warn("%s", tempname); in quit() 210 if ((ibuf = Fopen(tempname, "r")) == NULL) { in quit() 211 warn("%s", tempname); in quit() [all …]
|
| HD | collect.c | 77 char linebuf[LINESIZE], tempname[PATHSIZE], *cp, getsub; in collect() local 99 (void)rm(tempname); in collect() 105 (void)snprintf(tempname, sizeof(tempname), in collect() 107 if ((fd = mkstemp(tempname)) == -1 || in collect() 109 warn("%s", tempname); in collect() 112 (void)rm(tempname); in collect() 428 if (forward(linebuf + 2, collf, tempname, c) < 0) in collect() 565 char *sh, tempname[PATHSIZE]; in mespipe() local 567 (void)snprintf(tempname, sizeof(tempname), in mespipe() 569 if ((fd = mkstemp(tempname)) == -1 || in mespipe() [all …]
|
| HD | send.c | 458 char tempname[PATHSIZE]; in infix() local 460 (void)snprintf(tempname, sizeof(tempname), in infix() 462 if ((fd = mkstemp(tempname)) == -1 || in infix() 464 warn("%s", tempname); in infix() 467 if ((nfi = Fopen(tempname, "r")) == NULL) { in infix() 468 warn("%s", tempname); in infix() 470 (void)rm(tempname); in infix() 473 (void)rm(tempname); in infix() 488 warn("%s", tempname); in infix()
|
| HD | lex.c | 72 char tempname[PATHSIZE]; in setfile() local 130 (void)snprintf(tempname, sizeof(tempname), in setfile() 132 if ((fd = mkstemp(tempname)) == -1 || (otf = fdopen(fd, "w")) == NULL) in setfile() 133 err(1, "%s", tempname); in setfile() 135 if ((itf = fopen(tempname, "r")) == NULL) in setfile() 136 err(1, "%s", tempname); in setfile() 138 (void)rm(tempname); in setfile()
|
| HD | names.c | 311 char tempname[PATHSIZE]; in outof() local 313 (void)snprintf(tempname, sizeof(tempname), in outof() 315 if ((fd = mkstemp(tempname)) == -1 || in outof() 317 warn("%s", tempname); in outof() 321 image = open(tempname, O_RDWR); in outof() 322 (void)rm(tempname); in outof() 324 warn("%s", tempname); in outof() 339 warn("%s", tempname); in outof()
|
| /freebsd-14-stable/sbin/ldconfig/ |
| HD | elfhints.c | 270 char *tempname; in write_elf_hints() local 275 if (asprintf(&tempname, "%s.XXXXXX", hintsfile) == -1) in write_elf_hints() 277 if ((fd = mkstemp(tempname)) == -1) in write_elf_hints() 278 err(1, "mkstemp(%s)", tempname); in write_elf_hints() 280 err(1, "fchmod(%s)", tempname); in write_elf_hints() 282 err(1, "fdopen(%s)", tempname); in write_elf_hints() 304 err(1, "%s: write error", tempname); in write_elf_hints() 308 err(1, "%s: write error", tempname); in write_elf_hints() 311 err(1, "%s: write error", tempname); in write_elf_hints() 314 err(1, "%s: write error", tempname); in write_elf_hints() [all …]
|
| /freebsd-14-stable/lib/libutil/ |
| HD | pw_util.c | 72 static char tempname[PATH_MAX]; variable 220 if (snprintf(tempname, sizeof(tempname), "%.*spw.XXXXXX", in pw_tmp() 221 (int)(p - masterpasswd), masterpasswd) >= (int)sizeof(tempname)) { in pw_tmp() 225 if ((tfd = mkostemp(tempname, 0)) == -1) in pw_tmp() 232 unlink(tempname); in pw_tmp() 233 *tempname = '\0'; in pw_tmp() 258 "-d", passwd_dir, tempname, (char *)NULL); in pw_mkdb() 261 "-d", passwd_dir, "-u", user, tempname, in pw_mkdb() 292 if (stat(tempname, &st1) == -1) in pw_edit() 315 execlp(editor, editor, tempname, (char *)NULL); in pw_edit() [all …]
|
| HD | gr_util.c | 50 static char tempname[PATH_MAX]; variable 139 if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX", in gr_tmp() 140 (int)(p - group_file), group_file) >= (int)sizeof(tempname)) { in gr_tmp() 144 if ((tfd = mkostemp(tempname, 0)) == -1) in gr_tmp() 151 unlink(tempname); in gr_tmp() 152 *tempname = '\0'; in gr_tmp() 334 if (chmod(tempname, 0644) != 0) in gr_mkdb() 337 if (rename(tempname, group_file) != 0) in gr_mkdb() 368 if (*tempname != '\0') { in gr_fini() 369 unlink(tempname); in gr_fini() [all …]
|
| /freebsd-14-stable/tools/test/stress2/misc/ |
| HD | truncate6.sh | 102 char tempname[] = "file"; 105 if ((fd = open(tempname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE)) == 107 err(1, "open(%s)", tempname);
|
| /freebsd-14-stable/contrib/less/ |
| HD | cmdbuf.c | 1551 char *tempname = ecalloc(1, strlen(filename)+1); in make_tempname() local 1552 strcpy(tempname, filename); in make_tempname() 1553 lastch = tempname[strlen(tempname)-1]; in make_tempname() 1554 tempname[strlen(tempname)-1] = (lastch == 'Q') ? 'Z' : 'Q'; in make_tempname() 1555 return tempname; in make_tempname() 1651 char *tempname; in save_cmdhist() local 1664 tempname = make_tempname(histname); in save_cmdhist() 1665 fout = fopen(tempname, "w"); in save_cmdhist() 1691 rename(tempname, histname); in save_cmdhist() 1693 free(tempname); in save_cmdhist()
|
| /freebsd-14-stable/lib/libc/tests/gen/ |
| HD | dlopen_empty_test.c | 57 char tempname[] = "/tmp/temp.XXXXXX"; in ATF_TC_BODY() local 63 fname = mktemp(tempname); in ATF_TC_BODY()
|
| /freebsd-14-stable/contrib/unifdef/ |
| HD | unifdef.c | 192 static char *tempname; /* avoid splatting input */ variable 424 tempname = astrcat(ofn, ".XXXXXX"); in processinout() 425 output = mktempmode(tempname, st.st_mode); in processinout() 427 err(2, "can't create %s", tempname); in processinout() 439 if (remove(tempname) < 0) in processinout() 440 warn("can't remove \"%s\"", tempname); in processinout() 441 } else if (replace(tempname, ofn) < 0) in processinout() 442 err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); in processinout() 443 free(tempname); in processinout() 444 tempname = NULL; in processinout() [all …]
|
| /freebsd-14-stable/contrib/tzcode/ |
| HD | zic.c | 652 char const *tempname) in close_file() argument 661 if (tempname) in close_file() 662 (void)remove(tempname); in close_file() 1380 open_outfile(char const **outname, char **tempname) in open_outfile() argument 1390 if (!*tempname) in open_outfile() 1391 random_dirent(outname, tempname); in open_outfile() 1407 random_dirent(outname, tempname); in open_outfile() 1422 rename_dest(char *tempname, char const *name) in rename_dest() argument 1424 if (tempname) { in rename_dest() 1425 if (rename(tempname, name) != 0) { in rename_dest() [all …]
|
| /freebsd-14-stable/usr.sbin/kldxref/ |
| HD | kldxref.c | 738 static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; variable 821 rename(tempname, xrefname); in main() 824 unlink(tempname); in main() 834 fxref = maketempfile(tempname, ftsp->fts_path); in main() 836 err(1, "can't create %s", tempname); in main()
|
| /freebsd-14-stable/crypto/openssl/apps/lib/ |
| HD | opt.c | 1161 WCHAR tempname[MAX_PATH]; in opt_isdir() local 1167 if (!MultiByteToWideChar(CP_ACP, 0, name, len_0, tempname, MAX_PATH)) in opt_isdir() 1170 tempname[i] = (WCHAR)name[i]; in opt_isdir() 1172 attr = GetFileAttributes(tempname); in opt_isdir()
|
| /freebsd-14-stable/contrib/diff/ |
| HD | FREEBSD-Xlist | 46 lib/tempname.c
|
| HD | ChangeLog | 680 (tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf. 708 lib/tempname.c: Update to latest version from other packages. 1677 * lib/tempname.c (uint64_t): 1682 * lib/tempname.c: glibc 1.32 1690 * lib/tempname.c (struct_stat64): New macro. 1694 * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
|
| /freebsd-14-stable/sbin/fsck_ffs/ |
| HD | dir.c | 577 char tempname[BUFSIZ]; in linkup() local 668 (void)lftempname(tempname, orphan); in linkup() 669 if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) { in linkup()
|