Lines Matching defs:tmppath
1005 char *tmppath;
1027 if ((tmppath = malloc(PATH_MAX)) == NULL) {
1079 (void) strlcpy(tmppath, finalpath, PATH_MAX);
1080 if (strlcat(tmppath, "-tmpXXXXXX", PATH_MAX) >= PATH_MAX) {
1108 outfd = mkstemp(tmppath);
1111 name, tmppath, strerror(errno));
1117 if ((result = backend_do_copy(src, infd, (const char *)tmppath,
1127 if (rename(tmppath, finalpath) < 0) {
1130 name, tmppath, finalpath, strerror(errno));
1135 tmppath[len] = 0; /* strip -XXXXXX, for reference symlink */
1137 (void) unlink(tmppath);
1138 if (symlink(finalname, tmppath) < 0) {
1142 name, tmppath, finalname, strerror(errno));
1168 (void) unlink(tmppath);
1178 free(tmppath);
1493 char *tmppath = malloc(PATH_MAX);
1498 if (tmppath == NULL) {
1506 (void) strlcpy(tmppath, dst, PATH_MAX);
1507 sz = strlcat(tmppath, "-XXXXXX", PATH_MAX);
1511 "Backend copy failed: strlcat %s: overflow\n", tmppath);
1515 if ((dstfd = mkstemp(tmppath)) < 0) {
1517 tmppath, strerror(errno));
1550 * Rename tmppath to dst
1552 if (rename(tmppath, dst) < 0) {
1555 tmppath, dst, strerror(errno));
1560 if (res != REP_PROTOCOL_SUCCESS && unlink(tmppath) < 0)
1563 tmppath, strerror(errno));
1569 free(tmppath);