Home
last modified time | relevance | path

Searched refs:tmpname (Results 1 – 25 of 41) sorted by relevance

12

/titanic_41/usr/src/psm/stand/boot/sparc/common/
H A Dinetboot.c95 char tmpname[MAXPATHLEN]; in post_mountroot_nfs() local
106 (void) strncpy(tmpname, fn, strlen(fn)+1); in post_mountroot_nfs()
107 fn = tmpname; in post_mountroot_nfs()
112 (void) strncpy(tmpname, ctmpname, in post_mountroot_nfs()
114 fn = tmpname; in post_mountroot_nfs()
127 (void) strncpy(tmpname, cmd_line_boot_archive, in post_mountroot_nfs()
129 fn = tmpname; in post_mountroot_nfs()
132 (void) strncpy(tmpname, def_boot_archive, in post_mountroot_nfs()
134 fn = tmpname; in post_mountroot_nfs()
136 (void) strncpy(tmpname, def_miniroot, in post_mountroot_nfs()
[all …]
H A Dboot_plat.c171 char tmpname[MAXPATHLEN]; in post_mountroot() local
174 (void) cons_gets(tmpname, sizeof (tmpname)); in post_mountroot()
175 if (tmpname[0] != '\0') in post_mountroot()
176 (void) strcpy(bootfile, tmpname); in post_mountroot()
/titanic_41/usr/src/cmd/make/lib/makestate/
H A Dlock.c83 char tmpname[MAXPATHLEN]; in file_lock() local
118 (void) sprintf(tmpname, "%s.XXXXXX", lockname); in file_lock()
119 (void) mktemp(tmpname); in file_lock()
120 fd = creat(tmpname, 0666); in file_lock()
125 (const char *)"creat(%s)", tmpname); in file_lock()
128 if (stat(tmpname, &fs_statb) == -1) { in file_lock()
130 (const char *)"stat(%s)", tmpname); in file_lock()
133 (void) unlink(tmpname); in file_lock()
/titanic_41/usr/src/cmd/sgs/libldmake/common/
H A Dlock.c96 char tmpname[MAXPATHLEN]; in file_lock() local
132 (void) snprintf(tmpname, MAXPATHLEN, "%s.XXXXXX", in file_lock()
134 (void) mktemp(tmpname); in file_lock()
135 fd = creat(tmpname, 0666); in file_lock()
140 (const char *)"creat(%s)", tmpname, 0, in file_lock()
144 if (stat(tmpname, &fs_statb) == -1) { in file_lock()
146 (const char *)"stat(%s)", tmpname, 0, in file_lock()
150 (void) unlink(tmpname); in file_lock()
/titanic_41/usr/src/cmd/ypcmd/
H A Dmulti.awk.sh90 numnames = split(namelist[tmpaddr[i]], tmpname);
93 namelist[addr[host]] = tmpname[j];
96 if (namelist[addr[host]] == tmpname[j]) {
99 if (index(namelist[addr[host]], tmpname[j]) == 0) {
100 namelist[addr[host]] = namelist[addr[host]] " " tmpname[j];
105 if (tmpname[j] == tmpname[k]) {
111 namelist[addr[host]] = namelist[addr[host]] " " tmpname[j];
H A Dudpublickey.c62 char *tmpname; local
70 tmpname = malloc(strlen(fname) + 4);
71 if (tmpname == NULL) {
74 sprintf(tmpname, "%s.tmp", fname);
120 wf = fopen(tmpname, "w");
161 if (rename(tmpname, fname) < 0) {
165 if (unlink(tmpname) < 0) {
H A Dypserv_proc.c861 datum tmpname; in multihomed() local
865 tmpname.dsize = req.keydat.dsize + 9; in multihomed()
866 tmpname.dptr = name; in multihomed()
867 resp->valdat = dbm_fetch(fdb, tmpname); in multihomed()
1462 datum tmpname; in omultihomed() local
1467 tmpname.dsize = req.ypmatch_req_keysize + 9; in omultihomed()
1468 tmpname.dptr = name; in omultihomed()
1469 resp->ypmatch_resp_valdat = dbm_fetch(fdb, tmpname); in omultihomed()
/titanic_41/usr/src/lib/libshell/common/sh/
H A Dsuid_exec.c86 static char tmpname[] = "/tmp/SUIDXXXXXX"; variable
115 maketemp(tmpname); in main()
116 if(strcmp(p,tmpname)==0) in main()
138 if(stat(tmpname,&statb) < 0 || statb.st_nlink != 1 || in main()
379 unlink(tmpname); /* should normally fail */ in setids()
381 if((n = open(tmpname, O_WRONLY | O_CREAT | O_EXCL, SPECIAL)) < 0 || in setids()
382 unlink(tmpname) < 0) in setids()
384 if((n = open(tmpname, O_WRONLY | O_CREAT ,SPECIAL)) < 0 || unlink(tmpname) < 0) in setids()
408 while(unlink(tmpname) < 0 && errno == ETXTBSY) in setids()
429 if((n = open(tmpname,O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, mode)) < 0) in setids()
[all …]
/titanic_41/usr/src/cmd/keyserv/
H A Dupdate.c236 char tmpname[80]; local
253 (void) memset(tmpname, 0, 80);
254 (void) sprintf(tmpname, "%s.tmp", filename);
267 wfd = open(tmpname, O_CREAT|O_RDWR|O_TRUNC,
271 program_name, tmpname);
278 program_name, tmpname);
321 if (rename(tmpname, filename) < 0) {
324 program_name, tmpname, filename);
328 if (unlink(tmpname) < 0) {
331 program_name, tmpname);
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/
H A Dser_princ.c144 char *tmpname; in krb5_principal_internalize() local
161 tmpname = (char *) MALLOC(tmpsize); in krb5_principal_internalize()
162 if ((tmpname) && in krb5_principal_internalize()
163 !(kret = krb5_ser_unpack_bytes((krb5_octet *) tmpname, in krb5_principal_internalize()
166 tmpname[ibuf] = '\0'; in krb5_principal_internalize()
170 kret = krb5_parse_name(kcontext, tmpname, &principal); in krb5_principal_internalize()
184 FREE(tmpname,tmpsize); in krb5_principal_internalize()
/titanic_41/usr/src/lib/libdiskmgt/common/
H A Dinuse_lu.c173 char tmpname[TMPNM_SIZE]; in load_lu() local
177 (void) strlcpy(tmpname, "/var/run/dm_lu_XXXXXX", TMPNM_SIZE); in load_lu()
178 if ((fd = mkstemp(tmpname)) != -1) { in load_lu()
179 (void) unlink(tmpname); in load_lu()
268 char tmpname[TMPNM_SIZE]; in lustatus() local
287 (void) strlcpy(tmpname, "/var/run/dm_lu_XXXXXX", TMPNM_SIZE); in lustatus()
288 if ((ffd = mkstemp(tmpname)) != -1) { in lustatus()
289 (void) unlink(tmpname); in lustatus()
/titanic_41/usr/src/tools/ctf/cvt/
H A Dctfconvert.c236 char *tmpname = mktmpname(infile, ".ctf"); in main() local
238 write_ctf(mstrtd, infile, tmpname, dynsym); in main()
239 if (rename(tmpname, infile) != 0) in main()
240 terminate("Couldn't rename temp file %s", tmpname); in main()
241 free(tmpname); in main()
H A Dctfmerge.c204 static char *tmpname = NULL; variable
590 if (tmpname != NULL && dounlink) in terminate_cleanup()
591 unlink(tmpname); in terminate_cleanup()
610 tmpname = mktmpname(destfile, ".ctf"); in copy_ctf_data()
611 write_ctf(srctd, destfile, tmpname, CTF_COMPRESS); in copy_ctf_data()
612 if (rename(tmpname, destfile) != 0) { in copy_ctf_data()
613 terminate("Couldn't rename temp file %s to %s", tmpname, in copy_ctf_data()
616 free(tmpname); in copy_ctf_data()
991 tmpname = mktmpname(outfile, ".ctf"); in main()
992 write_ctf(savetd, outfile, tmpname, in main()
[all …]
/titanic_41/usr/src/cmd/ssh/libopenbsd-compat/common/
H A Dxmmap.c46 char tmpname[sizeof(MM_SWAP_TEMPLATE)] = MM_SWAP_TEMPLATE; in xmmap() local
49 tmpfd = mkstemp(tmpname); in xmmap()
53 unlink(tmpname); in xmmap()
/titanic_41/usr/src/cmd/sgs/libld/common/
H A Dwrap.c97 char *tmpname; in ld_wrap_enter() local
124 wsnp->wsn_wrapname = tmpname = (char *)(wsnp + 1); in ld_wrap_enter()
125 (void) snprintf(tmpname, wrapname_len, MSG_ORIG(MSG_FMT_STRCAT), in ld_wrap_enter()
/titanic_41/usr/src/cmd/filesync/
H A Drules.c290 char tmpname[ MAX_PATH ]; in write_rules() local
297 sprintf(tmpname, "%s-TMP", name); in write_rules()
300 newfile = fopen(tmpname, "w+"); in write_rules()
317 tmpname); in write_rules()
323 tmpname); in write_rules()
329 if (rename(tmpname, name) != 0) { in write_rules()
331 gettext(TXT_rules), tmpname, name); in write_rules()
H A Dbase.c668 char tmpname[ MAX_PATH ]; in write_baseline() local
678 sprintf(tmpname, "%s-TMP", name); in write_baseline()
681 newfile = fopen(tmpname, "w+"); in write_baseline()
684 tmpname); in write_baseline()
694 tmpname); in write_baseline()
700 tmpname); in write_baseline()
706 if (rename(tmpname, name) != 0) { in write_baseline()
708 gettext(TXT_base), tmpname, name); in write_baseline()
/titanic_41/usr/src/lib/pam_modules/authtok_check/
H A Dpacker.c84 char tmpname[sizeof (FNAME_TEMPLATE)]; in writeout() local
93 (void) strcpy(tmpname, FNAME_TEMPLATE); in writeout()
94 if ((fd = mkstemp(tmpname)) == -1) { in writeout()
99 (void) unlink(tmpname); in writeout()
/titanic_41/usr/src/lib/libshell/common/edit/
H A Dhistory.c464 char *buff, *endbuff, *tmpname=0; in hist_trim() local
474 tmpname = (char*)malloc(strlen(name)+14); in hist_trim()
478 pathtmp(tmpname,name,"hist",NIL(int*)); in hist_trim()
482 pathtmp(tmpname,".","hist",NIL(int*)); in hist_trim()
483 if(rename(name,tmpname) < 0) in hist_trim()
484 tmpname = name; in hist_trim()
485 fd = open(tmpname,O_RDONLY); in hist_trim()
487 if(tmpname==name) in hist_trim()
488 tmpname = 0; in hist_trim()
543 if(tmpname) in hist_trim()
[all …]
/titanic_41/usr/src/cmd/svr4pkg/pkginstall/
H A Dreqexec.c92 static char *tmpname = "checkinstallXXXXXX"; in dup_chkinstall() local
96 dstpathLen = strlen(tmpdir) + strlen(tmpname) + 3; in dup_chkinstall()
107 (void) snprintf(dstpath, dstpathLen, "%s/%s", tmpdir, tmpname); in dup_chkinstall()
/titanic_41/usr/src/cmd/dtrace/
H A Ddtrace.c384 char *fname = g_etcfile, *tmpname; in etcsystem_prune() local
427 tmpname = alloca(sz = strlen(fname) + 80); in etcsystem_prune()
428 (void) snprintf(tmpname, sz, "%s.dtrace.%d", fname, getpid()); in etcsystem_prune()
430 if ((fd = open(tmpname, in etcsystem_prune()
432 fatal("failed to create %s", tmpname); in etcsystem_prune()
435 (void) unlink(tmpname); in etcsystem_prune()
436 fatal("failed to write to %s", tmpname); in etcsystem_prune()
441 if (chown(tmpname, sbuf.st_uid, sbuf.st_gid) != 0) { in etcsystem_prune()
442 (void) unlink(tmpname); in etcsystem_prune()
443 fatal("failed to chown(2) %s to uid %d, gid %d", tmpname, in etcsystem_prune()
[all …]
/titanic_41/usr/src/lib/pam_modules/krb5/
H A Dkrb5_setcred.c477 char *tmpname = NULL; in krb5_renew_tgt() local
487 if ((tmpname = strchr(username, '@'))) in krb5_renew_tgt()
488 *tmpname = '\0'; in krb5_renew_tgt()
/titanic_41/usr/src/cmd/sgs/ar/common/
H A Dfile.c1621 char *slash, *tmpname; in make_tmpname() local
1632 tmpname = malloc(prefix_cnt + MSG_STR_MKTEMP_SIZE + 1); in make_tmpname()
1633 if (tmpname == NULL) { in make_tmpname()
1640 (void) strncpy(tmpname, filename, prefix_cnt); in make_tmpname()
1641 (void) strcpy(tmpname + prefix_cnt, MSG_ORIG(MSG_STR_MKTEMP)); in make_tmpname()
1642 (void) mktemp(tmpname); in make_tmpname()
1644 return (tmpname); in make_tmpname()
/titanic_41/usr/src/cmd/audio/utilities/
H A DAudioFile.cc56 static const char *tmpname = "(temporary file)"; variable
70 AudioUnixfile(tmpname, tmpmode), in AudioFile()
142 if (strcmp(path, tmpname) == 0) { in createfile()
/titanic_41/usr/src/uts/common/io/scsi/adapters/iscsi/
H A Dnvfile.c439 char *tmpname; in nvf_node_name_get() local
448 rval = nvlist_lookup_string(nvf_list, id, &tmpname); in nvf_node_name_get()
453 if (strlen(tmpname) < nsize) { in nvf_node_name_get()
454 (void) strcpy(name, tmpname); in nvf_node_name_get()
459 tmpname, nsize, id); in nvf_node_name_get()

12